2024-01-22 13:29:57 +00:00
id : privesc-bash
info :
name : Bash - Privilege Escalation
author : daffainfo
severity : high
description : |
2024-01-29 11:58:34 +00:00
Bash is a Unix shell and command language written by Brian Fox for the GNU Project as a free software replacement for the Bourne shell. The shell's name is an acronym for Bourne Again Shell, a pun on the name of the Bourne shell that it replaces and the notion of being born again.
2024-01-22 13:29:57 +00:00
reference :
- https://gtfobins.github.io/gtfobins/bash/
metadata :
verified : true
2024-01-29 11:58:34 +00:00
max-request : 3
2024-01-31 17:41:31 +00:00
tags : code,linux,bash,privesc,local
2024-01-22 13:29:57 +00:00
self-contained : true
code :
- engine :
- sh
- bash
source : |
whoami
- engine :
- sh
- bash
source : |
bash -c 'whoami'
- engine :
- sh
- bash
source : |
sudo bash -c 'whoami'
matchers-condition : and
matchers :
- type : word
part : code_1_response
words :
- "root"
negative : true
- type : dsl
dsl :
- 'contains(code_2_response, "root")'
- 'contains(code_3_response, "root")'
2024-01-22 16:20:01 +00:00
condition : or
2024-01-31 17:43:39 +00:00
# digest: 4a0a00473045022100b7139b5d1f14010b53722d2116b731cde04bf9f88e93d534af71430619c6519e022014318f5a98bdaf551bff8af32af0fddc900396fd795b982fb976259006f20b75:922c64590222798bb761d5b6d8e72950