Files
nuclei-templates/code/privilege-escalation/linux/binary/privesc-bash.yaml
2024-12-01 13:30:43 +00:00

49 lines
1.3 KiB
YAML

id: privesc-bash
info:
name: Bash - Privilege Escalation
author: daffainfo
severity: high
description: |
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.
reference:
- https://gtfobins.github.io/gtfobins/bash/
metadata:
verified: true
max-request: 3
tags: code,linux,bash,privesc,local
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")'
condition: or
# digest: 4b0a004830460221008a680d0aa6704c84cf78d726fac39fbd108f8008451b1d5ff1ff826cb2a5e5f4022100c7702090c6417b5ba1d7c22c89a55add1f5d063b027fc504db663c3948e3b041:922c64590222798bb761d5b6d8e72950