awk - Privilege Escalation
ID: privesc-awk
Severity: high
Author: daffainfo
Tags: code,linux,awk,privesc,local
Description
Section titled “Description”AWK is a domain-specific language designed for text processing and typically used as a data extraction and reporting tool. Like sed and grep, it is a filter, and is a standard feature of most Unix-like operating systems.
YAML Source
Section titled “YAML Source”id: privesc-awk
info: name: awk - Privilege Escalation author: daffainfo severity: high description: | AWK is a domain-specific language designed for text processing and typically used as a data extraction and reporting tool. Like sed and grep, it is a filter, and is a standard feature of most Unix-like operating systems. reference: - https://gtfobins.github.io/gtfobins/awk/ metadata: verified: true max-request: 3 tags: code,linux,awk,privesc,local
self-contained: truecode: - engine: - sh - bash source: | whoami
- engine: - sh - bash source: | awk 'BEGIN {system("whoami")}'
- engine: - sh - bash source: | sudo awk 'BEGIN {system("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: 490a00463044022001ad14e199723030dc5f74ade3af9ef2c9aff93b0fbd2689ea4311206cf5e05502205872f5d49abda7895bbeac0c9ba61a7e98ff35ed15dc8a0dbeb7258b750733cc: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-awk.yaml"