Files
nuclei-templates/code/privilege-escalation/linux/binary/privesc-ash.yaml
2024-01-22 16:20:02 +00:00

48 lines
1.1 KiB
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
- engine:
- sh
- bash
source: |
ash -c 'whoami'
- 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
# digest: 4a0a00473045022100d25c9dd1ce2eab3a962a4071a9f7500f59466848425225cd4047cc3115acbe37022061461b964e2bc7a9985a89d47c03136a8cb815900a1ba2038fbb8d073b88737b:922c64590222798bb761d5b6d8e72950