Skip to content
leg3ndProjects & tools
01Home02Projects03Tools04Notes
GMT+8
O/ OSCP exploitation reference
Workspace controls Memory only · 0 steps
Visualize path ↗
Command values 0 filled

Temporary connection values clear on reload. Passwords, hashes and tickets remain placeholders. Check address-family syntax in the selected command.

Reference index ↗ Search all procedures & variants ↗
01Discovery02Enumeration03Initial access04Usable access05Local privilege06Active Directory07Internal access08Evidence & reporting

QUICK REFERENCE

Discovery›Services›Web mapping›Web exploitation›Credentials›Public exploits›Sessions & transfers›Linux escalation›Windows escalation›AD enumeration›AD identity attacks›Lateral movement›Pivoting & tunnels›Execution troubleshooting›Integration & evidence›
174 methods · 15 topicsFull reference on GitHub ↗Commands · scripts · next steps
Tools/OSCP/Enumeration/Web mapping

REFERENCE / 6 TASKS

Web mapping

Capture a working request, check a missing path, then use Gobuster or ffuf. Replay interesting results with the correct hostname and session.

Contents ↓Tools & scripts ↓Commands ↓First-pass workflow ↓Full procedure index ↗

Contents

Jump to a task. Commands and variants are visible below; full checks and explanations stay on each technique page.

  • Application identity and hosts
    • Establish scheme, host, redirects and request state
    • Discover virtual hosts and hostname-selected applications
  • Functions, artifacts and content
    • Map functions, roles and normal requests manually
    • Inspect source, backups, configuration and repository artifacts
    • Discover directories and files with controlled response filtering
  • Inputs, objects and APIs
    • Map parameters, API methods, objects and writable properties

Tools & scripts

curl upstream ↗
Replay the real host, method, cookie and input.
Gobuster upstream ↗
Discover paths after measuring a missing-path response.
ffuf upstream ↗
Fuzz one boundary in a valid request; preserve its session.
Burp Suite upstream ↗
Capture and compare normal requests before modifying inputs.

Application identity and hosts

Establish scheme, host, redirects and request state

Contents ↑

Use when: An HTTP endpoint, redirect or hostname-dependent response

Needs: Correct scheme/port and virtual host; saved cookies/headers for authenticated comparisons

Shell commands

# Baseline
curl -skL -D headers.txt -o body.html http://TARGET:PORT/
curl -sk -o /dev/null -w 'code=%{http_code} bytes=%{size_download} type=%{content_type} redirect=%{redirect_url}\n' http://TARGET:PORT/

# Variant — explicit virtual-host candidate
curl -sk -H 'Host: CANDIDATE.DOMAIN' http://TARGET:PORT/

# Variant — preserve cookies and follow redirects
curl -skL -c cookies.txt -b cookies.txt http://TARGET:PORT/PATH

# Variant — replay through Burp Community
curl -sk -x http://127.0.0.1:8080 http://TARGET:PORT/PATH

Decisive output: record the scheme, hostname/Host header, port, redirects, page title, certificate names, server/framework clues and whether the view is anonymous or authenticated.

Use a separate cookie jar per identity. Do not mix anonymous, ordinary-user and administrator evidence.

Confirm the proxy listener is active on 127.0.0.1:8080. Use -k only for the controlled lab because it disables destination-certificate verification.

Read / verify → Record final URL, host, status, redirects, cookies and authentication context before comparing payload results.

If it fails → A redirect loop or generic default page may indicate a wrong host or missing session rather than a nonexistent application.

  • DNS names, redirects, certificate names or a default virtual-host response → Discover virtual hosts and hostname-selected applications
  • Forms, downloads, exports, account functions or role-specific interfaces → Map functions, roles and normal requests manually
  • JavaScript endpoints, backup names, exposed configuration or Git metadata → Inspect source, backups, configuration and repository artifacts

Prerequisite checks & examples →Full technique →

Discover virtual hosts and hostname-selected applications

Contents ↑

Use when: DNS names, redirects, certificate names or a default virtual-host response

Needs: A destination listener, relevant domain candidates and controlled Host/SNI routing

Shell commands

# Baseline
gobuster vhost -u http://DOMAIN:PORT/ --append-domain -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt -o vhosts.txt

