48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
id: privesc-slsh
|
|
|
|
info:
|
|
name: slsh - Privilege Escalation
|
|
author: daffainfo
|
|
severity: high
|
|
description: |
|
|
slsh is a command-line shell that is designed to provide a secure environment for executing shell commands. It is often used in scenarios where security and privilege separation are important, such as in web hosting environments or when running untrusted code. slsh aims to provide a secure and restricted shell environment for executing commands.
|
|
reference:
|
|
- https://gtfobins.github.io/gtfobins/slsh/
|
|
metadata:
|
|
verified: true
|
|
tags: code,linux,slsh,privesc
|
|
|
|
self-contained: true
|
|
code:
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
whoami
|
|
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
slsh -e 'system("whoami")'
|
|
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
sudo slsh -e 'system("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: 4a0a00473045022100a3195731e14a3f5c9462def2093d7906d9f7083b9cb504a7381d70a9a0252e5502207cd3087a296269c5b88025db54aae77f60bf0d64f18614db8f5582e5a20076e6:922c64590222798bb761d5b6d8e72950 |