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/Usable access/Credentials

REFERENCE / 10 TASKS

Credentials

Identify the password, hash, key or ticket first. Use the matching client or recovery tool, then verify which account and service it actually unlocks.

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.

  • Classification and online use
    • Classify the artifact and its identity context
    • Validate known passwords and context-specific reuse
  • Offline recovery and protected files
    • Recover passwords with feasible dictionary, rule and mask attacks
    • Recover a protected KeePass database password
    • Inspect and recover SSH private-key access
    • Recover Linux account passwords from matched records
  • Typed Windows/domain material
    • Recover or reuse an NT password hash
    • Recover a password from a captured NTLM response
    • Recover a password from cached domain logon verifiers
    • Classify tickets and use a compatible cache

Tools & scripts

Hashcat upstream ↗
Select the identified artifact format and feasible candidate strategy.
John the Ripper upstream ↗
Extract a supported verifier, recover offline, then validate access.
RunasCs upstream ↗
Use known plaintext credentials from an existing Windows shell.

Classification and online use

Classify the artifact and its identity context

Contents ↑

Use when: A secret-like value, key file, stored hash, challenge response or ticket

Needs: Artifact provenance and format; possible local/domain/application identity and compatible protocol

Client commands / example output

# Baseline
SOURCE -> MATERIAL/FORMAT -> LOCAL/DOMAIN/APPLICATION IDENTITY
-> POSSIBLE USE -> SERVICE/PROTOCOL -> AUTHENTICATION
-> AUTHORIZATION -> NEW ACCESS -> RE-ENUMERATION

Preserve the source and identity context, then identify the format

Record source, claimed identity, format evidence, possible uses, tested service, result and resulting rights together.

MaterialRecognitionCompatible use
Cleartext passwordText tied to an identity/sourceNormal protocol/application login
SSH private keyOpenSSH/PEM private-key blockSSH public-key authentication; recover passphrase offline if protected
Linux password recordUSER:$id$salt$digest:...Offline recovery with complete record/format
Application/file verifierTool-specific $...$ or documented digestOffline recovery with matching mode/parser
NT hashUsually 32 hex from SAM/LSASS/NTDS contextOffline recovery; PtH where NTLM and the client support it
Net-NTLMv2 responseUSER::DOMAIN:challenge:proof:blobOffline recovery or live relay under specific conditions; not PtH material
DCC2/MSCache v2Username-dependent cached-domain verifierOffline recovery; not ordinary PtH material
Kerberos ticket.kirbi, ccache or in-memory cacheTicket-specific access subject to realm, SPN, validity, clock and route
Kerberos roast material$krb5asrep$... or $krb5tgs$...Offline recovery with matching enctype/mode
Session/API tokenCookie, bearer/JWT or application tokenIssuing application and authorization context only

Do not feed unknown strings into random modes. Preserve the source and identity context, then identify the format:

# Preserve the source and identity context, then identify the format
hashid HASH_OR_FILE
john --list=formats | grep -i KEYWORD
hashcat -hh | grep -i KEYWORD
hashcat --example-hashes | less
OutputTypeImmediate compatible possibilitiesNot valid as
Cleartext passwordReusable secretPassword authentication, key derivation, DPAPI where applicableProof of authorization
NT hashNTLM keyOffline crack; PTH where NTLM/service policy allows; Kerberos RC4 transition where supportedNet-NTLM response or DCC2
AES128/AES256 keyKerberos long-term keyRequest Kerberos material using compatible toolingDirect NTLM authentication
.kirbi / ccacheKerberos ticket containerUse while valid for its client/realm/SPN scopePassword/hash
DCC2/MSCache v2Offline verifierOffline crackingPTH
DPAPI key/blobProtected-data materialDecrypt only with matching context/keysGeneral logon credential
Machine-account keyComputer identityMap the computer account's rights and Kerberos/NTLM pathsHuman/domain-admin identity

Net-NTLMv2 relay is a live authentication path, not hash reuse

