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

49 lines
1.3 KiB
YAML
Raw Permalink 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
tags: code,linux,posh,privesc,local
2024-01-22 13:29:57 +00:00
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: 4b0a00483046022100b3a4f4aaf0ece3b42f474a0a1715a494b1d5df6afece578ab59e6a362c3819c2022100ec82fdef145ace5edaeb1d7f603d674423509053a71415bfd189b2628bfd419d:922c64590222798bb761d5b6d8e72950