mirror of
https://github.com/projectdiscovery/nuclei-templates.git
synced 2026-02-09 04:03:16 +08:00
49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
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: true
|
|
code:
|
|
- 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: 4a0a004730450220468e533b581b0872ff18a9fe436d1b2591d9e074389ccf14aa993309c69bd490022100ffc0ede54fb6ece69bdd3607308437643f6b199f337c1914cfcbe32124457ea5:922c64590222798bb761d5b6d8e72950 |