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
← All web mapping tasks

Establish scheme, host, redirects and request state

CommandsIf → thenExplanation & examples

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.

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. More detail ↓

If → then

  • DNS names, redirects, certificate names or a default virtual-host response → Discover virtual hosts and hostname-selected applications

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

  • Forms, downloads, exports, account functions or role-specific interfaces → Map functions, roles and normal requests manually

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

  • JavaScript endpoints, backup names, exposed configuration or Git metadata → Inspect source, backups, configuration and repository artifacts

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

No useful finding → another task in this topic. Failed check → resolve the failure before ruling out the path.

Explanation & examples

Establish scheme, host, redirects and request state

USE WHEN
An HTTP endpoint, redirect or hostname-dependent response
STARTING ACCESS
A reachable HTTP application and recorded anonymous or authenticated request state
RESULT
A reproducible application identity and baseline request

Recognize the clue

Request the assigned HTTP endpoint without following redirects blindly; inspect location, cookies and alternate scheme/hostname behavior.

curl -skD headers.txt -o body.html http://TARGET:PORT/
curl -skI https://TARGET:PORT/
SYNTHETIC EXAMPLE OUTPUT
HTTP/1.1 302 Found
Location: https://HOSTNAME/
Set-Cookie: SESSION_COOKIE

Means: The hostname/scheme redirect identifies the application request context to reproduce.

Confirm: Confirm the hostname routes to the assigned address and preserve its TLS/Host/session state.

After validation
The correct named request reaches a distinct application: map its functions.
Ruled out in this context
The candidate name produces only the default missing-host response: discard that virtual-host inference.
Still inconclusive
Redirect loops can mean missing cookies/host routing; repair the normal request before testing vulnerabilities.

Troubleshooting: A redirect loop or generic default page may indicate a wrong host or missing session rather than a nonexistent application.

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.

Variant — explicit virtual-host candidate

Compare it with a random hostname. A different status alone is weak evidence; compare body, length, title and redirects.

Variant — preserve cookies and follow redirects

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

Variant — replay through Burp Community

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.

Why it works

TLS SNI, Host, redirects and cookies can select different applications. A response from the IP URL does not describe every hostname served by that listener.

Worked example · hypothetical

Observation: the IP URL redirects to a hostname. Test: send the correct Host/SNI while routing to the assigned address. Illustrative output: a distinct application login appears. Interpretation: map that application separately.

New identity, privilege, host or route? Re-enumerate → All topic tasks →

Study guide ↗Full procedure ↗Cheatsheet ↗
HomeProjectsToolsNotes
Interactive toolsOSCP notes ↗Extended OSCP workspace ↗Attack-path visualizer ↗

© 2026 Armaan. Built with curiosity.

GitHub ↗GMT+8