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

48 lines
1.1 KiB
YAML
Raw Normal View History

2024-01-22 13:29:57 +00:00
id: privesc-zsh
2023-12-13 15:07:24 +00:00
info:
name: Zsh - Privilege Escalation
author: daffainfo
severity: high
2024-01-22 13:29:57 +00:00
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/
2023-12-13 15:07:24 +00:00
metadata:
verified: true
tags: code,linux,zsh,privesc
self-contained: true
code:
- engine:
- sh
- bash
source: |
2024-01-22 13:29:57 +00:00
whoami
2023-12-13 15:07:24 +00:00
- engine:
- sh
- bash
source: |
2024-01-22 13:29:57 +00:00
zsh -c 'whoami'
2023-12-13 15:07:24 +00:00
- engine:
- sh
- bash
source: |
2024-01-22 13:29:57 +00:00
sudo zsh -c 'whoami'
2023-12-13 15:07:24 +00:00
matchers-condition: and
matchers:
2024-01-22 13:29:57 +00:00
- type: word
part: code_1_response
words:
- "root"
negative: true
2023-12-13 15:07:24 +00:00
- type: dsl
dsl:
- 'contains(code_2_response, "root")'
- 'contains(code_3_response, "root")'
condition: or
# digest: 490a0046304402200fe72b359a88bdfd94240a5d26c83549a114ef09577f197b3dbf43d9555f7a330220170fd068c5f2adf8493b8eee427287a7b29c3e0fffc88d9d4a9a527eca31e0e4:922c64590222798bb761d5b6d8e72950