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/Discovery/Discovery
← All discovery tasks

Identify applications and validate selected NSE checks

CommandsIf → thenExplanation & examples

Needs: A reachable selected port; scripts must match the application and permitted assessment behavior

4. Identify discovered applications

Purpose: Identify applications on discovered ports and choose only the probing needed for the next decision.

# 4. Identify discovered applications
nmap -sT -n -sV -p PORTS -oA scans/tcp-services TARGET

# Identify applications on discovered ports
nmap -sT -n -sV -sC -p PORTS -oA scans/tcp-services-default TARGET

# Lighter version probing when time or fragile service behavior matters
nmap -sT -n -sV --version-light -p PORTS -oA scans/tcp-services-light TARGET

# Inspect behavior locally
nmap --script-help http-headers

# After identifying HTTP, inspect its relevant port(s)
nmap -sT -n -p PORTS --script http-headers -oA scans/http-headers TARGET

# Estimate OS from network-stack behavior
sudo nmap -n -O -oA scans/os TARGET

# Request more tentative OS guesses
sudo nmap -n -O --osscan-guess -oA scans/os-guesses TARGET

# Bundle OS/version detection, default scripts and traceroute
sudo nmap -sS -n -A -oA scans/combined-detail TARGET

Next: choose service-specific enumeration from application evidence. A version match alone does not establish exploitability.

Light mode tries fewer uncommon probes and can miss an identity that the default intensity finds. Use the default first unless a concrete constraint justifies the tradeoff.

OS guesses are hypotheses. These use default TCP coverage; -A does not mean all ports. Choose this bundle only when its additional probing is useful.

Verify → Preserve the responding product/version evidence and distinguish an inferred fingerprint from a confirmed vulnerable build.

If it fails → A timeout, generic banner or scanner label leaves identity inconclusive; use native protocol clients or the unknown-port method. More detail ↓

If → then

  • A nonstandard listener, slow TCP discovery or a scanner-specific candidate → Discriminate unknown listeners and use scanner alternatives

    Needs: Explicit bounded scope; raw scanning alternatives need their required privileges and conservative rates

  • An HTTP endpoint, redirect or hostname-dependent response → Establish scheme, host, redirects and request state

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

  • A product/version clue, advisory or component-specific public PoC → Match a public exploit to the actual component and configuration

    Needs: Exact vulnerable build/configuration, required access and endpoint behavior; reviewable source and a verifiable expected effect

  • An rsync daemon banner, TCP/873 listener or disclosed rsync module → Inspect rsync modules and retrieve selected artifacts

    Needs: Reachable rsync daemon and a module/path readable by the anonymous or supplied account

  • A UDP/69 service plus a plausible filename from configuration, source or boot metadata → Retrieve an evidence-backed file over TFTP

    Needs: Reachable TFTP service and an exact server-relative filename permitted for read or write

  • An FTP banner or accessible listing → Use anonymous or authenticated FTP file access

    Needs: Anonymous login allowed or a valid FTP identity; data-channel connectivity and object-specific read/write rights

  • An SSH service and a known password, private key or agent context → Use SSH passwords, keys and forwarding-capable access

    Needs: Compatible authentication method, correct user, accepted key policy and the requested shell/subsystem permission

  • SMTP capabilities or mail-related account clues → Enumerate SMTP identities and accessible mailbox protocols

    Needs: Reachable SMTP/POP3/IMAP service; enumeration or mailbox access must be enabled for the selected context

  • A DNS server, domain name or host aliases → Expand names through DNS records and zone transfers

    Needs: Reachable DNS transport and relevant authoritative zone; AXFR requires an allowed TCP zone transfer

  • RPC/NFS listeners or export information → Inspect RPC/NFS exports and effective file identity

    Needs: Reachable RPC/NFS transports, permitted client address and an export whose UID/GID mapping grants relevant access

  • SMB/RPC endpoints, domain clues or new credentials → Enumerate SMB/RPC shares, files and identities

    Needs: Reachable SMB/RPC; anonymous, guest, local or domain context must be explicit; share and filesystem ACLs both matter

  • UDP/161 evidence or an exposed management plane → Extract configuration and process information through SNMP

    Needs: An accepted read community or SNMPv3 identity/security level; transport and view permissions

  • A MySQL-compatible service and valid application/database credentials → Use MySQL/MariaDB data and file primitives

    Needs: Database authentication and exact schema/file privileges; secure_file_priv and server filesystem identity constrain file actions

  • SQL Server credentials or a Windows identity accepted by the database → Use SQL Server rights, impersonation and command facilities

    Needs: Correct SQL versus Windows authentication; database role and configuration must permit the requested operation

  • PostgreSQL access or an application connection string → Use PostgreSQL data and privileged program execution

    Needs: Accepted connection/database role; COPY PROGRAM needs the corresponding server privilege and an executable OS context

  • A Redis listener or application cache credentials → Inspect Redis access and persistence boundaries

    Needs: Reachability and accepted authentication/ACL commands; persistence writes need CONFIG rights, destination permissions and a consumer

  • An Oracle TNS listener or connection descriptor → Triage Oracle listener and database identity

    Needs: Correct service/SID, reachable database transport and valid database credentials for authenticated work

  • An exposed remote-access application and compatible known credentials → Validate RDP, WinRM, VNC and Telnet access contexts

    Needs: Enabled destination service, matching authentication and protocol-specific logon/session rights

  • LDAP/Kerberos listeners or a probable AD domain → Discover LDAP naming contexts and authenticated search

    Needs: Reachable directory; anonymous query permission or valid bind identity; required signing/TLS and naming context

  • A confirmed SIP or IRC application → Investigate SIP/IRC identity and configuration clues

    Needs: Application-specific request format; permitted registration/channel/configuration access

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

