49 lines
1022 B
YAML
49 lines
1022 B
YAML
|
id: privesc-cdist
|
||
|
|
||
|
info:
|
||
|
name: Cdist - Privilege Escalation
|
||
|
author: daffainfo
|
||
|
severity: high
|
||
|
description: |
|
||
|
cdist is a free software configuration management tool for Unix-like systems. It manages nodes over SSH using the Bourne Shell, and does not require any additional software to be installed on target nodes.
|
||
|
reference:
|
||
|
- https://gtfobins.github.io/gtfobins/cdist/
|
||
|
metadata:
|
||
|
verified: true
|
||
|
tags: code,linux,cdist,privesc
|
||
|
|
||
|
self-contained: true
|
||
|
code:
|
||
|
- engine:
|
||
|
- sh
|
||
|
- bash
|
||
|
source: |
|
||
|
whoami
|
||
|
|
||
|
#SUID
|
||
|
- engine:
|
||
|
- sh
|
||
|
- bash
|
||
|
source: |
|
||
|
cdist shell -s whoami
|
||
|
|
||
|
#SUDO
|
||
|
- engine:
|
||
|
- sh
|
||
|
- bash
|
||
|
source: |
|
||
|
sudo cdist shell -s 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
|