Linux
After gaining user, you can run these checks to discover more information
Last updated
After gaining user, you can run these checks to discover more information
Last updated
Check your identity and find files and directories you have permissions to and GTFO -
Shows all command this user can run as sudo
Check for configs that are preserved with env_keep
which can be used to preload custom files
Find all binaries with sticky bit set and GTFO -
Check for local services running on the victim machine
Find all listening services and use SSH port forwarding to forward the service to your machine
On the victim machine, add the attacker's public key in /home/victim/.ssh/authorized_keys
For SSH tunneling, run this on the attacker
Or use FRPC to expose the local service directly. In the example below, we expose a serivce running on port 3001 on the victim to port 6000 globally
Copy frpc
and frpc.ini
to the victim and run:
On the attacker server, start frps
Run pspy64 to check running process (likely cron)
/etc/mysql/my.cnf
/etc/apache2/apache2.conf
/etc/apache2/sites-enabled/000-default.conf
etc/nginx/sites-available/default.conf
etc/nginx/nginx.conf
/var/mail
/var/spool/mail
/opt
/var/backups
If in group adm
, check
/var/logs/audit
Run aureport --help
to visualize the audit logs
Check the mounts /dev/sda*
Check binaries being used that do not use absolute path. We can highjack the binaries loaded using relative paths
Kill the running process
Get the data from the crash log
Gets capabilities of binaries and GTFO - e