A captured Net-NTLMv2 response is suitable for offline recovery, but cannot be passed as an NT hash. A relay path instead needs a fresh inbound NTLM authentication event, a different reachable target that accepts the relayed protocol, target protections that permit the exchange, and useful authorization for the relayed identity.

For an explicitly selected SMB destination, inspect signing behavior before considering it a relay receiver:

# Net-NTLMv2 relay is a live authentication path, not hash reuse
nmap -p 445 --script smb2-security-mode TARGET

Every newly usable identity returns to Block 10 before movement

Interpret: signing required closes the ordinary SMB-to-SMB relay receiver path. Signing enabled but not required is only one prerequisite; it does not supply an authentication source, bypass EPA/channel binding on another protocol, or grant the relayed identity useful rights.

The current OSCP+ exam guide prohibits poisoning/spoofing. Do not use Responder-style name-resolution poisoning in the exam workflow. A direct, already-existing authentication source still needs a separately reviewed, scope-compliant relay procedure and an action-specific verification; the incomplete procedure is tracked as RW09.

Every newly usable identity returns to Block 10 before movement:

# Every newly usable identity returns to Block 10 before movement
VERIFY MATERIAL -> AUTHENTICATE SAFELY -> CONFIRM IDENTITY
                -> MAP GROUPS/RIGHTS/SHARES/HOSTS/ROUTES

Read / verify → Identify artifact type, source, account/domain and compatible next operation; record unknowns instead of guessing.

If it fails → A 32-character hexadecimal value is not enough to identify its algorithm. Use application/source evidence and converters.

  • A password tied to a plausible user and service → Validate known passwords and context-specific reuse
  • A supported stored verifier or converted protected artifact → Recover passwords with feasible dictionary, rule and mask attacks
  • A ccache/kirbi file or an existing ticket cache → Classify tickets and use a compatible cache
  • A readable KeePass database and possible associated key file → Recover a protected KeePass database password
  • A private key from a file read, share, repository or home directory → Inspect and recover SSH private-key access
  • Readable password verifiers and account metadata → Recover Linux account passwords from matched records
  • An NT verifier from an appropriate credential source → Recover or reuse an NT password hash
  • A complete challenge-response record → Recover a password from a captured NTLM response
  • A DCC2/MSCache record from matched SECURITY/SYSTEM material → Recover a password from cached domain logon verifiers

Prerequisite checks & examples →Full technique →

Validate known passwords and context-specific reuse

Contents ↑

Use when: A password tied to a plausible user and service

Needs: Correct local/domain/application identity, reachable compatible service, accepted authentication and account state

Use the normal client for the observed service

# Use the normal client for the observed service
ssh -o PreferredAuthentications=password -p PORT USER@TARGET
nxc smb TARGET -d DOMAIN -u USER -p 'PASSWORD' --shares
evil-winrm -i TARGET -u USER -p 'PASSWORD'
xfreerdp /v:TARGET /u:'DOMAIN\USER' /p:'PASSWORD' /cert:ignore

# Local Windows account
nxc smb TARGET --local-auth -u USER -p 'PASSWORD' --shares

# Variant — known user, targeted password dictionary
hydra -l USER -P WORDLIST -s PORT -t 4 -f ssh://TARGET
hydra -l USER -P WORDLIST -t 1 -f rdp://TARGET

# Variant — one password across an authorized user list
hydra -L USERS -p 'PASSWORD' -s PORT -t 1 rdp://TARGET
nxc smb TARGET -d DOMAIN -u USERS -p 'PASSWORD' --continue-on-success

# Capture a correct request and stable failure marker with Burp
hydra -l USER -P WORDLIST TARGET http-post-form \
  '/LOGIN_PATH:username=^USER^&password=^PASS^:F=STABLE_FAILURE_TEXT'

Decisive output: the destination service accepts the intended identity. Share, session or action access is a separate authorization result.

Use only on an assigned target after checking lockout and rate controls. Confirm every reported success with the normal client.

Dynamic CSRF tokens, cookies, redirects, throttling and uniform responses require manual handling or a different approach. A weak failure marker creates false positives.

