stdbuf - Privilege Escalation
ID: privesc-stdbuf
Severity: high
Author: daffainfo
Tags: code,linux,stdbuf,privesc,local
Description
Section titled “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.
YAML Source
Section titled “YAML Source”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: truecode: - 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: 4b0a0048304602210085cba2a30005f4f9c23a11929f87585140347123e6bec9a5819aa7c245f601f7022100a3b46722f3fa1c936780bd46b5b1ab2003171ee49e74bab5877174a53fad9fab:922c64590222798bb761d5b6d8e72950Guide to check the vulnerabilities
Section titled “Guide to check the vulnerabilities”This template is used to detect vulnerabilities in web applications. It can be used with the Nuclei tool to scan for specific patterns or behaviors.
$ nuclei -u "URL" -t "code/privilege-escalation/linux/binary/privesc-stdbuf.yaml"