Persistence
SSH
Key Injection
SSH
Key InjectionGenerate SSH Keys
To make sure the execute properly give it restricted permissions:
If
authorized_keys
file doesn't exist create one with your public key:
Other wise append your public key:
Now just connect with your private key:
Using Existing keys
Using Existing keys
Look for the private key
Once you find it, just copy the key in your
.ssh
directory and ssh in.Also you can, check If the Corresponding private/public Key is known by using this
repo
.
Crack the passphrase
Crack the passphrase
Once you got the private key, you can use
ssh2john
to generate a hash from the key:
Then feed this hash into
John the Ripper
:
Clone the key
Clone the key
Sometimes you may need to copy an encrypted key to its decrypted version:
Last updated