RunasCs — test a known password from an existing Windows shell

Use a reviewed, compatible build on the current Windows host with a known plaintext password. This creates a new local process/logon context; it is not remote execution and does not turn an NT hash into a password.

REM RunasCs — test a known password from an existing Windows shell
REM Domain account: verify the new process token
RunasCs.exe USER PASSWORD "cmd /c whoami /all" -d DOMAIN

REM Local account: omit the domain switch for the current host's account
RunasCs.exe USER PASSWORD "cmd /c whoami /all"

REM Network-only credentials: local identity stays unchanged
RunasCs.exe USER PASSWORD "cmd /c dir \\TARGET\SHARE" -d DOMAIN -l 9

Read: in the first two forms, whoami identifies the created process; inspect its groups/integrity before claiming escalation. With logon type 9, local whoami is not a credential test: use the remote operation's result. Logon failure → check account scope, password and permitted logon type. An accepted logon with access denied → inspect authorization on that resource.

RunasCs — test a known password from an existing Windows shell

Read: in the first two forms, whoami identifies the created process; inspect its groups/integrity before claiming escalation. With logon type 9, local whoami is not a credential test: use the remote operation's result. Logon failure → check account scope, password and permitted logon type. An accepted logon with access denied → inspect authorization on that resource.

# RunasCs — test a known password from an existing Windows shell
accepted identity -> groups/roles -> reachable services -> shares/files
-> authenticated application behavior -> accessible hosts/routes
-> new credentials/tickets/sessions -> privilege and movement handoffs

RunasCs — test a known password from an existing Windows shell

Verify destination host, accepted identity and actual read/write/execute rights. New hosts/listeners return to discovery; recovered material returns here; operating-system execution enters session handling; domain identities enter AD mapping.

REM RunasCs — test a known password from an existing Windows shell
net accounts /domain

RunasCs — test a known password from an existing Windows shell

# RunasCs — test a known password from an existing Windows shell
Get-DomainPolicyData | Select-Object -ExpandProperty SystemAccess

Password validation belongs to the existing credential procedure. Do not spray by default. If explicitly required, account for lockout threshold, duration, observation window and prior failures; use one justified candidate, stop on lockout/rate-limit evidence and preserve successful identities separately.

Read / verify → Record exact identity, service and tested read/write/session effect; classify authentication and authorization separately.

If it fails → Account disabled, expired password, wrong domain and denied logon require different responses. Avoid repeating a known-valid password against a denied action.

  • SMB/RPC endpoints, domain clues or new credentials → Enumerate SMB/RPC shares, files and identities
  • A credential appears valid but the destination's usable access is unknown → Match route, destination service and effective authorization
  • An SSH service and a known password, private key or agent context → Use SSH passwords, keys and forwarding-capable access

Prerequisite checks & examples →Full technique →

Offline recovery and protected files

Recover passwords with feasible dictionary, rule and mask attacks

Contents ↑

Use when: A supported stored verifier or converted protected artifact

Needs: Correct format/mode, complete salt/context, justified candidates and an available offline tool/backend

Shell commands

# Baseline
hashcat -b -m MODE
python3 -c "print((CHARSET_SIZE ** LENGTH) / GUESSES_PER_SECOND)"

Prefer candidates in this order

# Prefer candidates in this order
exact recovered/default candidates -> organization/user/product words
-> observed policy and mutations -> small dictionary plus rules
-> known mask/hybrid -> broader curated lists/rules
-> exhaustive search only when its measured cost is defensible

Preview mutations before spending the candidate budget

# Preview mutations before spending the candidate budget
hashcat -r /usr/share/hashcat/rules/best64.rule --stdout wordlist.txt | head -n 50
john --wordlist=wordlist.txt --rules=Jumbo --stdout | head -n 50

# Baseline
hashcat -a 0 -m MODE hashes.txt wordlist.txt -r /usr/share/hashcat/rules/best64.rule --session job
hashcat -m MODE hashes.txt --show

