mirror of
https://github.com/projectdiscovery/nuclei-templates.git
synced 2026-02-09 04:03:16 +08:00
49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
id: privesc-gawk
|
|
|
|
info:
|
|
name: gawk - Privilege Escalation
|
|
author: daffainfo
|
|
severity: high
|
|
description: |
|
|
gawk is the GNU implementation of the AWK programming language. It is a powerful text processing tool that allows for pattern scanning and processing of text files. gawk is commonly used for data extraction, reporting, and manipulation tasks in shell scripts and command-line environments.
|
|
reference:
|
|
- https://gtfobins.github.io/gtfobins/gawk/
|
|
metadata:
|
|
verified: true
|
|
tags: code,linux,gawk,privesc
|
|
|
|
self-contained: true
|
|
code:
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
whoami
|
|
|
|
#SUID
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
gawk 'BEGIN {system("whoami")}'
|
|
|
|
#SUDO
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
sudo gawk '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 |