Files
nuclei-templates/code/privilege-escalation/linux/binary/privesc.yaml
2024-01-22 18:59:57 +05:30

49 lines
929 B
YAML

id: privesc-ash
info:
name: Ash - Privilege Escalation
author: daffainfo
severity: high
description: |
Ash allows the value of a variable to be set at the same time it is marked read only by writing readonly name=value With no arguments
reference:
- https://gtfobins.github.io/gtfobins/ash/
metadata:
verified: true
tags: code,linux,ash,privesc
self-contained: true
code:
- engine:
- sh
- bash
source: |
whoami
#SUID
- engine:
- sh
- bash
source: |
ash -c 'whoami'
#SUDO
- engine:
- sh
- bash
source: |
sudo ash -c '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