# Alternative with automatic calibration
ffuf -w WORDLIST -u http://TARGET:PORT/ -H 'Host: FUZZ.DOMAIN' -ac -o ffuf-vhosts.json

Failure cue: uniform status/length may be the default vhost. Compare each candidate with a random host header before adding it to the application map.

Read / verify → Compare candidate and nonexistent-host responses, including content and redirects; resolve to the intended scoped address.

If it fails → A default response for every host or an SNI mismatch makes the result inconclusive; do not treat every guessed hostname as a real application.

  • An HTTP endpoint, redirect or hostname-dependent response → Establish scheme, host, redirects and request state
  • Forms, downloads, exports, account functions or role-specific interfaces → Map functions, roles and normal requests manually
  • A DNS server, domain name or host aliases → Expand names through DNS records and zone transfers

Prerequisite checks & examples →Full technique →

Functions, artifacts and content

Map functions, roles and normal requests manually

Contents ↑

Use when: Forms, downloads, exports, account functions or role-specific interfaces

Needs: A normal request baseline and the relevant account/role; authorized accounts for role comparisons

Client commands / example output

# Baseline
METHOD PATH | CONTENT-TYPE | ACCESS CONTEXT/ROLE
INPUT LOCATION + NAME | BASELINE VALUE
STATUS | LENGTH/HASH | REDIRECT | MARKER/ERROR/TIME
OBJECT/FUNCTION SELECTED | NEXT ONE-VARIABLE TEST

Next: a browser-side restriction is not server authorization. Replay the raw request and change one field, object reference, method or access-context element at a time.

Read / verify → Retain method, route, input location, identity and expected normal behavior; do not infer vulnerability from an interesting parameter name.

If it fails → Expired sessions, CSRF failures and malformed requests can imitate access-control differences; reproduce a valid baseline first.

  • A request selects an object by ID/path and two authorized ownership contexts are available → Cross an object-ownership boundary
  • A download/path parameter or URL segment influences a local filename → Read files through directory traversal
  • An upload/import/attachment function → Establish upload acceptance, storage and retrieval
  • Controlled input appears in a server-rendered template, preview, email or report → Prove server-side template evaluation and identify its engine
  • A working XML request reaches a server-side parser that accepts a controlled document or field → Use an XML parser's external-entity behavior for bounded file read
  • A login or search accepts JSON/nested form properties and evidence suggests an operator-based document query → Test structured NoSQL operator injection with identity controls
  • Source or request evidence shows controlled serialized PHP data reaches unsafe unserialize → Match PHP deserialization gadgets to installed dependencies
  • Source or errors identify server-side Python YAML loading of controlled content → Validate unsafe YAML object construction
  • A real CGI endpoint invokes Bash and component/patch evidence supports the vulnerable family → Test Shellshock only through a confirmed CGI-to-Bash chain
  • An application has unlinked paths, backups or administration endpoints → Discover directories and files with controlled response filtering

Prerequisite checks & examples →Full technique →

Inspect source, backups, configuration and repository artifacts

Contents ↑

Use when: JavaScript endpoints, backup names, exposed configuration or Git metadata

Needs: Readable application artifact or a complete recoverable repository; preserve the public-source scope

Shell commands

# Baseline
curl -sk http://TARGET:PORT/robots.txt
curl -sk http://TARGET:PORT/sitemap.xml
curl -sk http://TARGET:PORT/.git/HEAD
curl -sk http://TARGET:PORT/openapi.json
curl -sk http://TARGET:PORT/swagger.json

# Baseline
curl -ski http://TARGET:PORT/.git/HEAD
curl -ski http://TARGET:PORT/.git/config

# Baseline
git-dumper http://TARGET:PORT/.git/ repo-output
git -C repo-output status
git -C repo-output log --oneline --all --decorate
git -C repo-output log -p --all

Decisive output: a path, parameter, API schema, object identifier, component or secret-bearing artifact that creates a specific next request. Source disclosure is not command execution.

Shell commands

git-dumper is an optional third-party helper; install on demand in an isolated environment only when the exposure has been confirmed. Manual object recovery is possible but slower.

