2024-01-22 18:59:57 +05:30
id : privesc-awk
2023-12-13 22:07:24 +07:00
info :
name : awk - Privilege Escalation
author : daffainfo
severity : high
2024-01-22 18:59:57 +05:30
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/
2023-12-13 22:07:24 +07:00
metadata :
verified : true
2024-01-29 11:58:34 +00:00
max-request : 3
2024-01-31 23:11:31 +05:30
tags : code,linux,awk,privesc,local
2023-12-13 22:07:24 +07:00
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 :
2024-01-22 18:59:57 +05:30
- type : word
part : code_1_response
words :
- "root"
negative : true
2023-12-13 22:07:24 +07:00
- 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: 490a00463044022071c201eea9ea070ff16f969f8b05159635ab0cd518353553b47dc0712896376f022056668475360f552aba1f0d8130cb72104bd5c53615d342a38a0018bcb8a8cc96:922c64590222798bb761d5b6d8e72950