Phishing Triage · Attachment Forensics · BEC Investigation — Fully Adapted for Linux VM
Delight Cybersecurity · Workbook Series
This workbook is written entirely for a Linux VM. Every command runs in a standard terminal — no Windows required. The commands are written for Kali Linux, the recommended system for this series. They also work on Ubuntu, Debian and REMnux, with the differences noted below.
| Distro | Why It Works Well | Best For |
|---|---|---|
| Kali Linux ⭐ | ExifTool, pdfid and pdf-parser are in its package list; the rest installs with the block below | All students on this series |
| REMnux | Purpose-built malware analysis distro — ExifTool, oletools and oledump.py are pre-installed | Anyone who wants the least setup |
| Ubuntu 24.04 LTS | Stable and widely documented; pdfid and pdf-parser are not in its package list | Beginners to Linux |
| Debian 13 | Lightweight, stable, low resource use | Older hardware / small VMs |
Run this entire block once after creating your VM. It installs every tool used across all three labs.
# ── Step 1: Update package lists ──────────────────────────────────
sudo apt update
# ── Step 2: Tools from the package manager ────────────────────────
sudo apt install -y libimage-exiftool-perl python3-docx python3-olefile pipx \
file xxd binutils curl wget unzip git whois dnsutils ripmime qrencode zbar-tools
# ── Step 3: oletools (olevba, rtfobj, oleid) in its own environment ─
pipx install oletools
pipx ensurepath
# ── Step 4: oledump.py — a separate tool, NOT part of oletools ─────
mkdir -p ~/.local/bin
wget -O ~/.local/bin/oledump.py \
https://raw.githubusercontent.com/DidierStevens/DidierStevensSuite/master/oledump.py
sed -i '1s/python$/python3/' ~/.local/bin/oledump.py
chmod +x ~/.local/bin/oledump.py
# ── Step 5: PDF tools (Kali and REMnux; skip on Ubuntu and Debian) ─
sudo apt install -y pdfid pdf-parser
# ── Step 6: Optional — Thunderbird to open .eml files visually ────
sudo apt install -y thunderbird
# ── Now CLOSE the terminal, open a new one, and verify ────────────
echo "--- ExifTool ---" && exiftool -ver
echo "--- olevba ---" && olevba --help | head -1
echo "--- oledump ---" && oledump.py --version
echo "--- Python 3 ---" && python3 --version
echo "--- All done! ---"
olevba or oledump.py is "not found", you have not yet opened a new terminal. pipx ensurepath adds ~/.local/bin to your PATH for both zsh (Kali's default shell) and bash, but only for terminals opened afterwards.pip3 install. Older guides get round this with --break-system-packages, which can damage Python packages the operating system depends on. pipx installs each Python tool in its own isolated environment and is the supported method.which exiftool # → /usr/bin/exiftool
which olevba # → ~/.local/bin/olevba
which oledump.py # → ~/.local/bin/oledump.py
which pdf-parser # → /usr/bin/pdf-parser (Kali and REMnux only)
which ripmime # → /usr/bin/ripmime
python3 --version # → Python 3.11 or higher
# Create an isolated folder structure for all lab work
mkdir -p ~/email-threat-labs/{lab4,lab5,lab6,samples}
cd ~/email-threat-labs
ls -la # should show lab4 lab5 lab6 samples
# Always copy sample files INTO this directory before analysing them
# Never analyse files from ~/Downloads or the Desktop
Complete these three labs in order. Each builds on skills from the previous one. By the end, you will be able to triage a complete phishing email from first receipt through to a structured incident report — using only a Linux terminal and free web tools.
Metadata, macros, sandbox reports, RTF and PDF files, QR-code phishing, IOC identification.
⏱ ~110 min Security+ 2.3 · 2.5 · 4.1Header forensics, lookalike domains and spoofing, SPF/DKIM/DMARC/BIMI records, wire transfer fraud verification.
⏱ ~90 min Security+ 2.3 · 2.5 · 4.1 · 5.6End-to-end structured incident report: sender, links, attachment, affected users, actions — then awareness and metrics.
⏱ ~120 min Security+ 2.5 · 4.1 · 4.7 · 5.6| Tool | Purpose | How to Install on Linux |
|---|---|---|
| ExifTool | File metadata extraction | sudo apt install libimage-exiftool-perl |
| olevba / oletools | Office macro analysis | pipx install oletools |
| oledump.py | Low-level OLE stream inspection | Separate download — see the setup block |
| pdf-parser | PDF JavaScript / object inspection | sudo apt install pdfid pdf-parser (Kali, REMnux) |
| file | Detect true file type regardless of extension | Pre-installed on all Linux distros |
| sha256sum / md5sum | Generate hashes for VirusTotal lookup | Pre-installed on all Linux distros |
| strings | Extract readable text from any binary | sudo apt install binutils |
| whois | Domain registration lookup | sudo apt install whois |
| ripmime | Extract attachments from a saved email | sudo apt install ripmime |
| rtfobj | Find objects embedded in RTF files | Included with oletools |
| pdfid | Count risky features in a PDF | sudo apt install pdfid (Kali, REMnux) |
| zbarimg / qrencode | Read and create QR codes without a phone | sudo apt install zbar-tools qrencode |
| dig | Look up SPF, DKIM, DMARC and BIMI records in DNS | sudo apt install dnsutils |
| curl / wget | Download samples, query APIs from terminal | sudo apt install curl wget |
| VirusTotal | File & URL reputation | Web — virustotal.com |
| Any.run | Cloud sandbox (Windows environment); public reports can be read without uploading anything | Web — any.run |
| MXToolbox | Email header analysis | Web — mxtoolbox.com/EmailHeaders |
| URLScan.io | URL inspection without visiting the page yourself (scans are public by default) | Web — urlscan.io |
| AbuseIPDB | IP reputation check (free API) | Web + curl API — abuseipdb.com |
A user forwards an email with a suspicious Word document. Your job is to examine the file without executing it — extract metadata, detect hidden macros, then see how a cloud sandbox reveals its behaviour.
Security+ SY0-801 objectives: 2.3 (attachment-based threat vectors), 2.5 (indicators of compromise), 4.1 (sandboxing).
Use Option A unless your instructor tells you otherwise. It is completely safe and every command in this lab has been written to work with it. Options C and D involve real malware and are for instructor-supervised sessions only.
.docx or .xlsx file cannot contain a macro. Macros live in the older .doc / .xls formats and in the macro-enabled formats .docm, .dotm and .xlsm. A .docx can still be dangerous in other ways — for example by carrying a link, as the sample in this lab does.This creates two harmless files. suspicious_invoice.docx is a Word file with suspicious metadata and an embedded link. practice_macro.vba is the text of a macro that only displays a message box; olevba can analyse it exactly as it would a macro found inside a document. The address in both files is a reserved documentation address that does not exist.
# Create the Word file
python3 - <<'PYEOF'
import datetime, os, shutil, zipfile
from docx import Document
lab = os.path.expanduser("~/email-threat-labs/lab4")
os.makedirs(lab, exist_ok=True)
path = os.path.join(lab, "suspicious_invoice.docx")
doc = Document()
props = doc.core_properties
props.author = "builder01"
props.last_modified_by = "admin"
props.created = datetime.datetime(2025, 2, 14, 3, 21, 7)
props.modified = datetime.datetime(2025, 3, 1, 9, 44, 22)
doc.add_heading("Invoice #2025-0312", level=1)
doc.add_paragraph("Please find your outstanding payment details below.")
doc.add_paragraph("Amount due: $12,500.00")
doc.add_paragraph("Pay online now: http://198.51.100.47/pay/invoice-0312")
doc.save(path)
# python-docx cannot set the Company field, so patch it inside the ZIP
tmp = path + ".tmp"
with zipfile.ZipFile(path) as zin, zipfile.ZipFile(tmp, "w", zipfile.ZIP_DEFLATED) as zout:
for item in zin.infolist():
data = zin.read(item.filename)
if item.filename == "docProps/app.xml":
data = data.replace(b"<Company/>", b"<Company>UNKNOWN</Company>")
data = data.replace(b"Microsoft Macintosh Word", b"Microsoft Office Word")
data = data.replace(b"<AppVersion>14.0000", b"<AppVersion>16.0000")
zout.writestr(item, data)
shutil.move(tmp, path)
print(f"Test file created -> {path}")
PYEOF
# Create the practice macro (plain text — it cannot run)
cat > ~/email-threat-labs/lab4/practice_macro.vba <<'EOF'
' TRAINING SAMPLE - harmless. This macro only displays a message box.
' The address below is a reserved documentation address that does not exist.
Sub AutoOpen()
Dim updateServer As String
updateServer = "http://198.51.100.47/stage2.exe"
MsgBox "Training sample - this macro does nothing else."
End Sub
EOF
ls -lh ~/email-threat-labs/lab4/
LetsDefend provides phishing email samples as part of its SOC simulator. Each challenge gives you a downloadable .eml or attachment.
Steps:
~/email-threat-labs/lab4/MalwareBazaar hosts confirmed malicious Office documents tagged by family. All samples are zipped with password infected. Every API request now needs a free Auth-Key: sign in at auth.abuse.ch and create one in your profile. The same key works for ThreatFox and URLhaus. Take a VM snapshot first.
cd ~/email-threat-labs/lab4
# Keep your key in a variable for this terminal session — never save it in a script
read -s -p "Paste your abuse.ch Auth-Key: " ABUSECH_KEY; echo
# List recent samples tagged VBA and show their SHA256 hashes
curl -s -X POST https://mb-api.abuse.ch/api/v1/ \
-H "Auth-Key: $ABUSECH_KEY" \
-d 'query=get_taginfo&tag=VBA&limit=5' | python3 -m json.tool | grep sha256_hash
# Download one sample by its SHA256 hash (replace PASTE_SHA256_HERE)
curl -s -X POST https://mb-api.abuse.ch/api/v1/ \
-H "Auth-Key: $ABUSECH_KEY" \
-d 'query=get_file&sha256_hash=PASTE_SHA256_HERE' \
--output macro_sample.zip
# Unzip — password is always: infected
unzip -P infected macro_sample.zip
ls -lh
A curated repository of real malware samples for educational use. Take a VM snapshot before cloning.
# Clone into your samples directory
cd ~/email-threat-labs/samples
git clone https://github.com/ytisf/theZoo.git
# Browse the available samples
ls theZoo/malware/Binaries/ | head -40
cd ~/email-threat-labs/lab4
file suspicious_invoice.docx
# Expected: Microsoft Word 2007+ (ZIP)
# If it says something different, the extension may be faked
sha256sum suspicious_invoice.docx
md5sum suspicious_invoice.docx
exiftool suspicious_invoice.docx
exiftool -Creator -LastModifiedBy -Company \
-CreateDate -ModifyDate -Application \
suspicious_invoice.docx
# Field names differ by file type: Word files store the author as "Creator".
# If a field prints nothing, run plain "exiftool file" and read the real names.
exiftool -Producer -Creator -Author -CreateDate report.pdf
# List all files inside the docx without extracting
unzip -l suspicious_invoice.docx
# Extract and read the core metadata XML directly
mkdir /tmp/docx_inspect
unzip suspicious_invoice.docx -d /tmp/docx_inspect
cat /tmp/docx_inspect/docProps/core.xml
# Hunt for embedded URLs or IPs across all XML files
grep -rEo '(https?://[^ "<>]+|[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})' \
/tmp/docx_inspect/ | grep -vE 'schemas\.|w3\.org|purl\.org'
# The second grep removes the dozens of harmless format-definition addresses
# that every Word file contains, leaving only what the author put there
# Clean up
rm -rf /tmp/docx_inspect
File Name : suspicious_invoice.docx
Creator : builder01 ← Does NOT match the claimed sender "FedEx Billing"
Last Modified By : admin ← Generic admin account
Company : UNKNOWN ← Legitimate docs embed a company name
Create Date : 2025:02:14 03:21:07Z ← 3 AM creation — outside business hours
Modify Date : 2025:03:01 09:44:22Z
Application : Microsoft Office Word
file command confirm the extension matches the true file type?olevba lets you read the macro source safely — no execution risk.olevba --help | head -1
cd ~/email-threat-labs/lab4
olevba suspicious_invoice.docx
# Expected: "No VBA or XLM macros found." — correct, a .docx cannot hold one
olevba practice_macro.vba
# Expected: the macro source, then a table with AutoExec and IOC rows
AutoExec, Suspicious, IOColevba --decode --reveal practice_macro.vba
oledump.py suspicious_invoice.docx
# Expected here: "no OLE file was found" — this .docx has no macro container
# On a real macro document (.doc or .docm), streams holding macros are
# marked with 'M'. Dump one with:
oledump.py -s A3 -v macro_document.docm
# Replace A3 with whichever stream number shows 'M'
pdf-parser -s JavaScript suspicious.pdf
# On some systems the command is:
pdf-parser.py -s JavaScript suspicious.pdf
.docx is compressed, so strings finds nothing in it; read the text inside the ZIP instead. On an old-format .doc, strings works directly:
# .docx / .docm — look inside the ZIP
unzip -p suspicious_invoice.docx word/document.xml \
| sed 's/<[^>]*>/ /g' \
| grep -oiE '(https?://[^ ]+|powershell|cmd\.exe|wscript)'
# Old .doc format — strings works directly
strings old_format.doc \
| grep -iE '(http|powershell|cmd\.exe|base64|shell|wscript)'
Your practice macro produces the AutoExec and IOC rows. A real malicious macro typically shows all of these:
| Type | Keyword | What It Means |
|---|---|---|
| AutoExec | AutoOpen | Code runs the moment the document is opened — no user click required |
| Suspicious | Shell | Macro may launch an external application |
| Suspicious | PowerShell | Macro may invoke PowerShell (Windows command runner) |
| Suspicious | Base64 Strings | Obfuscated payload — deliberately encoded to evade antivirus |
| IOC | 198.51.100.47 | C2 IP address embedded in the macro |
| IOC | http://198.51.100.47/stage2.exe | Second-stage payload download URL |
Sub AutoOpen()
Dim cmd As String
cmd = "powershell -nop -w hidden -enc " & _
"aQBFAFgAIAAoAE4AZQB3AC0ATwBiAGoAZQBjAHQA..."
Shell cmd
End Sub
-w hidden — hides the terminal window from the victim (Windows flag)Your practice files are harmless, so detonating them would show nothing. Instead, study a report that someone else has already produced for a real malicious document. No upload and no account are needed to read public reports.
.doc, .docm or .xlsm)If you later need to submit a file yourself: a free Any.run account asks for a business email address (other applicants are verified through its Discord server), the free plan offers a Windows 10 64-bit environment, and every free submission is public. hybrid-analysis.com is an alternative with a free tier.
winword.exe spawning cmd.exe → powershell.exe is the classic malicious chain. Screenshot it for your report.
.exe, .dll, or .bat files written to %TEMP%, AppData, or ProgramData.
github.com/kevoreilly/CAPEv2 for setup instructions — requires nested VM support in your hypervisor..doc extension so that it looks like an ordinary Word file. A PDF can contain links, scripts and actions that fire when the file is opened. The method is the same as before: true type, hash, metadata, then look inside without opening.Both files are harmless. The RTF file is plain text with a link; the PDF contains a link and a script that would only display a message box. The address in both is a reserved documentation address.
cd ~/email-threat-labs/lab4
# An RTF file disguised with a .doc extension
cat > payment_advice.doc <<'EOF'
{\rtf1\ansi\deff0
{\fonttbl{\f0 Arial;}}
{\info{\author builder01}{\company UNKNOWN}{\title Payment Advice}}
\f0\fs24 PAYMENT ADVICE\par
\par
Your payment could not be processed. Review the details here:\par
{\field{\*\fldinst{HYPERLINK "http://198.51.100.47/pay/advice-7731"}}{\fldrslt{\ul View payment advice}}}\par
}
EOF
# A PDF with a link, an automatic action and a harmless script
python3 - <<'PYEOF'
import os
path = os.path.expanduser("~/email-threat-labs/lab4/delivery_notice.pdf")
link = "http://198.51.100.47/track/parcel-5521"
text = "Your parcel could not be delivered. Click here to reschedule."
stream = f"BT /F1 12 Tf 72 720 Td ({text}) Tj ET".encode()
objects = [
b"<< /Type /Catalog /Pages 2 0 R /OpenAction 6 0 R >>",
b"<< /Type /Pages /Kids [3 0 R] /Count 1 >>",
b"<< /Type /Page /Parent 2 0 R /MediaBox [0 0 612 792] /Contents 4 0 R "
b"/Resources << /Font << /F1 5 0 R >> >> /Annots [7 0 R] >>",
b"<< /Length %d >>\nstream\n" % len(stream) + stream + b"\nendstream",
b"<< /Type /Font /Subtype /Type1 /BaseFont /Helvetica >>",
b"<< /S /JavaScript /JS (app.alert\\('Training sample - harmless'\\);) >>",
b"<< /Type /Annot /Subtype /Link /Rect [72 710 420 735] "
b"/A << /S /URI /URI (" + link.encode() + b") >> >>",
b"<< /Author (builder01) /Creator (Unknown) /Producer (pdf-kit 0.1) "
b"/CreationDate (D:20250214032107Z) >>",
]
pdf = b"%PDF-1.4\n"
offsets = []
for number, body in enumerate(objects, start=1):
offsets.append(len(pdf))
pdf += b"%d 0 obj\n" % number + body + b"\nendobj\n"
xref = len(pdf)
pdf += b"xref\n0 %d\n0000000000 65535 f \n" % (len(objects) + 1)
for offset in offsets:
pdf += b"%010d 00000 n \n" % offset
pdf += b"trailer\n<< /Size %d /Root 1 0 R /Info 8 0 R >>\n" % (len(objects) + 1)
pdf += b"startxref\n%d\n%%%%EOF\n" % xref
with open(path, "wb") as f:
f.write(pdf)
print(f"Sample PDF created -> {path}")
PYEOF
ls -lh payment_advice.doc delivery_notice.pdf
# 1. True type — the extension says Word, the content says otherwise
file payment_advice.doc
# Expected: Rich Text Format data
# 2. Hash and metadata
sha256sum payment_advice.doc
exiftool -Author -Company -Title payment_advice.doc
# 3. olevba refuses it — and tells you which tool to use instead
olevba payment_advice.doc 2>&1 | tail -1
# 4. List embedded objects — the main danger in RTF files
rtfobj payment_advice.doc
# An empty table means no embedded objects. On a malicious file each row
# is an object; "Possibly an exploit" or an executable file name is a
# strong indicator.
# 5. RTF is text, so links can be read directly
grep -oE 'https?://[^ "}]+' payment_advice.doc
grep -c -E '\\(object|objdata)' payment_advice.doc # 0 = no embedded-object keywords
# 1. True type, hash and metadata
file delivery_notice.pdf
sha256sum delivery_notice.pdf
exiftool -Author -Creator -Producer -CreateDate delivery_notice.pdf
# 2. Count the risky features (Kali and REMnux)
pdfid delivery_notice.pdf
# Read the lines that are NOT zero. In this file:
# /OpenAction 1 something happens automatically when the file opens
# /JS /JavaScript 1 the file contains a script
# 3. Show the script and the link (Kali and REMnux)
pdf-parser -s JavaScript delivery_notice.pdf
pdf-parser -s URI delivery_notice.pdf
# 4. The same check on any Linux system, using strings
strings delivery_notice.pdf \
| grep -oE '/(OpenAction|JS|JavaScript|URI|Launch|EmbeddedFile)\b' | sort | uniq -c
strings delivery_notice.pdf | grep -oE 'https?://[^ )]+'
| pdfid keyword | What it means | Concern |
|---|---|---|
/OpenAction, /AA | An action runs automatically when the file or a page opens | High when combined with a script or launch action |
/JS, /JavaScript | The file contains a script | High — ordinary documents rarely need one |
/Launch | The file tries to start a program | Very high |
/EmbeddedFile | Another file is hidden inside the PDF | Extract it and analyse it separately |
/URI | The file contains a link | Check the destination; the most common lure today |
/ObjStm | Objects are stored compressed | Can hide the keywords above from simple searches |
file report a type that differs from the extension?rtfobj list any embedded objects in the RTF file?pdfid keywords were not zero, and what does each mean?cd ~/email-threat-labs/lab4
# Make the QR image, then wrap it in an email
qrencode -s 6 -o qr.png "https://mfa-enrol.acme-corp-security.example/setup?u=sarah.okafor"
python3 - <<'PYEOF'
import os
from email.message import EmailMessage
lab = os.path.expanduser("~/email-threat-labs/lab4")
with open(os.path.join(lab, "qr.png"), "rb") as f:
image = f.read()
msg = EmailMessage()
msg["Return-Path"] = "<security@acme-corp-security.example>"
msg["Received"] = ("from mail.acme-corp-security.example (mail.acme-corp-security.example [203.0.113.90]) "
"by mx1.acme-corp.example with ESMTPS id 3Kd8V5; "
"Tue, 18 Mar 2025 09:12:44 +0100")
msg["Message-ID"] = "<20250318081242.7730@mail.acme-corp-security.example>"
msg["Date"] = "Tue, 18 Mar 2025 09:12:42 +0100"
msg["From"] = '"Acme IT Security" <security@acme-corp-security.example>'
msg["To"] = "sarah.okafor@acme-corp.example"
msg["Subject"] = "Action required: re-enrol your authenticator app by Friday"
msg.set_content(
"Hello Sarah,\n\n"
"Our records show your multi-factor authentication enrolment expires\n"
"this Friday. To keep access to email and payroll, scan the QR code in\n"
"the attached image with your phone camera and follow the steps.\n\n"
"Acme IT Security\n", cte="7bit")
msg.add_attachment(image, maintype="image", subtype="png", filename="mfa_enrolment.png")
out = os.path.join(lab, "qr_phish.eml")
with open(out, "wb") as f:
f.write(msg.as_bytes())
os.remove(os.path.join(lab, "qr.png"))
print(f"Sample email created -> {out}")
PYEOF
# 1. Read the message and search it for links
sed '/^$/q' qr_phish.eml
grep -c 'https\?://' qr_phish.eml
# Expected: 0 — there is no link anywhere in the text for a filter to find
# 2. Extract the attached image
ripmime -i qr_phish.eml -d qr_extracted
ls qr_extracted
file qr_extracted/mfa_enrolment.png
# 3. Decode the QR code on your analysis machine — never with your phone
zbarimg --raw -q qr_extracted/mfa_enrolment.png
# 4. Record the result in defanged form
zbarimg --raw -q qr_extracted/mfa_enrolment.png | sed 's/^http/hxxp/; s/\./[.]/g'
mfa-enrol.acme-corp-security.example. The registered domain is acme-corp-security.example — a different domain from Acme's real acme-corp.example, with a reassuring word added. The ?u=sarah.okafor part identifies the victim, so the attacker knows exactly who scanned it.? tell the attacker?payment_advice.doc, and the non-zero pdfid keywords for the PDF with your interpretationThe finance department receives an urgent email appearing to come from the CFO requesting a $47,000 wire transfer. Your job is to determine whether it is legitimate — using header analysis, authentication checks, and company policy verification.
Security+ SY0-801 objectives: 2.3 (email and impersonation as threat vectors), 2.5 (spear phishing, whaling, impersonation), 4.1 (SPF, DKIM, DMARC, BIMI), 5.6 (BEC awareness).
The commands below create two plain-text email files. The first is the wire-transfer request, sent from a lookalike domain the attacker registered. The second is a follow-up that forges the company's real domain. Comparing the two is the heart of this lab. Acme's real domain is acme-corp.example.
# Email 1 — sent from a lookalike domain
cat > ~/email-threat-labs/lab5/bec_wire_transfer.eml <<'EOF'
Return-Path: <j.whitfield@acme-corps.example>
Received: from mx1.acme-corp.example (mx1.acme-corp.example [192.0.2.25])
by mailstore.acme-corp.example with ESMTPS id 7Fq2k1;
Fri, 14 Mar 2025 16:47:05 +0100
Authentication-Results: mx1.acme-corp.example;
spf=pass smtp.mailfrom=acme-corps.example;
dkim=pass header.d=acme-corps.example;
dmarc=pass (p=none) header.from=acme-corps.example
Received: from mail.acme-corps.example (mail.acme-corps.example [203.0.113.12])
by mx1.acme-corp.example with ESMTPS id 4Zx9Q0;
Fri, 14 Mar 2025 16:47:03 +0100
Message-ID: <20250314154701.GA12847@bulk-mailer.example.net>
Date: Fri, 14 Mar 2025 16:47:01 +0100
From: "James Whitfield" <j.whitfield@acme-corps.example>
Reply-To: j.whitfield.cfo@freemail.example
To: accounts.payable@acme-corp.example
Subject: URGENT -- Vendor Payment Required Today
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Hi Sarah,
I'm in a board meeting all afternoon and need you to process an urgent
wire transfer before close of business today. Our new vendor Apex
Logistics Solutions requires payment to initiate the Q2 contract.
Amount: $47,250.00
Bank: Example Bank (fictional)
Account: 0000-000-00 Routing: 000000000
Please action this immediately and do not cc anyone else -- this is
confidential until the contract is signed. I'll explain everything Monday.
James Whitfield
CFO, Acme Corporation
EOF
# Email 2 — forges the real company domain
cat > ~/email-threat-labs/lab5/bec_spoofed.eml <<'EOF'
Return-Path: <j.whitfield@acme-corp.example>
Received: from mx1.acme-corp.example (mx1.acme-corp.example [192.0.2.25])
by mailstore.acme-corp.example with ESMTPS id 9Lm3p7;
Fri, 14 Mar 2025 16:52:11 +0100
Authentication-Results: mx1.acme-corp.example;
spf=fail (sender not permitted) smtp.mailfrom=acme-corp.example;
dkim=none (message not signed);
dmarc=fail (p=none) header.from=acme-corp.example
Received: from unknown (HELO mail.acme-corp.example) [203.0.113.12]
by mx1.acme-corp.example with ESMTP id 2Bv8T4;
Fri, 14 Mar 2025 16:52:09 +0100
Message-ID: <20250314155207.GA12901@bulk-mailer.example.net>
Date: Fri, 14 Mar 2025 16:52:07 +0100
From: "James Whitfield" <j.whitfield@acme-corp.example>
Reply-To: j.whitfield.cfo@freemail.example
To: accounts.payable@acme-corp.example
Subject: RE: URGENT -- Vendor Payment Required Today
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Sarah, following up on my last message. Has the payment gone out?
I need confirmation in the next 30 minutes.
James Whitfield
CFO, Acme Corporation
EOF
ls -l ~/email-threat-labs/lab5/
These files are entirely safe — plain text with no executable content.
OpenPhish publishes a free feed of currently active phishing links. Every line is a live malicious URL: never open one in a browser. The command below prints five of them in defanged form, so they cannot be clicked by accident. (PhishTank, used in older guides, has closed new registrations and its bulk download now needs a key.)
cd ~/email-threat-labs/lab5
curl -s https://openphish.com/feed.txt | head -5 \
| sed 's/^http/hxxp/; s/\./[.]/g'
Note: the feed provides URLs, not full .eml files. Use them only for link-analysis practice with URLScan.io and VirusTotal.
LetsDefend includes guided BEC and phishing scenarios with real downloadable .eml files and automatic answer scoring.
.eml file from any BEC challenge~/email-threat-labs/lab5/ and use the commands in Part B belowBTLO has dedicated email forensics challenges that include .eml files containing spoofed BEC emails with real header data.
Website: blueteamlabs.online → Challenges → Email Analysis
Download the challenge file directly from your VM browser and save to ~/email-threat-labs/lab5/.
From, Reply-To, Message-ID, Date, and any Received lines below their own. The headers you can rely on are the ones your own mail servers added on arrival: the top Received lines and Authentication-Results.Received lines from the bottom up. Each server that handles a message adds its own line at the top, so the lowest line is the earliest hop and the highest is the last. The lowest line written by a server you trust shows the address the message really arrived from.cd ~/email-threat-labs/lab5
# ── 1. View the complete raw email ───────────────────────────────
cat bec_wire_transfer.eml
# ── 2. Show headers only (everything before the first blank line) ─
sed '/^$/q' bec_wire_transfer.eml
# ── 3. Compare the sender fields in BOTH emails ──────────────────
grep -i "^From:\|^Reply-To:\|^Return-Path:" bec_wire_transfer.eml bec_spoofed.eml
# ── 4. Check SPF / DKIM / DMARC results in each email ────────────
grep -i -A 3 "^Authentication-Results" bec_wire_transfer.eml
grep -i -A 3 "^Authentication-Results" bec_spoofed.eml
# ── 5. Trace the route: read these from the BOTTOM line upwards ──
grep -i -A 2 "^Received:" bec_wire_transfer.eml
# ── 6. Extract all IP addresses from the headers ─────────────────
grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' \
bec_wire_transfer.eml | sort -u
# ── 7. Is the sending IP a known Tor exit node? ──────────────────
curl -s "https://check.torproject.org/torbulkexitlist" | grep -c "^203.0.113.12$"
# Prints 0 here: 203.0.113.12 is a reserved documentation address.
# On a real case, 1 means the sender was hiding behind Tor.
# ── 8. Practise reading registration records on a real, safe target
whois google.com | grep -i "creation date\|registrar:"
whois 8.8.8.8 | grep -i "orgname\|country"
# On a real case you would look up the sender's domain and IP.
# A domain created days before the email arrived is a strong red flag.
http becomes hxxp and each dot becomes [.]. Example: hxxp://198[.]51[.]100[.]47/pay. To convert one from the terminal: echo "http://198.51.100.47/pay" | sed 's/^http/hxxp/; s/\./[.]/g'Email 1 — the lookalike domain. Everything passes:
Authentication-Results: mx1.acme-corp.example;
spf=pass smtp.mailfrom=acme-corps.example; ← passes — for the ATTACKER'S domain
dkim=pass header.d=acme-corps.example; ← passes — signed with the attacker's own key
dmarc=pass (p=none) header.from=acme-corps.example
Received: from mail.acme-corps.example (mail.acme-corps.example [203.0.113.12])
Message-ID: <20250314154701.GA12847@bulk-mailer.example.net> ← different domain again (weak hint)
From: "James Whitfield" <j.whitfield@acme-corps.example> ← one extra letter
Reply-To: j.whitfield.cfo@freemail.example ← free webmail
acme-corps.example, so they set up all three correctly and the email passes every check. Authentication tells you which domain sent the message; deciding whether that domain is the right one is still your job. The same is true when a criminal breaks into a real mailbox and sends from it.Email 2 — the forged real domain. The attacker claims to be acme-corp.example itself, which they do not control:
Authentication-Results: mx1.acme-corp.example;
spf=fail (sender not permitted) smtp.mailfrom=acme-corp.example;
dkim=none (message not signed);
dmarc=fail (p=none) header.from=acme-corp.example
Received: from unknown (HELO mail.acme-corp.example) [203.0.113.12] ← same attacker IP
From: "James Whitfield" <j.whitfield@acme-corp.example> ← looks perfect
p=none (monitor only), so the forgery was still delivered. A policy of p=quarantine or p=reject would have stopped it.
| Protocol | Result | Meaning | Verdict |
|---|---|---|---|
| SPF | pass | Sending server is on the domain's authorised list | ✅ Came from that domain's servers |
| SPF | fail | Sending server is NOT on the list | ❌ FAIL |
| SPF | softfail | Not on the list, but the domain asks receivers to be lenient | ⚠️ WARN |
| DKIM | pass | Valid signature from the domain named in header.d | ✅ Unaltered, and signed by that domain |
| DKIM | fail | A signature is present but does not verify — altered in transit or forged | ❌ FAIL |
| DKIM | none | The message was not signed at all | ⚠️ No evidence either way |
| DMARC | pass | SPF or DKIM passed for the same domain shown in the From address (this matching is called alignment) | ✅ The From domain is genuine |
| DMARC | fail | Neither passed for the From domain — the address is probably forged | ❌ FAIL |
| DMARC policy | p=none / p=quarantine / p=reject | What the domain owner asks receivers to do with failures: only report them, send to spam, or refuse | ℹ️ Set by the domain owner |
Email 1 comes from a lookalike domain (acme-corps.example) that passes authentication only because the attacker owns it. Email 2 forges the real domain and fails SPF and DMARC. Both arrive from the same IP address and both redirect replies to a free webmail account. Multiple social engineering techniques are present: urgency, secrecy, executive impersonation, unavailability excuse.
Do NOT action the wire transfer. Preserve all evidence. Report to IT Security, Finance leadership, and the real CFO immediately.
spf=, dkim= and dmarc= results. The receiving server produced them by looking up records that the sending domain publishes in DNS. Anyone can read those records. In this part you will look them up for real domains, then judge Acme's own setup. This part needs an internet connection.| Control | Where the record lives | What it publishes |
|---|---|---|
| SPF Sender Policy Framework | TXT record on the domain itself | The list of servers allowed to send mail for the domain |
| DKIM DomainKeys Identified Mail | TXT record at selector._domainkey.domain | The public key that verifies the signature on each message |
| DMARC Domain-based Message Authentication, Reporting and Conformance | TXT record at _dmarc.domain | What receivers should do when SPF and DKIM fail for the From address, and where to send reports |
| BIMI Brand Indicators for Message Identification | TXT record at default._bimi.domain | The brand logo that mail apps may show beside authenticated messages |
# ── SPF: a TXT record on the domain that starts with v=spf1 ──────
dig +short TXT google.com | grep -i spf
# Typically: "v=spf1 include:_spf.google.com ~all"
# ── DMARC: always at _dmarc.<domain> ─────────────────────────────
dig +short TXT _dmarc.google.com
dig +short TXT _dmarc.cnn.com
# Look for the p= tag: none, quarantine or reject
# ── DKIM: needs the selector, found after s= in a message's
# DKIM-Signature header. Gmail has used the selector 20230601;
# selectors are rotated, so an empty answer means it has changed ─
dig +short TXT 20230601._domainkey.gmail.com
# Look for: v=DKIM1; k=rsa; p=<a long public key>
# ── BIMI: at default._bimi.<domain> ──────────────────────────────
dig +short TXT default._bimi.cnn.com
# Look for: v=BIMI1; l=<address of the logo>; a=<address of a certificate>
# ── A domain that publishes nothing returns nothing ──────────────
dig +short TXT _dmarc.acme-corp.example
| Record | Tag | Meaning |
|---|---|---|
| SPF | include: / ip4: | Adds another organisation's servers, or a specific address range, to the allowed list |
| SPF | ~all / -all | Everything else should be treated as suspicious (softfail) / rejected (fail) |
| DMARC | p= | Policy for failures: none (only report), quarantine (spam folder), reject (refuse) |
| DMARC | rua= | Address that receives daily summary reports — how a domain owner finds out who is sending in its name |
| DMARC | sp= / pct= | Policy for subdomains / percentage of failing mail the policy applies to |
| DKIM | p= | The public key. An empty p= means the key has been withdrawn |
| BIMI | l= / a= | Address of the logo file / address of the certificate proving the brand owns that logo |
p=quarantine or p=reject), and the largest providers also require the certificate named in a=. BIMI does not block anything itself; it gives organisations a visible reason to finish their DMARC rollout.Choose three real domains — for example your bank, your school or university, and a large online service. Run the SPF, DMARC and BIMI lookups for each and complete the record below.
Acme Corporation's DNS administrator sends you the company's current records. Use them, and the two emails from Part B, to answer the questions.
acme-corp.example. TXT "v=spf1 include:_spf.mailhost.example ~all"
_dmarc.acme-corp.example. TXT "v=DMARC1; p=none; rua=mailto:dmarc@acme-corp.example"
(no DKIM record published)
(no BIMI record published)
Model answer — check after completing your assessment:
p=none asks receivers only to report failures, so the forgery was delivered. The SPF ~all ending is also lenient.p=quarantine then p=reject. Jumping straight to p=reject risks blocking the company's own mail.A complete phishing email has landed in the SOC queue. You have 90 minutes to produce a structured incident triage report covering all dimensions: sender analysis, link analysis, attachment forensics, affected users, and recommended response actions.
Security+ SY0-801 objectives: 2.5 (phishing, indicators of compromise), 4.1 (email security), 4.7 (incident response: identification, containment, notification, lessons learned), 5.6 (security awareness: training types, reporting, metrics).
Run this once. It builds a harmless Word attachment, wraps it in a complete email with realistic headers, and saves it as helpdesk_phish.eml — the same form in which a reported email reaches a SOC analyst.
python3 - <<'PYEOF'
import datetime, os
from email.message import EmailMessage
from docx import Document
lab = os.path.expanduser("~/email-threat-labs/lab6")
os.makedirs(lab, exist_ok=True)
link = "https://microsoft365-secure-login.it-support-ticketing.example/verify?token=a7f3k"
# 1. Build the harmless attachment
tmp = os.path.join(lab, "tmp_attachment.docx")
doc = Document()
props = doc.core_properties
props.author = "win-build-07"
props.last_modified_by = "user"
props.created = datetime.datetime(2025, 3, 9, 23, 58, 12)
props.modified = datetime.datetime(2025, 3, 10, 0, 4, 51)
doc.add_heading("Account Activity Log", level=1)
doc.add_paragraph("Unusual sign-in activity was detected on your account.")
doc.add_paragraph("To view the full log, sign in here: " + link)
doc.save(tmp)
# 2. Build the email around it
msg = EmailMessage()
msg["Return-Path"] = "<noreply@it-support-ticketing.example>"
msg["Received"] = ("from mx1.yourcompany.example (mx1.yourcompany.example [192.0.2.25]) "
"by mailstore.yourcompany.example with ESMTPS id 5Hc1W9; "
"Mon, 10 Mar 2025 08:03:09 +0100")
msg["Authentication-Results"] = ("mx1.yourcompany.example; "
"spf=pass smtp.mailfrom=it-support-ticketing.example; "
"dkim=pass header.d=it-support-ticketing.example; "
"dmarc=pass (p=none) header.from=it-support-ticketing.example")
msg["Received"] = ("from out.it-support-ticketing.example (out.it-support-ticketing.example [203.0.113.77]) "
"by mx1.yourcompany.example with ESMTPS id 8Rt6N2; "
"Mon, 10 Mar 2025 08:03:07 +0100")
msg["Message-ID"] = "<20250310070305.4471@out.it-support-ticketing.example>"
msg["Date"] = "Mon, 10 Mar 2025 08:03:05 +0100"
msg["From"] = '"IT-Helpdesk" <noreply@it-support-ticketing.example>'
msg["To"] = "all-staff@yourcompany.example"
msg["Subject"] = "Action Required: Your Microsoft 365 Account Will Be Suspended"
msg.set_content(
"Dear Employee,\n\n"
"Our systems have detected unusual sign-in activity on your Microsoft 365\n"
"account. To prevent account suspension, you must verify your credentials\n"
"within 24 hours.\n\n"
"Click below to verify your account:\n" + link + "\n\n"
"Your account activity log is attached for your review.\n\n"
"Regards,\nIT Helpdesk Support Team\n", cte="7bit")
with open(tmp, "rb") as f:
msg.add_attachment(f.read(), maintype="application",
subtype="vnd.openxmlformats-officedocument.wordprocessingml.document",
filename="AccountActivityLog_March2025.docx")
os.remove(tmp)
out = os.path.join(lab, "helpdesk_phish.eml")
with open(out, "wb") as f:
f.write(msg.as_bytes())
print(f"Sample email created -> {out}")
PYEOF
microsoft365-secure-login.it-support-ticketing.example looks like a Microsoft URL at a glance. But the actual registered domain is it-support-ticketing.example (attacker-owned). The registered domain is the name directly in front of the public ending — .com, .example, or a two-part ending such as .co.uk or .com.ng. Everything to the left of it is a subdomain, which the domain's owner can set to any text they like.?token=a7f3k here). Before scanning a real link, remove personal tokens where you can and choose the unlisted or private option.Work through these commands in order. Each step feeds into the next section of your report.
cd ~/email-threat-labs/lab6
# ── Step 1: Preserve the evidence — hash the email before touching it
sha256sum helpdesk_phish.eml
# ── Step 2: Read the headers and the authentication results ───────
sed '/^$/q' helpdesk_phish.eml
grep -i -A 3 "^Authentication-Results" helpdesk_phish.eml
# ── Step 3: Find the sending IP (lowest Received line) ────────────
grep -i -A 2 "^Received:" helpdesk_phish.eml
# ── Step 4: Pull every link out of the email, defanged ────────────
grep -oE 'https?://[^ ]+' helpdesk_phish.eml | sort -u \
| sed 's/^http/hxxp/; s/\./[.]/g'
# ── Step 5: Extract the attachment without opening the email ──────
ripmime -i helpdesk_phish.eml -d extracted
ls extracted
cp extracted/AccountActivityLog_March2025.docx .
# ── Step 6: Hash the attachment and check its true type ───────────
sha256sum AccountActivityLog_March2025.docx
file AccountActivityLog_March2025.docx
# ── Step 7: Metadata ──────────────────────────────────────────────
exiftool -Creator -LastModifiedBy -Company \
-CreateDate -ModifyDate -Application \
AccountActivityLog_March2025.docx
# ── Step 8: Macro check ───────────────────────────────────────────
olevba AccountActivityLog_March2025.docx
# ── Step 9: Look inside the document for links ────────────────────
unzip -l AccountActivityLog_March2025.docx
unzip -p AccountActivityLog_March2025.docx word/document.xml \
| sed 's/<[^>]*>/ /g' | grep -oiE 'https?://[^ ]+'
# ── Step 10: On a real case — domain age and IP reputation ────────
# whois <sender-domain> (creation date: days old = red flag)
# AbuseIPDB / VirusTotal lookups for the sending IP and the file hash
# These return nothing for this lab's reserved example names.
Fill in each field as you work through your analysis. This becomes your final submitted incident report.
file command), size, SHA256 hashThe phishing email reached every member of staff. Write the notice that goes out to them. Keep it under 120 words, use plain language, and cover the four fields below. Do not include the live link; if you must show the address, defang it.
Six weeks later, the security team sends a harmless practice phishing email to all staff and records what each department did. Create the results file and the report script, then run it.
cd ~/email-threat-labs/lab6
cat > campaign.csv <<'EOF'
department,emails_sent,clicked_link,entered_password,reported
Finance,40,14,6,3
Sales,60,9,2,21
IT,25,1,0,19
Customer Service,75,22,11,8
Management,12,5,3,1
EOF
cat > campaign_report.py <<'PYEOF'
import csv
rows = list(csv.DictReader(open("campaign.csv")))
print(f"{'Department':18}{'Sent':>6}{'Click %':>9}{'Password %':>12}{'Report %':>10}")
totals = {"emails_sent": 0, "clicked_link": 0, "entered_password": 0, "reported": 0}
for row in rows:
sent = int(row["emails_sent"])
for key in totals:
totals[key] += int(row[key])
print(f"{row['department']:18}{sent:>6}"
f"{int(row['clicked_link']) / sent * 100:>8.0f}%"
f"{int(row['entered_password']) / sent * 100:>11.0f}%"
f"{int(row['reported']) / sent * 100:>9.0f}%")
sent = totals["emails_sent"]
print("-" * 55)
print(f"{'Whole company':18}{sent:>6}"
f"{totals['clicked_link'] / sent * 100:>8.0f}%"
f"{totals['entered_password'] / sent * 100:>11.0f}%"
f"{totals['reported'] / sent * 100:>9.0f}%")
PYEOF
python3 campaign_report.py
| Type of training | When it is used |
|---|---|
| Initial / onboarding | For every new member of staff, before they are given access |
| Ongoing | Regular refreshers and practice exercises for everyone |
| Targeted | Extra training for a group facing a specific risk, such as finance staff and payment fraud |
| Corrective | Follow-up for individuals who fell for a simulation or caused an incident — supportive, never punitive |
Key findings students should identify:
it-support-ticketing.example is not a Microsoft domain and not the company's own domain — it is attacker-registered.203[.]0[.]113[.]77, read from the lowest Received line.microsoft365-secure-login is merely a subdomain of the attacker's domain, designed to fool a quick visual scan.olevba is clean. It carries the same phishing link inside the document, a common way to get a link past email filters that only scan the message body. "No macro" does not mean "safe".win-build-07 does not match an IT helpdesk, Company is blank, and the file was created at 23:58 the night before it was sent.infected) as provided. Take a VM snapshot before every download.| Source | Best For | What You Get | Linux Download |
|---|---|---|---|
| MalwareBazaar bazaar.abuse.ch | Lab 4 | Thousands of real malicious Office docs with confirmed VBA macros. Free; needs an abuse.ch Auth-Key. Instructor-supervised. | See Lab 4, Option C |
| PhishTank phishtank.org | Labs 5, 6 | Community-verified phishing URLs. New registrations are closed and bulk downloads need a key, so use OpenPhish instead unless you already hold an account. | VM browser — phishtank.org |
| OpenPhish openphish.com | Labs 5, 6 | Real-time phishing feed. Plain text URL list, free tier. | curl https://openphish.com/feed.txt |
| URLhaus urlhaus.abuse.ch | Lab 6 | Malicious URL database, great for link and domain analysis. Uses the same abuse.ch Auth-Key. | VM browser — urlhaus.abuse.ch |
| LetsDefend letsdefend.io | All labs | Guided challenges with real .eml files. Automatically graded. Free tier. | VM browser — letsdefend.io |
| Blue Team Labs Online blueteamlabs.online | Labs 5, 6 | Free email forensics challenges with downloadable .eml files and scoring. | VM browser — blueteamlabs.online |
| theZoo (GitHub) github.com/ytisf/theZoo | Lab 4 (advanced) | Live malware repository. VM snapshot required before use. | git clone https://github.com/ytisf/theZoo.git |
| CyberDefenders cyberdefenders.org | All labs | DFIR challenges including email forensics. Free and paid tiers. | VM browser — cyberdefenders.org |
| TryHackMe tryhackme.com | All labs | Phishing Emails 1–5 learning path. Beginner friendly, browser-based. | VM browser — tryhackme.com |
file suspicious.docx # True file type — never trust the extension
sha256sum suspicious.docx # SHA256 hash for VirusTotal lookup
md5sum suspicious.docx # MD5 hash
strings suspicious.doc | head -80 # Readable strings (old .doc; a .docx is compressed)
unzip -l suspicious.docx # List internal files (docx is a ZIP)
exiftool file.docx # All metadata
exiftool -Creator -Company -CreateDate file.docx # Key forensic fields (Word: Creator = author)
exiftool -csv *.docx # Batch — all files, CSV output
# Read metadata XML directly from the docx ZIP
unzip file.docx docProps/core.xml -p # Print core.xml to stdout
olevba file.docx # Detect macros + flag suspicious keywords
olevba --decode --reveal file.docm # Decode hidden strings and show the source
oledump.py file.docx # Low-level OLE stream dump
oledump.py -s A3 -v file.docx # Dump stream A3 (macro-flagged stream)
pdf-parser -s JavaScript file.pdf # Find JavaScript in a PDF
pdfid file.pdf # Count risky PDF features (read the non-zero lines)
rtfobj file.rtf # List objects embedded in an RTF file
zbarimg --raw -q image.png # Decode a QR code without a phone
# Quick hunt for links and commands inside a .docx / .docm
unzip -p file.docx word/document.xml | sed 's/<[^>]*>/ /g' | grep -oiE '(https?://[^ ]+|powershell|cmd\.exe|wscript)'
cat email.eml # Full raw email
sed '/^$/q' email.eml # Headers only (stop at first blank line)
grep -i -A 3 "^Authentication-Results" email.eml # SPF / DKIM / DMARC results
grep -i -A 2 "^Received:" email.eml # Route — read from the bottom up
ripmime -i email.eml -d extracted # Extract attachments
grep -i "^From:\|Reply-To:\|Return-Path:" email.eml
grep -oE '[0-9]{1,3}(\.[0-9]{1,3}){3}' email.eml | sort -u # All IPs
# Email authentication records (SPF, DMARC, DKIM, BIMI)
dig +short TXT domain.com | grep -i spf
dig +short TXT _dmarc.domain.com
dig +short TXT SELECTOR._domainkey.domain.com
dig +short TXT default._bimi.domain.com
# Also paste full headers into these web tools:
# mxtoolbox.com/EmailHeaders
# toolbox.googleapps.com/apps/messageheader
# Defang an indicator before sharing it
echo "http://198.51.100.47/pay" | sed 's/^http/hxxp/; s/\./[.]/g'
# Terminal WHOIS — domain registration date is key
whois suspicious-domain.com
whois 8.8.8.8 # IP WHOIS (who owns the address)
# Check Tor exit node list
curl -s "https://check.torproject.org/torbulkexitlist" | grep "IP_ADDRESS"
# Web tools — use in VM browser, paste URL — do NOT click
# urlscan.io — redirect chain + screenshot of final page
# virustotal.com — URL + file reputation + community scores
# whois.domaintools.com — full domain history
# AbuseIPDB — check IP abuse score (free API key required)
curl -s "https://api.abuseipdb.com/api/v2/check?ipAddress=IP_HERE" \
-H "Key: YOUR_KEY" \
-H "Accept: application/json" | python3 -m json.tool
# ThreatFox — search IOC database (free abuse.ch Auth-Key required)
curl -s -X POST https://threatfox-api.abuse.ch/api/v1/ \
-H "Auth-Key: YOUR_ABUSECH_KEY" \
-d '{"query":"search_ioc","search_term":"IP_OR_DOMAIN_HERE"}' \
| python3 -m json.tool
# VirusTotal file hash lookup (free API key required)
curl -s "https://www.virustotal.com/api/v3/files/SHA256_HERE" \
-H "x-apikey: YOUR_VT_KEY" | python3 -m json.tool | grep -i "malicious\|verdict"
# Cloud sandboxes — use in VM browser, upload file there
# any.run — interactive live session; free submissions are PUBLIC
# hybrid-analysis.com — automated deep report, free tier
# joesandbox.com — advanced behavioural analysis
# app.any.run/tasks — view public community detonation reports
# Local option: CAPEv2 (successor to Cuckoo) runs entirely on Linux
# See: github.com/kevoreilly/CAPEv2
VBA for macro-laden .doc and .docm files. The API needs a free abuse.ch Auth-Key; test downloads before class and hand out SHA256 hashes rather than having every student create a key.ioc_log.csv in their VM across all labs — recording hash, domain, IP, and source for every IOC they find. This becomes a useful personal threat intel reference.