48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
id: privesc-sash
|
|
|
|
info:
|
|
name: sash - Privilege Escalation
|
|
author: daffainfo
|
|
severity: high
|
|
description: |
|
|
sash is a stand-alone shell that is commonly used for system recovery and maintenance. It provides a minimal set of commands and features, making it useful in situations where the regular shell environment may not be available or functional. sash is often used in emergency situations to troubleshoot and repair systems.
|
|
reference:
|
|
- https://gtfobins.github.io/gtfobins/sash/
|
|
metadata:
|
|
verified: true
|
|
tags: code,linux,sash,privesc
|
|
|
|
self-contained: true
|
|
code:
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
whoami
|
|
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
sash -c 'whoami'
|
|
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
sudo sash -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: 4a0a00473045022100d8d67e00bbc52458f01744e11b2b5259a352359c9c1e81f4774860dd02b27e1802201268d3e689f33254cd462e50b301420c5b2836ac0046a941fa0c5c5b84ded4d6:922c64590222798bb761d5b6d8e72950 |