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/Initial access/Public exploits
← All public exploits tasks

Repair a web PoC using the real HTTP transaction

CommandsIf → thenExplanation & examples

Needs: A valid baseline transaction with correct host, base path, session/CSRF state and request encoding

Before changing the script, reproduce the relevant request with Burp or curl and compare

# Before changing the script, reproduce the relevant request with Burp or curl and compare
curl -i -X METHOD 'SCHEME://HOSTNAME:PORT/PATH' \
  -H 'Host: HOSTNAME' \
  -H 'Cookie: COOKIE' \
  --data 'PARAM=VALUE'

# For a scoped lab with a known self-signed certificate
curl -k -i 'https://HOSTNAME:PORT/PATH'

In Python Requests, use a session when cookies or defaults must persist

# In Python Requests, use a session when cookies or defaults must persist
with requests.Session() as session:
    response = session.get(url, timeout=10)
    print(response.status_code, response.url)
    print(response.headers)
    print(response.text[:500])

Set verify=False only for a scoped test after confirming the certificate problem; it disables certificate and hostname validation. Prefer a supplied CA bundle when possible.

Parser cue: IndexError, missing-key and regular-expression failures mean the received response did not have the assumed shape. Print status, final URL, headers and a bounded body fragment before rewriting the parser. Common causes are a changed path, redirect, failed login, CSRF change, error page, proxy/WAF response or certificate handling.

Verify → Check the target action/output rather than trusting the PoC's success string.

If it fails → A normal HTTP response can be an authentication or parsing failure. Separate application request repair from payload/callback diagnosis. More detail ↓

If → then

  • An input appears in a command-like operation or causes shell-dependent behavior → Prove visible or blind operating-system command injection

    Needs: Input reaches command execution with an exploitable parsing boundary; process identity/runtime can perform the selected proof

  • A PoC, injected command or remote client reports execution → Verify command execution, host and represented identity

    Needs: A functioning execution primitive and an observable output or controlled side effect

  • A simple command works while a longer or nested payload fails → Repair quoting, encoding and command-length boundaries

    Needs: Known outer request/template/database parser and inner shell; correct character encoding and transport length

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

Explanation & examples

Repair a web PoC using the real HTTP transaction

USE WHEN
An exploit sends requests but authentication, routing or parsing differs from the target
STARTING ACCESS
An identified component/build and a candidate exploit with reviewable source
RESULT
A PoC that reproduces the relevant application request and a separately verified effect

Recognize the clue

Capture the application's real valid transaction and compare it with the PoC's request path, login/session sequence and response parser.

curl -sk -i -b cookies.txt http://TARGET:PORT/PATH
SYNTHETIC EXAMPLE OUTPUT
PoC response: HTTP/1.1 302 Found
Location: /login
Actual browser request includes a fresh CSRF token

Means: The request never reached the protected operation; the success parser may be reading a login response.

Confirm: Restore valid host/path/session/CSRF state, then independently verify the exploit effect.

After validation
The reconstructed request reaches the intended operation and the effect is observed: continue that candidate.
Ruled out in this context
The real operation/schema is incompatible with the PoC's vulnerable feature: reject it.
Still inconclusive
A normal HTTP response without authenticated operation evidence leaves exploitation inconclusive.

Troubleshooting: A normal HTTP response can be an authentication or parsing failure. Separate application request repair from payload/callback diagnosis.

Before changing the script, reproduce the relevant request with Burp or curl and compare:

For a scoped lab with a known self-signed certificate:

In Python Requests, use a session when cookies or defaults must persist:

Set verify=False only for a scoped test after confirming the certificate problem; it disables certificate and hostname validation. Prefer a supplied CA bundle when possible.

Parser cue: IndexError, missing-key and regular-expression failures mean the received response did not have the assumed shape. Print status, final URL, headers and a bounded body fragment before rewriting the parser. Common causes are a changed path, redirect, failed login, CSRF change, error page, proxy/WAF response or certificate handling.

Why it works

Web exploit assumptions often fail at login, cookie handling, URL construction or response parsing before the vulnerable behavior is reached. Reconstruct the request before editing payload logic.

Worked example · hypothetical

Observation: the PoC reports success after a redirect to login. Test: compare its request with the authenticated browser baseline. Illustrative output: a missing CSRF token prevented the protected request. Interpretation: repair that state, then independently test the claimed effect.

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