Ctf forensics

From NoorQureshi/security-skills · View interactive version

Ctf forensics is an AI agent skill from the GitHub repository NoorQureshi/security-skills. CTF forensics playbook — quick wins on pcaps, memory dumps, disk images, and stego files: binwalk carving, Wireshark object export, Volatility's five commands that solve most memory challenges, steghide/zsteg/exiftool stego battery. Load when the handout is a capture, image, or dump file. Signals: "

How to use this skill

Skill file

CTF forensics and stego

When it applies

The handout is an artifact to investigate: a packet capture, memory dump, disk image, or an

innocent-looking media file. This skill is the CTF quick-win battery — the 80% of challenges that

fall to standard tooling run in the right order. For real-IR depth (timelines, root cause,

attacker methodology) defer to defense-dfir-triage, defense-malware-triage,

defense-log-analysis; here the only objective is finding the flag in the haystack.

Why it works

CTF forensics artifacts are constructed, not organic: the flag was placed by an author using a

standard technique (appended data, an HTTP download, a deleted file, an LSB embedding), and each

technique has a canonical tool. Running the standard battery in order surfaces the planted

artifact faster than clever hypotheses, because the author used the same tools you have.

Method

  1. Universal first pass (every file, 2 minutes).

```

file <f>; exiftool <f>; strings -n 8 <f> | grep -iE 'flag|pass|key|{' ; binwalk <f>

```

file lying about the type (wrong extension/magic) is itself a classic stage one. Metadata

(exiftool) hides flags in comment/author/GPS fields. binwalk -eM extracts embedded archives

recursively — appended zip-after-image is the most common stage one of all.

  1. pcap (.pcap/.pcapng).

or the one giant stream is the lead.

images) come out whole.

-e http.request.uri` for quick scripting.

payload bytes, TLS where a keys.log/RSA key is provided (set the key log in preferences).

  1. Memory dumps (.mem/.raw/.vmem) — Volatility 3, the five that solve most:

```

vol -f dump.mem windows.info # profile/OS

vol -f dump.mem windows.pslist # the odd process (notepad, mspaint, truecrypt)

vol -f dump.mem windows.cmdline # commands with passwords/flags as args

vol -f dump.mem windows.filescan | grep -iE 'flag|secret|\.zip|\.png'

vol -f dump.mem windows.dumpfiles --physaddr <addr> # carve the file out

```

Then per the story: hashdump (crack the SAM), malfind, clipboard/notepad plugins, browser

history plugins. And the cheap shot first: strings dump.mem | grep flag{.

  1. Disk images (.dd/.img/.E01). Mount or autopsy-free carve:

are where flags hide; recover by inode with icat.

damaged or the challenge is raw.

second partition is a classic).

  1. Stego battery (images/audio) — run all, not one.

description words); stegseek for fast passphrase cracks; outguess; check DCT with

stegoveritas which runs the whole battery at once.

text), compare against an original if the challenge gives one (diff = the payload).

reversed audio; DTMF tones (decode with a dial-tone decoder).

  1. Chain the stages. CTF forensics is layered: binwalk gives a password-protected zip → the

password is in pcap stream 7 → the zip has a QR image → zsteg on the QR. When a stage yields a

password/key, apply it to every locked artifact you already hold.

Gotchas

binwalk sees a zip at offset 0x100 → carve from there).

false-positive signatures at huge offsets.

a different OS build or it's a Linux dump (needs a custom profile / linux.* plugins).

linked song. Try them before brute-forcing.

(memory dump, deleted note); don't brute a VeraCrypt container, hunt the hint.

tools (pcrt, online QR fixers) beat redrawing by hand.

Verify success

A flag in the event format extracted from the artifact, with a reproducible extraction path (the

exact tool chain and parameters) written down — other players' flags differ, so "found a string"

must survive re-running the battery from the original handout file.

References

Volatility 3 docs; Sleuth Kit (fls/icat/mmls); Wireshark object export; stegoveritas,

zsteg, stegseek. IR-grade methodology: defense-dfir-triage, defense-malware-triage.

Triage via ctf-methodology.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.