Learn · Tier 4 · Module 8 of 10
To the terminal
Difficulty 4 and 5 need tools on your own computer. Install Wireshark, tshark, curl and Python, and redo two earlier puzzles with them.
The idea
The workspace covers difficulty 1 to 3. Harder puzzles need what a browser cannot do: run a real binary, use a large Python library, handle a capture of hundreds of megabytes, or keep a script running for an hour. From tier 4 on, you work on your own computer.
Nothing you learned changes. Each workspace tool has showed its terminal equivalent all along:
| Workspace | Your computer | Install |
|---|---|---|
| Pcap viewer | Wireshark, tshark | wireshark.org, or your package manager |
| Request console | curl | already installed on most systems |
| Notebook | python3 with requests | python.org; pip install requests |
| Decoder | CyberChef (any browser), or base64, xxd, Python | gchq.github.io/CyberChef, or nothing |
| Hex viewer | xxd, strings, file | included in Linux and macOS |
A safe place to work
Puzzle files are real malware samples, given harmless names (.txt, .sample) so they never run by accident. Keep it that way:
- Work in one folder, such as
~/necropsy. - Read samples; do not run them. When a puzzle needs a binary run, it says so, and you do it in a virtual machine with no network, not on your own system.
- Your antivirus may flag samples. That is expected: they are malware. Excluding one folder is safer than turning protection off.
Installing
Linux (Debian, Ubuntu):
sudo apt install wireshark tshark curl python3 python3-pip python3-requests python3-cryptography xxd binutils
sudo usermod -aG wireshark "$USER" # capture without root; log out and in again
macOS: install Homebrew from brew.sh, then:
brew install --cask wireshark
brew install python
python3 -m pip install requests cryptography
curl, xxd and strings are already there.
Windows: install Wireshark (tshark is included) from wireshark.org and Python from python.org (tick Add python.exe to PATH), then in PowerShell:
py -m pip install requests cryptography
curl.exe --version
In PowerShell, curl is an alias for Invoke-WebRequest; always type curl.exe. WSL (wsl --install) gives you a full Linux shell where every command in these modules works as written.
Check it works
tshark --version
curl --version
python3 -c "import requests, cryptography; print('ok')"
Walkthrough: in the browser
This module is the same on both paths: it moves you to the terminal. Follow the install steps in the concept above for your system, then redo two puzzles you already solved in the browser.
Module 1 again, with tshark
- On the puzzle page of First capture, download
capture.pcap(the Raw link, or Files in the workspace). - Open a terminal in the folder you saved it to.
- Run the command from the workspace's pcap viewer Terminal line:
tshark -r capture.pcap -Y http.request. - Get the host and path of each request:
tshark -r capture.pcap -Y http.request -T fields -e http.host -e http.request.uri. - Open the same file in Wireshark, filter
http.request, and Follow > HTTP Stream on the download.
Module 3 again, with curl
- Start the Knock knock instance.
- Run the same commands you sent from the console, with
curl -iin your terminal. The console's Request sent andcurl -vshow the same request. - Then the same in Python with
requests, as in module 7.
When both work, you have everything the tier 4 and 5 puzzles need.
Practice
Checkpoint
Answers from either path count.