OSCP Page
Wordlist
# WEB
/usr/share/wordlists/dirb/common.txt
/usr/share/dirb/wordlists/big.txt
/usr/share/wordlists/seclists/Discovery/Web-Content/raft-medium-directories-lowercase.txt
/usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt
# Passwords
/usr/share/wordlists/rockyou.txt
# Usernames
/usr/share/wordlists/dirb/others/names.txt
# Passwords Leak
https://scatteredsecrets.com
https://weleakinfo.io
https://haveibeenpwned.com
# Hashcat rules
/usr/share/hashcat/rules/
# Precomplied binaries for Windows
/usr/share/windows-resources/Cheat Sheet
Scenarios
Ports
Troubleshooting
Ressources
Useful commands
Windows & AD
Tcpdump
Python
Open Ports
OOB
Automation
Looking for creds
Information Gathering
Passive Information Gathering
Infrastructure-based Enumeration
LLM-Powered Passive Information Gathering
Active Information Gathering
Network Enumeration
Ping Sweep
Scan Network Range
Convert nmap XML report to HTML
ACK-Scan
Scan by Using Decoys
Scan by Using Different Source IP
SYN-Scan From DNS Port
Fast Scan
Service Scanning
Nmap Options
-n
Never do DNS resolution
-sS
TCP SYN scan
-sT
TCP connect scan
-sU
UDP scans
-sV
Version detection
--version-all
Try every single Version probe (intensity 9)
-O
Enable OS detection
--osscan-guess:
Guess OS more aggressively
-sC
Run default NSE script
Protocols & Services
FTP / 21
SMB / 139 , 445
NFS / 2049
Kerberos / 88
DNS / 53
Email Services : SMTP : 25,465,587 / IMAP4 : 143,993 / POP3 : 110,995
SNMP / 161 UDP
MySQL / 3306
MSSQL / 1433
IPMI / 623 UDP
Linux Remote Management
RDP / 3389
WinRM / 5985
Oracle TNS / 1521
LDAP / 389, 636, 3268, 3269
MSSQL
Interacting with MSSQL
SQL Syntax
Execute Commands
Read & Write Local Files
Capture MSSQL Service Hash
Impersonate Existing Users with MSSQL
Linked Database
File Transfers
Windows
Download a file with PowerShell
Execute a file in memory using PowerShell
Upload a file with PowerShell
Upload a file with PowerShell using uploadserver
File Transfers with Powercat
Invoke-WebRequest using a Chrome User Agent
File transfer using SMB
Download a file using FTP
Upload a file using FTP
File transfer with base64 encoding
File transfer with WebDav
Download a file using JavaScript and cscript.exe
File transfer using WinRM
File transfer with RDP
Download a file using Bitsadmin
Download a file using Certutil
Linux
Download a file using Wget / cURL / PHP
File transfer with SCP
File Transfer with Netcat and Ncat
File Transfer with Socat
Creating a Web Server
Encode File en base64
Shells, Payloads & Exploit
Shells and Payloads
Public Exploits
Cross-Compiling Exploit Code
Metasploit Framework
MSFVenom
Post-Exploitation
MSFconsole Commands
Command
Description
show exploits
Show all exploits within the Framework.
show payloads
Show all payloads within the Framework.
show auxiliary
Show all auxiliary modules within the Framework.
search <name>
Search for exploits or modules within the Framework.
info
Load information about a specific exploit or module.
use <name>
Load an exploit or module (example: use windows/smb/psexec).
use <number>
Load an exploit by using the index number displayed after the search command.
LHOST
Your local host’s IP address reachable by the target, often the public IP address when not on a local network. Typically used for reverse shells.
RHOST
The remote host or the target. set function Set a specific value (for example, LHOST or RHOST).
setg <function>
Set a specific value globally (for example, LHOST or RHOST).
show options
Show the options available for a module or exploit.
show targets
Show the platforms supported by the exploit.
set target <number>
Specify a specific target index if you know the OS and service pack.
set payload <payload>
Specify the payload to use.
set payload <number>
Specify the payload index number to use after the show payloads command.
show advanced
Show advanced options.
set autorunscript migrate -f
Automatically migrate to a separate process upon exploit completion.
check
Determine whether a target is vulnerable to an attack.
exploit
Execute the module or exploit and attack the target.
exploit -j
Run the exploit under the context of the job. (This will run the exploit in the background.)
exploit -z
Do not interact with the session after successful exploitation.
exploit -e <encoder>
Specify the payload encoder to use (example: exploit –e shikata_ga_nai).
exploit -h
Display help for the exploit command.
sessions -l
List available sessions (used when handling multiple shells).
sessions -l -v
List all available sessions and show verbose fields, such as which vulnerability was used when exploiting the system.
sessions -s <script>
Run a specific Meterpreter script on all Meterpreter live sessions.
sessions -K
Kill all live sessions.
sessions -c <cmd>
Execute a command on all live Meterpreter sessions.
sessions -u <sessionID>
Upgrade a normal Win32 shell to a Meterpreter console.
db_create <name>
Create a database to use with database-driven attacks (example: db_create autopwn).
db_connect <name>
Create and connect to a database for driven attacks (example: db_connect autopwn).
db_nmap
Use Nmap and place results in a database. (Normal Nmap syntax is supported, such as –sT –v –P0.)
db_destroy
Delete the current database.
db_destroy <user:password@host:port/database>
Delete database using advanced options.
Meterpreter Commands
Command
Description
help
Open Meterpreter usage help.
run <scriptname>
Run Meterpreter-based scripts; for a full list check the scripts/meterpreter directory.
sysinfo
Show the system information on the compromised target.
ls
List the files and folders on the target.
use priv
Load the privilege extension for extended Meterpreter libraries.
ps
Show all running processes and which accounts are associated with each process.
migrate <proc. id>
Migrate to the specific process ID (PID is the target process ID gained from the ps command).
use incognito
Load incognito functions. (Used for token stealing and impersonation on a target machine.)
list_tokens -u
List available tokens on the target by user.
list_tokens -g
List available tokens on the target by group.
impersonate_token <DOMAIN_NAMEUSERNAME>
Impersonate a token available on the target.
steal_token <proc. id>
Steal the tokens available for a given process and impersonate that token.
lsa_dump_sam
Dumping SAM
lsa_dump_secrets
Dumping LSA secrets
drop_token
Stop impersonating the current token.
getsystem
Attempt to elevate permissions to SYSTEM-level access through multiple attack vectors.
shell
Drop into an interactive shell with all available tokens.
execute -f <cmd.exe> -i
Execute cmd.exe and interact with it.
execute -f <cmd.exe> -i -t
Execute cmd.exe with all available tokens.
execute -f <cmd.exe> -i -H -t
Execute cmd.exe with all available tokens and make it a hidden process.
rev2self
Revert back to the original user you used to compromise the target.
reg <command>
Interact, create, delete, query, set, and much more in the target’s registry.
setdesktop <number>
Switch to a different screen based on who is logged in.
screenshot
Take a screenshot of the target’s screen.
upload <filename>
Upload a file to the target.
download <filename>
Download a file from the target.
keyscan_start
Start sniffing keystrokes on the remote target.
keyscan_dump
Dump the remote keys captured on the target.
keyscan_stop
Stop sniffing keystrokes on the remote target.
getprivs
Get as many privileges as possible on the target.
uictl enable <keyboard/mouse>
Take control of the keyboard and/or mouse.
background
Run your current Meterpreter shell in the background.
hashdump
Dump all hashes on the target. use sniffer Load the sniffer module.
sniffer_interfaces
List the available interfaces on the target.
sniffer_dump <interfaceID> pcapname
Start sniffing on the remote target.
sniffer_start <interfaceID> packet-buffer
Start sniffing with a specific range for a packet buffer.
sniffer_stats <interfaceID>
Grab statistical information from the interface you are sniffing.
sniffer_stop <interfaceID>
Stop the sniffer.
add_user <username> <password> -h <ip>
Add a user on the remote target.
add_group_user <"Domain Admins"> <username> -h <ip>
Add a username to the Domain Administrators group on the remote target.
clearev
Clear the event log on the target machine.
timestomp
Change file attributes, such as creation date (antiforensics measure).
reboot
Reboot the target machine.
Web Enumeration
GIT
Web Enumeration
VHOST
Wordpress
SQLi
Hydra
Login Page
Password Attacks
Password Reuse / Default Passwords
Password Mutations
Remote Password Attacks
Windows Local Password Attacks / Credential Hunting
Linux Local Password Attacks / Credential Hunting
Cracking Passwords
Online Hash Cracking
Pivoting, Tunneling & Port Forwarding
Enumeration
Port Forwarding
Local Port Forwarding

