48 lines
1.1 KiB
YAML
48 lines
1.1 KiB
YAML
id: privesc-tmate
|
|
|
|
info:
|
|
name: tmate - Privilege Escalation
|
|
author: daffainfo
|
|
severity: high
|
|
description: |
|
|
tmate is a terminal multiplexer that allows multiple users to access and collaborate in the same terminal session.
|
|
reference:
|
|
- https://gtfobins.github.io/gtfobins/tmate/
|
|
metadata:
|
|
verified: true
|
|
tags: code,linux,tmate,privesc
|
|
|
|
self-contained: true
|
|
code:
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
whoami
|
|
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
tmate -c whoami
|
|
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
sudo tmate -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: 4b0a00483046022100bad54c8fab4967e3192ee32f2260b8b1d97bc01803218c272a3b5cc0ec265ddc02210095e387ac431a8608cb08182955781602ec196b639dcdf3b67ba2b1aa935d7481:922c64590222798bb761d5b6d8e72950 |