48 lines
1.1 KiB
YAML
48 lines
1.1 KiB
YAML
id: privesc-yash
|
|
|
|
info:
|
|
name: Yash - Privilege Escalation
|
|
author: daffainfo
|
|
severity: high
|
|
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/
|
|
metadata:
|
|
verified: true
|
|
tags: code,linux,yash,privesc
|
|
|
|
self-contained: true
|
|
code:
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
whoami
|
|
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
yash -c 'whoami'
|
|
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
sudo yash -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: 4b0a00483046022100c6894473ffd208e9539bbaa707a70e0eaecda95fdb3e204ac6e3317f3953b787022100c830b24cadbbe5d400ad4123673b1a146d12d5dd9faa9b5750251af6d6e37cea:922c64590222798bb761d5b6d8e72950 |