Dynamic Port Forwarding

Reverse Port Forwarding

SSH Remote Dynamic Port Forwarding

Socat Redirection
SSH Pivoting with sshuttle
SSH for Windows
Port Forwarding with Windows netsh
Web Server Pivoting with Rpivot
Tunneling
DNS Tunneling with Dnscat2
SOCKS5 Tunneling with Chisel
ICMP Tunneling with SOCKS
RDP and SOCKS Tunneling with SocksOverRDP
Ligolo-ng
Linux
Enumeration
Exposed Confidential Information
Insecure File Permissions
Resources
Windows
Windows Permissions

Enumerating Windows

Credential Hunting
Service Binary Hijacking
DLL Hijacking
Standard DLL search order

Unquoted Service Paths
Scheduled Tasks
Kernel exploits
Abusing Windows privileges
Resources
Active Directory
Enumeration
Manual Enumeration
Automated Enumeration
AD Attacks
Password Attacks
AS-REP Roasting
Kerberoasting
Silver Tickets
DCSync Attack
GPO
Active Directory Persistence
Golden Ticket
Shadow Copies
AD Tools
Netexec
Mimikatz
Lateral Movement
Lateral Movement
WMI / WinRM
PsExec
Pass the Hash (PtH)
Pass the Key / OverPass the Hash
Pass the Ticket (PtT)
DCOM
Relaying Net-NTLMv2
Phishing & Client-Side Attacks
Phishing
Cloning a Legitimate Website
Client-Side Attacks
Information Gathering
Leveraging Microsoft Word Macros
Abusing Windows Library Files
Automation
Bypass and Evasion
Bypass
LSA Dump
Cloud
Jenkins
Last updated