Star

CTF Methodology

General

  • Take note of CTF keywords
    • CTF name -> Reference to any technology?
  • Themed CTF?
    • Take note of possible username / password
  • Scan all ports with Nmap
  • Services
    • SSH
      • Do you have id_rsa?
        • Use it to login
        • Password is required?
          • ssh2john id_rsa > id_rsa.hash & crack it
    • Samba (SMB)
      • smbclient -L //<IP>
      • enum4linux <IP>
      • Check HackTricks
    • FTP
      • Anonymous login
      • Can I write? (maybe only some folders) -> nmap check
        • Any script runs with a cronjob?
      • Can you navigate? Interested files? passwd?
      • Check HackTricks
    • Database
    • Unknown service
      • Check HackTricks
      • Check Google
        • pentest <service name / port number>
        • hack <service name / port number>
        • ctf <service name / port number> [beware of possible spoilers]
    • Re-use credentials
    • Hydra bruteforce
      • Fasttrack.txt
      • Rockyou.txt

WebServer

Strange strings?

Steganography

Cracking

  • PGP
    • Do you have .pgp and .asc files?
      • gpg2john file.asc > hash
      • john --wordlist=<PATH> hash
      • gpg --import file.asc
      • gpg --decrypt file.pgp #!/bin/bash
  • ZIP
    • zip2john -> crack password
    • View file name
    • fcrackzip -> brute force (password <7)
    • bkcrack (known plaintext attack) https://github.com/kimci86/bkcrack/tree/master
      • The newer scheme for password-protecting zip files (with AES-256, rather than “ZipCrypto”) does not have this weakness.

PrivEsc

privilege-escalation.md