49 lines
1.2 KiB
YAML
49 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
|
|
max-request: 3
|
|
tags: code,linux,stdbuf,privesc,local
|
|
|
|
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: 4a0a00473045022044c9d477bc49908bc0d4f73ddfe99855deac7b1000b8ebaf9f767ecc651da01602210089548a828bf5734329ae07791d0f488c2f5aa03715c28b85722fdcf48368c7e0:922c64590222798bb761d5b6d8e72950 |