Files
nuclei-templates/code/privilege-escalation/linux/binary/privesc-sshpass.yaml
2024-01-22 16:20:02 +00:00

48 lines
1.2 KiB
YAML

id: privesc-sshpass
info:
name: sshpass - Privilege Escalation
author: daffainfo
severity: high
description: |
sshpass is a command-line tool that provides a way to automatically input SSH passwords for password authentication. It is commonly used in scripts and automated processes where interactive password entry is not feasible.
reference:
- https://gtfobins.github.io/gtfobins/sshpass/
metadata:
verified: true
tags: code,linux,sshpass,privesc
self-contained: true
code:
- engine:
- sh
- bash
source: |
whoami
- engine:
- sh
- bash
source: |
sshpass whoami
- engine:
- sh
- bash
source: |
sudo sshpass 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: 4a0a004730450220094f30de7f11cc2db0a7e20e174f0d4ec8090c5b6ca57e047d081e2f7c6f38f1022100ec82a1aa799635b21303c12945cdce10a5aba671ae2cfa3fde58cd333c15e252:922c64590222798bb761d5b6d8e72950