# Baseline
hashcat -h | grep -Ei 'NTLM|NetNTLMv2|KeePass|OpenSSH'

# Mask and session variants
hashcat -m MODE hashes.txt -a 3 '?u?l?l?l?l?d?d?d' --session targeted-mask
hashcat --session targeted-mask --restore

# Hybrid variant — base word plus three digits
hashcat -a 6 -m MODE hashes.txt wordlist.txt '?d?d?d' --session targeted-hybrid

Mask order is a hypothesis about structure. Estimate its keyspace before committing time.

Hybrid variant — base word plus three digits

Use only when evidence supports both the base words and suffix shape.

# Hybrid variant — base word plus three digits
john --wordlist=/usr/share/wordlists/rockyou.txt hash.txt
john --show hash.txt

# Hybrid variant — base word plus three digits
john --format=FORMAT --wordlist=wordlist.txt --rules=Jumbo hash.txt
john --session=crack-job --wordlist=wordlist.txt hash.txt
john --restore=crack-job

# File-to-hash converters
zip2john archive.zip > archive.hash
7z2john archive.7z > archive.hash
ssh2john id_rsa > ssh.hash
keepass2john vault.kdbx > keepass.hash
pdf2john document.pdf > pdf.hash
office2john document.docx > office.hash
rar2john archive.rar > rar.hash
unshadow passwd.copy shadow.copy > linux.hash

# Converter availability varies by package/path; locate it rather than assuming
command -v ssh2john || find /usr/share/john -maxdepth 2 -iname '*2john*' 2>/dev/null

Preserve the complete converter output. Some formats include a filename label before : that John accepts but Hashcat may require removed from a separate tool-specific copy.

Read / verify → Use the tool's show/result output and then validate the recovered credential in its correct context.

If it fails → Token/separator errors imply wrong or incomplete input; no recovery means only the tested candidate space was exhausted.

  • A password tied to a plausible user and service → Validate known passwords and context-specific reuse
  • A private key from a file read, share, repository or home directory → Inspect and recover SSH private-key access
  • A user-owned SPN and a useful service-account relationship → Request a selected service ticket for offline service-account recovery

Prerequisite checks & examples →Full technique →

Recover a protected KeePass database password

Contents ↑

Use when: A readable KeePass database and possible associated key file

Needs: Complete database, compatible converter, and every required factor; a feasible password candidate strategy

Shell commands

# Baseline
keepass2john vault.kdbx > keepass.hash
john --wordlist=wordlist.txt keepass.hash
john --show keepass.hash

# Hashcat alternative after confirming KDBX/KDF and input format
hashcat -hh | grep -i keepass
hashcat -a 0 -m 13400 keepass.hash wordlist.txt -r /usr/share/hashcat/rules/best64.rule
hashcat -m 13400 keepass.hash --show

Mode 13400 covers common KeePass 1/2 AES formats. Installed help and example hashes decide for the actual file. A recovered master password still requires opening and validating the vault.

Read / verify → Open the database with all factors and distinguish vault credentials from target account credentials.

If it fails → Missing factors, unsupported versions or malformed conversion require fixing the input, not endless password guessing.

  • A secret-like value, key file, stored hash, challenge response or ticket → Classify the artifact and its identity context
  • A password tied to a plausible user and service → Validate known passwords and context-specific reuse
  • JavaScript endpoints, backup names, exposed configuration or Git metadata → Inspect source, backups, configuration and repository artifacts

Prerequisite checks & examples →Full technique →

Inspect and recover SSH private-key access

Contents ↑

Use when: A private key from a file read, share, repository or home directory

Needs: Correct key format, passphrase if encrypted, matching server account/key authorization and accepted algorithm/policy

Shell commands

# Baseline
ssh2john id_rsa > ssh.hash
john --wordlist=wordlist.txt ssh.hash
john --show ssh.hash
chmod 600 id_rsa
ssh-keygen -y -f id_rsa > derived.pub
ssh -vv -i id_rsa -o IdentitiesOnly=yes -p PORT USER@TARGET

