nuclei-templates/code/privilege-escalation/linux/binary/privesc-zsh.yaml

49 lines
1.2 KiB
YAML

id: privesc-zsh
info:
name: Zsh - Privilege Escalation
author: daffainfo
severity: high
description: |
zsh is a powerful and feature-rich shell for Unix-like operating systems. It offers advanced interactive features, extensive customization options, and robust scripting capabilities
reference:
- https://gtfobins.github.io/gtfobins/zsh/
metadata:
verified: true
max-request: 3
tags: code,linux,zsh,privesc,local
self-contained: true
code:
- engine:
- sh
- bash
source: |
whoami
- engine:
- sh
- bash
source: |
zsh -c 'whoami'
- engine:
- sh
- bash
source: |
sudo zsh -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: 4b0a00483046022100ab44d17dfece20c0576697bc0c64685d72e2dff271989bf9891b3dfdc80c100a022100a14ec41d37b9c251003a8bb41c3cb2cdb8b581e777f18a9a7af59d36863ff301:922c64590222798bb761d5b6d8e72950