48 lines
1.1 KiB
YAML
48 lines
1.1 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
|
|
tags: code,linux,zsh,privesc
|
|
|
|
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: 490a0046304402200fe72b359a88bdfd94240a5d26c83549a114ef09577f197b3dbf43d9555f7a330220170fd068c5f2adf8493b8eee427287a7b29c3e0fffc88d9d4a9a527eca31e0e4:922c64590222798bb761d5b6d8e72950 |