Files
nuclei-templates/code/privilege-escalation/linux/binary/privilege-escalation-bash.yaml
2023-12-13 22:07:24 +07:00

46 lines
797 B
YAML

id: privilege-escalation-bash
info:
name: Bash - Privilege Escalation
author: daffainfo
severity: high
reference: https://gtfobins.github.io/gtfobins/bash/
metadata:
verified: true
tags: code,linux,bash,privesc
self-contained: true
code:
- engine:
- sh
- bash
source: |
whoami
#SUID
- engine:
- sh
- bash
source: |
bash -c 'whoami'
#SUDO
- 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")'
condition: or