Lab 7 of 17 · By Michael Stout
In this lab
Read the steps, then try them in your lab environment.
Decode and defang artifacts with CyberChef
Chapter 3 lists decoding and parsing data and files as a core technique for determining malicious activity. GCHQ's CyberChef — nicknamed “the Cyber Swiss Army Knife” — chains dozens of those operations together in a browser tab, entirely offline once downloaded.
One tool, chained operations
A phishing payload or a malware config is rarely encoded once. It's often Base64, then gzipped, then hex — and unwinding that by hand in a scripting console is slow and error-prone. CyberChef lets you drag operations into a chain and watch the output update live, so you can see exactly which layer you're peeling off.
Because CyberChef is a single self-contained web page, you can download it once and run it with no internet connection — useful on an isolated analysis machine, and safer for handling anything actually sensitive.
What you'll need
Any modern browser. No account, install, or server — it's one HTML file.
Nothing sensitive. Use the practice strings in this lab, not real IOCs from a live incident.
15–20 minutes.
Download, don't just bookmark
- Try it online first. Open
gchq.github.io/CyberChefto see the live version and confirm it's what you expect before downloading anything. - Get the offline build. Go to
github.com/gchq/CyberChef/releases, open the latest release, and download the packaged zip from its Assets — not the “Source code” zip, which needs a build step. - Run it locally. Extract the zip and open
index.htmlin your browser. Everything runs client-side — nothing you paste in ever leaves your machine.
Chain operations, don't run them one at a time
- Decode a nested string. Paste
VGhpcyBpcyBhIHRlc3Qgc3RyaW5nLg==into the input. Drag From Base64 from the operations list into the Recipe panel. The output updates instantly — that's the whole loop. - Chain a second step. Search for To Hex and drag it below From Base64 in the recipe. Now you're seeing the same text re-encoded — this is how you'd unwind something layered twice.
- Defang an IOC for a report. New input:
hxxp://185.220.101.5/payload.exeis how analysts usually write a URL so it can't be clicked by accident. Try the Defang URL and Defang IP Addresses operations on a live one to see them do it automatically. - Let it guess. Paste in an unfamiliar-looking string and drag in the Magic operation — it tries common decodings automatically and suggests what your input might be.
Once you're comfortable, treat real indicators from an active investigation the way your organization's data handling policy requires — the offline build helps, but it doesn't replace that policy.
Sources. GCHQ, CyberChef, gchq.github.io/CyberChef, releases at github.com/gchq/CyberChef/releases.