Enumeration
System Enumeration
Hostname Information
hostnameKernel & OS Information
uname -a
cat /proc/version
cat /etc/issueCPU Information
lscpuRunning Services
ps aux
ps aux | grep [USERNAME]
# View all running processes
ps -A
# View Process Tree
ps axjfEnvironment Variables
envUser Enumeration
Display Current User
whoamiDisplay User ID (UID), Group ID (GID), etc
idDisplay User information in the System
cat /etc/passwd
# Displays only the username
cat /etc/passwd | cut -d : -f 1
cat /etc/passwd | grep homeDisplay Group Information
cat /etc/groupPermissions
Sudo Permissions
sudo -lSudo Version
sudo -VFile Permissions
ls -la /etc/passwd
ls -la /etc/shadowSUID
find / -type f -perm -04000 -ls 2>/dev/nullfind / -perm -u=s -type f 2>/dev/nullfind / -user root -perm -4000 -exec ls -ldb {} \\; 2>/dev/nullCapabilities
getcap -r / 2>/dev/null
# Look for cap_setuid+epNetwork Enumeration
Display IP and NIC information
ip a
ifconfigDisplay Routing Table
ip route
routeDisplay ARP Table
ip neigh
arp -aDisplay Open Ports
netstat -anoPassword Hunting
Search for files that has the word “password”
grep —color=auto -rnw '/' -ie "PASSWORD" —color=always 2> /dev/nullList files with the word “password” in the filename.
locate password | lessSearch for SSH Keys
find / -name authorized_keys 2>/dev/null
find / -name id_rsa 2>/dev/nullEnumerating Files
find . -name flag1.txt: find the file named “flag1.txt” in the current directoryfind /home -name flag1.txt: find the file names “flag1.txt” in the /home directoryfind / -type d -name config: find the directory named config under “/”find / -type f -perm 0777: find files with the 777 permissions (files readable, writable, and executable by all users)find / -perm a=x: find executable filesfind /home -user frank: find all files for user “frank” under “/home”find / -mtime 10: find files that were modified in the last 10 daysfind / -atime 10: find files that were accessed in the last 10 dayfind / -cmin -60: find files changed within the last hour (60 minutes)find / -amin -60: find files accesses within the last hour (60 minutes)find / -size 50M: find files with a 50 MB sizefind / -writable -type d 2>/dev/null: Find world-writeable foldersfind / -perm -222 -type d 2>/dev/null: Find world-writeable foldersfind / -perm -o w -type d 2>/dev/null: Find world-writeable foldersfind / -perm -o x -type d 2>/dev/null: Find world-executable folders
Find development tools and supported languages:
find / -name perl*find / -name python*find / -name gcc*
Last updated

