nawk - Privilege Escalation
ID: privesc-nawk
Severity: high
Author: daffainfo
Tags: code,linux,nawk,privesc,local
Description
Section titled “Description”nawk is an implementation of the AWK programming language. It is a text-processing language that is commonly used for pattern scanning and processing of text files. nawk provides powerful features for data extraction, reporting, and manipulation, making it a valuable tool for text processing tasks in shell scripts and command-line environments.
YAML Source
Section titled “YAML Source”id: privesc-nawk
info: name: nawk - Privilege Escalation author: daffainfo severity: high description: | nawk is an implementation of the AWK programming language. It is a text-processing language that is commonly used for pattern scanning and processing of text files. nawk provides powerful features for data extraction, reporting, and manipulation, making it a valuable tool for text processing tasks in shell scripts and command-line environments. reference: - https://gtfobins.github.io/gtfobins/nawk/ metadata: verified: true max-request: 3 tags: code,linux,nawk,privesc,local
self-contained: truecode: - engine: - sh - bash source: | whoami
- engine: - sh - bash source: | nawk 'BEGIN {system("whoami")}'
- engine: - sh - bash source: | sudo nawk '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: 4b0a00483046022100afce61790c5027e0b4a81e0506e18ad07ac5e8c2c8218f625514bb20d62be2d3022100f2f585eaa88f7f5ae2eb2cd635445b7f5c59889f47a6107636cf1a0b60c3d149: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-nawk.yaml"