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

49 lines
1.1 KiB
YAML
Raw Normal View History

2024-01-22 13:29:57 +00:00
id: privesc-yash
2023-12-13 15:07:24 +00:00
info:
name: Yash - Privilege Escalation
author: daffainfo
severity: high
2024-01-22 13:29:57 +00:00
description: |
yash is a POSIX-compliant command shell that aims to be a lightweight and efficient alternative to other shells such as Bash or Zsh.
reference:
- https://gtfobins.github.io/gtfobins/yash/
2023-12-13 15:07:24 +00:00
metadata:
verified: true
max-request: 3
tags: code,linux,yash,privesc,local
2023-12-13 15:07:24 +00:00
self-contained: true
code:
- engine:
- sh
- bash
source: |
2024-01-22 13:29:57 +00:00
whoami
2023-12-13 15:07:24 +00:00
- engine:
- sh
- bash
source: |
2024-01-22 13:29:57 +00:00
yash -c 'whoami'
2023-12-13 15:07:24 +00:00
- engine:
- sh
- bash
source: |
2024-01-22 13:29:57 +00:00
sudo yash -c 'whoami'
2023-12-13 15:07:24 +00:00
matchers-condition: and
matchers:
2024-01-22 13:29:57 +00:00
- type: word
part: code_1_response
words:
- "root"
negative: true
2023-12-13 15:07:24 +00:00
- type: dsl
dsl:
- 'contains(code_2_response, "root")'
- 'contains(code_3_response, "root")'
condition: or
# digest: 490a004630440220407cbe43d57f1fdae8cb42d677464a71d661e4ad5e5f625a3c8046b40e9a7c2e0220090af158add8ff1477e2996116208ad71e0c659f5975505ecc9c7a4fee7d91fe:922c64590222798bb761d5b6d8e72950