# Baseline
rg -ni 'password|passwd|token|secret|api[_-]?key|private[_-]?key' repo-output
git -C repo-output log --all -S'password' --oneline
git -C repo-output log --all -G'pass(word)?|secret|token' --oneline

# Inspect candidate commits without dumping all history
git -C repo-output show COMMIT -- PATH
git -C repo-output diff COMMIT^ COMMIT -- PATH

Validate freshness, identity and compatible use. Removed historical values are often rotated or environment-specific.

Read / verify → Confirm actual file/history content and distinguish a historical secret from a usable current credential.

If it fails → A 200 soft-404 or incomplete object database is not a recovered repository. Compare known-missing paths and record missing history.

  • A secret-like value, key file, stored hash, challenge response or ticket → Classify the artifact and its identity context
  • A product/version clue, advisory or component-specific public PoC → Match a public exploit to the actual component and configuration
  • An API/schema, numeric object IDs, hidden fields or different HTTP methods → Map parameters, API methods, objects and writable properties

Prerequisite checks & examples →Full technique →

Discover directories and files with controlled response filtering

Contents ↑

Use when: An application has unlinked paths, backups or administration endpoints

Needs: Correct base URL/session and a measured nonexistent-path response; bounded relevant wordlist

Shell commands

# Baseline
gobuster dir -u http://TARGET:PORT/ -w /usr/share/wordlists/dirb/common.txt -t 10 -o gobuster-root.txt

# Variant — technology-aware extensions
gobuster dir -u http://TARGET:PORT/ -w WORDLIST -x php,txt,bak,old,zip -t 10 -o gobuster-ext.txt

# Variant — authenticated discovery
gobuster dir -u http://TARGET:PORT/ -w WORDLIST -c 'SESSION=VALUE' -H 'Authorization: Bearer TOKEN' -t 10 -o gobuster-auth.txt

# Variant — filter a confirmed wildcard body length
gobuster dir -u http://TARGET:PORT/ -w WORDLIST --exclude-length NOISE_LENGTH -t 10 -o gobuster-filtered.txt

Decisive output: manually verified routes including useful 200, redirect, 401, 403 and 405 responses.

Use only the cookie or header that applies. An expired session can turn every result into the same login redirect.

Read / verify → Open candidates and record their actual behavior; status/length alone is only a selection clue.

If it fails → Aggressive filters can hide genuine routes and rate limiting can fabricate differences; validate the baseline and reduce the request rate.

  • Forms, downloads, exports, account functions or role-specific interfaces → Map functions, roles and normal requests manually
  • JavaScript endpoints, backup names, exposed configuration or Git metadata → Inspect source, backups, configuration and repository artifacts
  • An upload/import/attachment function → Establish upload acceptance, storage and retrieval

Prerequisite checks & examples →Full technique →

Inputs, objects and APIs

Map parameters, API methods, objects and writable properties

Contents ↑

Use when: An API/schema, numeric object IDs, hidden fields or different HTTP methods

Needs: A valid request and explicit role/object ownership; exact input format and content type

GET parameter names

# GET parameter names
ffuf -w /usr/share/seclists/Discovery/Web-Content/burp-parameter-names.txt -u 'http://TARGET:PORT/PATH?FUZZ=test' -ac -o params-get.json

# POST form parameter names
ffuf -w WORDLIST -u http://TARGET:PORT/PATH -X POST -H 'Content-Type: application/x-www-form-urlencoded' -d 'known=value&FUZZ=test' -ac -o params-post.json

# Object values with an authenticated API
ffuf -w NUMBERS -u 'http://TARGET:PORT/api/objects/FUZZ' -H 'Authorization: Bearer TOKEN' -mc all -fc 404 -o object-values.json

# ffuf — preserve a captured authenticated request
# HTTPS request, including its original method and session headers
ffuf -request request.txt -request-proto https -w WORDLIST -mc all -ac -t 10 -o request-https.json

# Plain HTTP request: otherwise ffuf defaults to HTTPS
ffuf -request request.txt -request-proto http -w WORDLIST -mc all -ac -t 10 -o request-http.json

Decisive output: a manually reproduced parameter or value that changes application behavior. Tool outliers are candidates, not confirmed access-control flaws.