# Hashcat variant — only for a supported OpenSSH format
hashcat -hh | grep -i 'OpenSSH\|Private Key'
hashcat -a 0 -m MODE ssh.hash wordlist.txt -r RULE_FILE

Choose MODE from the complete $sshng$... structure and installed help. Token-length or unsupported-cipher errors require a compatible parser/tool, not --force with a wrong mode.

Read / verify → Verify the key parses and an SSH authentication/session succeeds under the correct target identity.

If it fails → Invalid format, line endings, wrong passphrase and server rejection are separate layers.

  • An SSH service and a known password, private key or agent context → Use SSH passwords, keys and forwarding-capable access
  • SSH reaches a server that can access the needed internal service → Forward a selected service through an SSH client-side listener
  • A password tied to a plausible user and service → Validate known passwords and context-specific reuse

Prerequisite checks & examples →Full technique →

Recover Linux account passwords from matched records

Contents ↑

Use when: Readable password verifiers and account metadata

Needs: Correct passwd/shadow pairing or known hash format; account identity and a feasible recovery strategy

Shell commands

# Baseline
unshadow passwd.copy shadow.copy > linux.hash
john --wordlist=wordlist.txt --rules=Jumbo linux.hash
john --show linux.hash

Read / verify → Tie the recovered password to the correct user and validate an allowed login/sudo transition.

If it fails → Mismatched snapshots or locked/expired accounts can defeat use even after recovery; inspect account state.

  • A password tied to a plausible user and service → Validate known passwords and context-specific reuse
  • sudo -l grants an operation under a more useful identity → Use an allowed sudo operation to cross a privilege boundary
  • A new Linux foothold or an identity/privilege change → Establish Linux state and choose an escalation candidate

Prerequisite checks & examples →Full technique →

Typed Windows/domain material

Recover or reuse an NT password hash

Contents ↑

Use when: An NT verifier from an appropriate credential source

Needs: Correct account/domain and actual NT hash; recovery mode or an accepting NTLM service with required destination rights

Offline recovery

# Offline recovery
hashcat -a 0 -m 1000 nt.hash wordlist.txt -r /usr/share/hashcat/rules/best64.rule
john --format=NT --wordlist=wordlist.txt nt.hash

# Compatible SMB validation
nxc smb TARGET -d DOMAIN -u USER -H NT_HASH --shares
smbclient //TARGET/SHARE -U 'DOMAIN\USER' --pw-nt-hash NT_HASH

# Variant — remote access/execution when the identity has matching rights
impacket-wmiexec -hashes :NT_HASH 'DOMAIN/USER@TARGET'
impacket-psexec -hashes :NT_HASH 'DOMAIN/USER@TARGET'
xfreerdp /v:TARGET /u:'DOMAIN\USER' /pth:NT_HASH /cert:ignore

Read / verify → Verify source/type, identity context and the exact permitted service action.

If it fails → Local/domain confusion, remote UAC and denied NTLM are different from an invalid hash. Use tickets only when their own prerequisites exist.

  • A password, actual NT hash, AES/NT long-term key or ticket is available → Select password, NT hash, key-to-ticket or ticket authentication
  • A password tied to a plausible user and service → Validate known passwords and context-specific reuse
  • A destination grants administrative-share write and service-control rights → Execute through uploaded service creation using PsExec

Prerequisite checks & examples →Full technique →

Recover a password from a captured NTLM response

Contents ↑

Use when: A complete challenge-response record

Needs: Correct challenge/response formatting and feasible candidates; acquisition method must fit the allowed context

Shell commands

# Baseline
hashcat -a 0 -m 5600 netntlmv2.hash wordlist.txt
john --format=netntlmv2 --wordlist=wordlist.txt netntlmv2.hash

A Net-NTLMv2 response is not an NT hash and cannot be supplied to -H or -hashes. Relay forwards a live authentication exchange and requires received/coerced authentication, compatible protocols, signing/channel-binding conditions and useful rights.

