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
2024-01-29 11:58:34 +00:00
max-request : 3
2024-01-31 17:41:31 +00:00
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")'
2024-01-22 16:20:01 +00:00
condition : or
2024-01-31 17:43:39 +00:00
# digest: 4b0a00483046022100b3a4f4aaf0ece3b42f474a0a1715a494b1d5df6afece578ab59e6a362c3819c2022100ec82fdef145ace5edaeb1d7f603d674423509053a71415bfd189b2628bfd419d:922c64590222798bb761d5b6d8e72950