YARA rule 'backdoor_persistence': Backdoor persistence with malicious payloads (shell commands, SSH key injection, hidden root users) [malware]
High
- Category
- YARA Match
- Content
chmod 700 /tmp/ssh_pass.sh SSH_ASKPASS=/tmp/ssh_pass.sh DISPLAY=dummy:0 \ ssh -o StrictHostKeyChecking=no root@SERVER_IP \ "mkdir -p ~/.ssh && echo '$(cat ~/.ssh/id_ed25519.pub)' >> ~/.ssh/authorized_keys" rm -f /tmp/ssh_pass.sh ```
- Confidence
- 87% confidence
- Finding
- This example appends a public key to `root`'s `authorized_keys` over SSH, creating persistent remote access. In a legitimate administration context this can be normal bootstrapping, but in a reusable skill it is dangerous because it normalizes persistence on the root account and pairs it with `StrictHostKeyChecking=no`, which increases MITM and unauthorized-access risk.
