49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
id: privesc-elvish
|
|
|
|
info:
|
|
name: elvish - Privilege Escalation
|
|
author: daffainfo
|
|
severity: high
|
|
description: |
|
|
elvish is a Unix shell that emphasizes expressiveness and extensibility. It aims to provide a more user-friendly and programmable shell experience, with features such as a powerful scripting language, a rich set of data types, and a clean and consistent syntax.
|
|
reference:
|
|
- https://gtfobins.github.io/gtfobins/elvish/
|
|
metadata:
|
|
verified: true
|
|
max-request: 3
|
|
tags: code,linux,elvish,privesc,local
|
|
|
|
self-contained: true
|
|
code:
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
whoami
|
|
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
elvish -c 'whoami'
|
|
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
sudo elvish -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: 4b0a00483046022100a1f071fa9a6361b4bd0b72318c713adb186b0544408f7afa7dec8c2cfd5f7a42022100810d9cc3ca386217a4fcc535d63205ef64870762732e38fdf854feef4a3b5977:922c64590222798bb761d5b6d8e72950 |