Files
nuclei-templates/code/privilege-escalation/linux/binary/privesc-sshpass.yaml
pussycat0x b62697a608 lint -fix
2024-01-22 19:39:39 +05:30

47 lines
1014 B
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