Read: compare an outlier's status/length/body with a known missing value, then replay that exact request. A login redirect for every value → refresh the session before continuing. A one-time CSRF token → repair token handling; the saved-request flag does not refresh it automatically.

Ffuf — preserve a captured authenticated request

Read: compare an outlier's status/length/body with a known missing value, then replay that exact request. A login redirect for every value → refresh the session before continuing. A one-time CSRF token → repair token handling; the saved-request flag does not refresh it automatically.

# ffuf — preserve a captured authenticated request
curl -ski http://TARGET:PORT/api/v1/PATH
curl -ski -X OPTIONS http://TARGET:PORT/api/v1/PATH
curl -ski -X POST -H 'Content-Type: application/json' -d '{"username":"TEST_USER","password":"TEST_PASSWORD"}' http://TARGET:PORT/api/v1/login

Build a matrix across anonymous, user A, user B and administrator contexts where available

Interpretation: 405 can establish that a route exists but rejects the method. Validation errors can reveal required fields. A token establishes only the authorization demonstrated by a later request.

# Build a matrix across anonymous, user A, user B and administrator contexts where available
PATH | METHOD | IDENTITY/ROLE | OBJECT/PROPERTY | RESULT | NEXT

Read / verify → Prove which input is consumed and whether state changes persist in an independent read.

If it fails → HTTP 400/415 may indicate encoding/schema rather than security enforcement. Keep a valid request before changing permissions-related properties.

  • API objects expose role, ownership or security-sensitive properties → Modify a protected property through excessive writable fields
  • A request selects an object by ID/path and two authorized ownership contexts are available → Cross an object-ownership boundary
  • An input appears in a command-like operation or causes shell-dependent behavior → Prove visible or blind operating-system command injection
  • Database errors or controlled true/false response differences → Establish SQL query influence and DBMS context
  • Untrusted input reaches an executable HTML/JavaScript context → Execute browser code and validate a useful same-origin action
  • URL import, preview, webhook or fetch behavior → Use server-side requests to inspect reachable internal behavior

Prerequisite checks & examples →Full technique →

First pass: tools and findings

Use the steps matching your current access. Follow a concrete finding instead of completing every technique in order.

Capture a real request before fuzzing

Use the browser/proxy to capture the real method, host, cookie and input; curl is the replay baseline.

curl -skD headers.txt -o body.html http://TARGET:PORT/
curl -skI https://TARGET:PORT/
  • If Redirect to a different hostname → Discover virtual hosts and hostname-selected applications

    Resolve and replay that hostname before testing paths.

  • If A login, upload or object endpoint → Map parameters, API methods, objects and writable properties

    Capture its normal authenticated request and available roles.

Otherwise: Every request reaches the wrong/default site: fix the host/scheme/session first. Open Establish scheme, host, redirects and request state →

Full commands & alternatives →

Discover paths with Gobuster or the documented ffuf variant

First request a missing path to learn the false-positive body/status/length. Keep the correct host and session.

gobuster dir -u http://TARGET:PORT/ -w /usr/share/wordlists/dirb/common.txt -t 10 -o gobuster-root.txt
  • If A backup, config, source or repository path → Inspect source, backups, configuration and repository artifacts

    Read its content; a 200 response alone does not establish an artifact.

  • If A new application function → Map parameters, API methods, objects and writable properties

    Map its parameters and authorization boundary.

Otherwise: All candidates look identical: repair the response controls rather than collecting more false positives. Open Discover directories and files with controlled response filtering →

Full commands & alternatives →

Enumerate hostname-selected sites

Use this when DNS, certificates, redirects or page content suggest another hostname.

gobuster vhost -u http://DOMAIN:PORT/ --append-domain -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt -o vhosts.txt
  • If A host has a distinct response → Map functions, roles and normal requests manually

    Browse it with the correct Host header and repeat function/path mapping.

Otherwise: No distinct host: return to real application functions and exposed scripts. Open Map functions, roles and normal requests manually →

Full commands & alternatives →

Additional organization and gap review informed by 0xsyr0/OSCP ↗. Tool links open upstream sources.

HomeProjectsToolsNotes
Interactive toolsOSCP notes ↗Extended OSCP workspace ↗Attack-path visualizer ↗

© 2026 Armaan. Built with curiosity.

GitHub ↗GMT+8