The OSCP+ exam prohibits spoofing, including NBNS. Do not use Responder poisoning on the exam. Keep capture/relay work to explicitly authorized labs and recheck the current guide.

Read / verify → Retain response provenance and recovered account/password mapping; confirm relevant login rights separately.

If it fails → Incomplete captures or wrong separators break recovery. Prohibited spoofing/poisoning workflows are not an operational exam acquisition method.

  • A password tied to a plausible user and service → Validate known passwords and context-specific reuse
  • A supported stored verifier or converted protected artifact → Recover passwords with feasible dictionary, rule and mask attacks
  • Domain credentials or a domain-joined foothold → Establish domain identity, DC, DNS, time and route

Prerequisite checks & examples →Full technique →

Recover a password from cached domain logon verifiers

Contents ↑

Use when: A DCC2/MSCache record from matched SECURITY/SYSTEM material

Needs: Correct username/salt/iteration context and feasible offline candidates

Shell commands

# Baseline
hashcat -hh | grep -i 'Domain Cached'
john --format=mscash2 --wordlist=wordlist.txt dcc2.hash

Read / verify → Confirm artifact format, account mapping and current password acceptance.

If it fails → No recovery does not disprove account existence; stale cached credentials may fail current online authentication.

  • A password tied to a plausible user and service → Validate known passwords and context-specific reuse
  • Domain credentials or a domain-joined foothold → Establish domain identity, DC, DNS, time and route
  • A supported stored verifier or converted protected artifact → Recover passwords with feasible dictionary, rule and mask attacks

Prerequisite checks & examples →Full technique →

Classify tickets and use a compatible cache

Contents ↑

Use when: A ccache/kirbi file or an existing ticket cache

Needs: Correct principal/realm, valid lifetime, service scope, compatible cache format and naming/KDC route

Inspect before use

# Inspect before use
klist
KRB5CCNAME=TICKET.ccache klist
impacket-ticketConverter TICKET.kirbi TICKET.ccache

# Compatible client example
export KRB5CCNAME=TICKET.ccache
impacket-wmiexec -k -no-pass 'DOMAIN/USER@HOST.DOMAIN'

Read / verify → Inspect principal, ticket service, realm and lifetime, then verify the actual service action.

If it fails → Expired tickets, wrong hostname/SPN, cache format and time skew require different fixes; an IP-only connection can break correct Kerberos naming.

  • A valid ticket/cache or a long-term key that can request a TGT → Inventory, convert and import tickets in the correct logon context
  • A password, actual NT hash, AES/NT long-term key or ticket is available → Select password, NT hash, key-to-ticket or ticket authentication
  • An IP connection works while hostname/Kerberos access fails → Preserve DNS, Kerberos names and time across a pivot

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.

Identify the artifact before using a cracking tool

Keep provenance and local/domain/application account scope. Hash-looking text is not automatically an NT hash.

file FILE
head -c 160 FILE
  • If A plaintext password → Validate known passwords and context-specific reuse

    Test the matching identity on one relevant reachable service.

  • If An SSH private key → Inspect and recover SSH private-key access

    Check key format, protection and the intended account.

  • If A ticket/cache → Classify tickets and use a compatible cache

    Check principal, service scope, expiry and a compatible client.

Otherwise: Format is still unknown: inspect the artifact before selecting a Hashcat/John mode. Open Classify the artifact and its identity context →

Full commands & alternatives →

Use Hashcat/John only after format identification

Select the documented format-specific mode and an offline candidate list; recovery is not proof of service access.

hashcat -a 0 -m MODE hashes.txt wordlist.txt -r /usr/share/hashcat/rules/best64.rule --session job
hashcat -m MODE hashes.txt --show
  • If A password is recovered → Validate known passwords and context-specific reuse

    Validate the account scope and relevant service permission.

  • If A reusable NT hash rather than a recoverable plaintext password → Recover or reuse an NT password hash

    Use only protocols and clients supporting that material.

Otherwise: No recovery: revisit artifact type and feasible candidates; enumerate other evidence instead of assuming the account is unusable. Open Classify the artifact and its identity context →

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