Files
nuclei-templates/code/privilege-escalation/linux/binary/privesc-sshpass.yaml
2024-01-31 23:11:31 +05:30

49 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
max-request: 3
tags: code,linux,sshpass,privesc,local
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: 4a0a00473045022100e8b20f38d74dfcbd69cfa830cddfc2b9ea6033b3fb540539cc21ef023e93f6c602200d0ff8f875123f56ef792d041f9339d988cda15a18eb4d136ff7daf8a552c22b:922c64590222798bb761d5b6d8e72950