Aria2c Privilege Escalation
SUID Bit
Passwd file overwrite
1) Copy target passwd on your machine
cat /etc/passwd (Target)2) You can either modify root's password, or add an arbitrary user with root privileges. Either works fine.
openssl passwd PASSWORDpwned:HASH_FROM_OPENSSL_COMMAND:0:0:root:/root:/bin/bashroot:HASH_FROM_OPENSSL_COMMAND:0:0:root:/root:/bin/bash3) Overwrite the original /etc/passwd in the target machine with our modified one (You must be in the / directory for it to work)
4) Authenticate either as root or your user
SSH session as root
1) Go to your .ssh folder where your key pair is located
2) Transfer the public key to root authorized_keys to allow you to authenticate as root via SSH using your private key (You must be in the / directory for it to work)
3) SSH as root to target machine
Last updated