nuclei-templates/code/privilege-escalation/linux/binary/privesc-ssh-agent.yaml

49 lines
1.3 KiB
YAML
Raw Normal View History

2024-01-22 13:29:57 +00:00
id: privesc-ssh-agent
info:
name: ssh-agent - Privilege Escalation
author: daffainfo
severity: high
description: |
ssh-agent is a program that helps manage and store private keys used for SSH authentication. It is often used to hold the decrypted private keys in memory, allowing for seamless authentication to remote servers without the need to re-enter passphrases for the keys.
reference:
- https://gtfobins.github.io/gtfobins/ssh-agent/
metadata:
verified: true
max-request: 3
2024-01-22 13:29:57 +00:00
tags: code,linux,ssh-agent,privesc
self-contained: true
code:
- engine:
- sh
- bash
source: |
whoami
- engine:
- sh
- bash
source: |
ssh-agent whoami
- engine:
- sh
- bash
source: |
sudo ssh-agent 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: 4a0a0047304502206000b50e8fc12968ae0b4b8b0fe2cf00aab4cbc6347d782e47b9746ab94519c10221009442b04ea76a2f70f432d09d18dabad9e63c8e49e67d79c945faf972fd34247d:922c64590222798bb761d5b6d8e72950