Explanation & examples

Identify applications and validate selected NSE checks

USE WHEN
A listener has a port-based label or uncertain version
STARTING ACCESS
An explicitly assigned address or host list and a known source position
RESULT
Application and version evidence sufficient to choose service enumeration or an exploit candidate

Recognize the clue

Take the discovered open-port list and request protocol/version evidence rather than choosing attacks from conventional port numbers.

nmap -Pn -sV -p PORTS TARGET -oA selected-services
SYNTHETIC EXAMPLE OUTPUT
18080/tcp open http APPLICATION_SERVER
Service detection performed

Means: An HTTP response on a nonstandard port routes investigation to application mapping; a product string is still only fingerprint evidence.

Confirm: Verify normal requests, hostname/TLS requirements and exact build/configuration before selecting an exploit.

After validation
Native protocol responses agree with the fingerprint: use that service's enumeration guide.
Ruled out in this context
A presumed SSH port instead speaks HTTP: discard the SSH-specific method for that endpoint.
Still inconclusive
Generic banners or timeouts do not identify a build; try protocol-aware/TLS discrimination.

Troubleshooting: A timeout, generic banner or scanner label leaves identity inconclusive; use native protocol clients or the unknown-port method.

Additional prerequisite checks

nmap -Pn -sV -p PORTS TARGET -oA selected-services
nmap --script-help SCRIPT_NAME

Purpose: Identify applications on discovered ports and choose only the probing needed for the next decision.

4. Identify discovered applications

Next: choose service-specific enumeration from application evidence. A version match alone does not establish exploitability.

Variants — default scripts, named scripts and OS fingerprints

Identify applications on discovered ports

Version probing plus the default NSE script set: use when those scripts answer relevant enumeration questions.

Read the application evidence and script results. Default scripts add interactions; they do not complete service enumeration or prove exploitability.

Lighter version probing when time or fragile service behavior matters:

Light mode tries fewer uncommon probes and can miss an identity that the default intensity finds. Use the default first unless a concrete constraint justifies the tradeoff.

Select a named script

Inspect behavior locally:

After identifying HTTP, inspect its relevant port(s):

Returned headers are clues. Choose scripts for the question they answer and their behavior.

OS fingerprinting and bundled probing

Estimate OS from network-stack behavior:

Request more tentative OS guesses:

Bundle OS/version detection, default scripts and traceroute:

OS guesses are hypotheses. These use default TCP coverage; -A does not mean all ports. Choose this bundle only when its additional probing is useful.

Why it works

Port numbers and banners suggest a protocol; application responses and exact configuration constrain an exploit. NSE results remain candidates when the check cannot prove the vulnerable condition.

Worked example · hypothetical

Observation: port 8443 is labelled HTTPS but the product is unknown. Test: version probes and a normal HTTP request. Illustrative output: a named management product and login route. Interpretation: map authentication and verify the build before exploit selection.

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