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

48 lines
1.2 KiB
YAML

id: privesc-stdbuf
info:
name: stdbuf - Privilege Escalation
author: daffainfo
severity: high
description: |
The stdbuf command is used to modify the buffering operations of another command. It can be used to adjust the input/output buffering of a command, which can be useful for controlling the flow of data and improving the performance of certain operations.
reference:
- https://gtfobins.github.io/gtfobins/stdbuf/
metadata:
verified: true
tags: code,linux,stdbuf,privesc
self-contained: true
code:
- engine:
- sh
- bash
source: |
whoami
- engine:
- sh
- bash
source: |
stdbuf -i0 whoami
- engine:
- sh
- bash
source: |
sudo stdbuf -i0 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: 4b0a004830460221009591ab6b38c91a906c3798218c576a7f436505855af6613249f6492274f30342022100e14a43caf3b2f7d9db3858ad0f0ce0c3cb2333ac56f5c3642c326db04dfc6bf4:922c64590222798bb761d5b6d8e72950