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

49 lines
1.3 KiB
YAML
Raw Normal View History

2024-01-22 13:29:57 +00:00
id: privesc-posh
info:
name: posh - Privilege Escalation
author: daffainfo
severity: high
description: |
"posh" typically refers to the "Policy-compliant Ordinary SHell," which is a restricted shell designed to provide a limited set of commands and features for users with restricted access. It is often used in environments where users require limited functionality and access to system resources.
reference:
- https://gtfobins.github.io/gtfobins/posh/
metadata:
verified: true
max-request: 3
2024-01-22 13:29:57 +00:00
tags: code,linux,posh,privesc
self-contained: true
code:
- engine:
- sh
- bash
source: |
whoami
- engine:
- sh
- bash
source: |
posh -c 'whoami'
- engine:
- sh
- bash
source: |
sudo posh -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: 490a0046304402206a1d130ee689e478e482729c539b981f9c3bc72072354b5db031beaaf3b4354c02206f2bf1e3ea42d6c47a9aff2f06f20a92bd56bee2b535a677bf2560c67a0c330d:922c64590222798bb761d5b6d8e72950