sshpass - Privilege Escalation
ID: privesc-sshpass
Severity: high
Author: daffainfo
Tags: code,linux,sshpass,privesc,local
Description
Section titled “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.
YAML Source
Section titled “YAML Source”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: truecode: - 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: 4a0a00473045022070214ce46c882446b6bc4a254cf8f85f57597cf301c7c128928396c66c04e791022100ba87532fe2e5a045ffd9b8065512bf3d585c42013e7c8f64803421662e702761:922c64590222798bb761d5b6d8e72950Guide to check the vulnerabilities
Section titled “Guide to check the vulnerabilities”This template is used to detect vulnerabilities in web applications. It can be used with the Nuclei tool to scan for specific patterns or behaviors.
$ nuclei -u "URL" -t "code/privilege-escalation/linux/binary/privesc-sshpass.yaml"