nuclei-templates/code/privilege-escalation/linux/binary/privesc-mawk.yaml

47 lines
1.1 KiB
YAML
Raw Normal View History

2024-01-22 13:29:57 +00:00
id: privesc-mawk
info:
name: mawk - Privilege Escalation
author: daffainfo
severity: high
description: |
mawk is an efficient and fast implementation of the AWK programming language. It is designed to be smaller and faster than the original AWK implementation, making it suitable for large data processing tasks. mawk is commonly used for text processing and pattern scanning in shell scripts and command-line environments.
2024-01-22 14:09:39 +00:00
reference:
2024-01-22 13:29:57 +00:00
- https://gtfobins.github.io/gtfobins/mawk/
metadata:
verified: true
tags: code,linux,mawk,privesc
self-contained: true
code:
- engine:
- sh
- bash
source: |
whoami
- engine:
- sh
- bash
source: |
mawk 'BEGIN {system("whoami")}'
- engine:
- sh
- bash
source: |
sudo mawk '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