Reusable lab manual template + 8 worked examples.
A reusable template for writing detailed lab manuals for each AYSEC module, plus 8 completed examples covering the most-asked modules.
For every AYSEC module's "Hands-On" section, use this template:
# Lab Manual — [Track] [Module Code]: [Module Title] ## Lab Objective One-sentence statement of what the student will produce. ## Prerequisites - AYSEC modules X, Y completed. - Skill X at level Y. - Access to: <required tools / accounts>. ## Time Required Total: X hours (broken into <subtasks>). ## Lab Environment Setup 1. Step. 2. Step. 3. Step. ## Step-by-Step ### Step 1 — <Action> Commands:
How to confirm success (file presence, flag, output match).
What the student submits (CSV, screenshot bundle, flag, report).
Link to the next module's lab.
--- ## Example 1 — AYSEC-101 Module 03: Network Scanning ```markdown # Lab Manual — AYSEC-101 M03: Scan Metasploitable 2 ## Lab Objective Produce a complete service-and-version inventory of a vulnerable Linux target using Nmap + NSE. ## Prerequisites - Metasploitable 2 VM running on `aysec-victims` host-only network. - Kali VM on the same network with internet disabled. - ~10 GB disk for output. ## Time Required 2 hours total. ## Lab Environment Setup 1. Boot Metasploitable 2; note its DHCP-assigned IP (typically 10.10.10.x). 2. From Kali, ping Metasploitable to confirm reachability. 3. `mkdir -p ~/aysec/01-engagements/metasploitable/recon` 4. `cd ~/aysec/01-engagements/metasploitable/recon` ## Step-by-Step ### Step 1 — Stage-1 Fast Scan ```bash sudo nmap -sS -p- --min-rate=1000 -T4 -oA stage1 <ip>
Expected: ~25 open TCP ports identified within 2 minutes.
If sudo is needed but Kali doesn't prompt, your user isn't in the sudo group. Add with usermod -aG sudo $USER.
sudo
usermod -aG sudo $USER
ports=$(grep ^[0-9] stage1.nmap | cut -d/ -f1 | tr '\n' ',' | sed 's/,$//') sudo nmap -sV -sC -p $ports -oA stage2 <ip>
Verify in stage2.nmap that:
stage2.nmap
sudo nmap -sU --top-ports 100 -oA udp <ip>
UDP scans take 5-15 minutes.
For each interesting port, run targeted scripts:
nmap -p 21 --script "ftp-anon,ftp-syst" <ip> nmap -p 23 --script "telnet-encryption" <ip> nmap -p 445 --script "smb-os-discovery,smb-enum-shares,smb-enum-users" <ip> nmap -p 3306 --script "mysql-info,mysql-empty-password" <ip>
udp.nmap
-Pn
--min-rate
stage1.nmap
AYSEC-101 M04 — turn this scan into a prioritized vulnerability inventory.
--- ## Example 2 — AYSEC-102 Module 03: Splunk SPL ```markdown # Lab Manual — AYSEC-102 M03: Boss of the SOC v3 — Investigation 1 ## Lab Objective Identify the initial-access vector + lateral-movement target in a simulated 7-day intrusion. ## Prerequisites - Splunk Free / Enterprise installed. - BOTSv3 indexed (download from github.com/splunk/botsv3). - Web access to Splunk at http://localhost:8000. ## Time Required 3 hours. ## Step-by-Step ### Step 1 — Confirm Index ```spl | metadata type=hosts index=botsv3
You should see ~100 hosts.
The story starts with a phishing email. Pivot:
index=botsv3 sourcetype=ms:o365:management:office365:audit | search Operation="MailItemsAccessed" | stats count by UserId
Look for the user with the most-accessed mail items.
That user's username goes into:
index=botsv3 sourcetype=XmlWinEventLog:Security | search User="<username>" EventCode IN (4624,4625,4634,4672) | sort _time
Trace logon flow. Note any 4624 with LogonType=10 (RDP).
index=botsv3 sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1 host="<host>" | sort _time
Look for Office → PowerShell → suspicious child.
Submit answers to BOTSv3 questions 100, 101, 102 (initial-access, lateral, persistence).
eval _time = strptime(...)
--- ## Example 3 — AYSEC-103 M02: Windows MFT Forensics ```markdown # Lab Manual — AYSEC-103 M02: Parse Real $MFT ## Lab Objective Extract a $MFT, parse with MFTECmd, and produce a one-page finding doc. ## Prerequisites - A forensic image (Digital Corpora M57, or your own). - Eric Zimmerman's tools. - Excel / pandas. ## Time Required 2 hours. ## Step-by-Step ### Step 1 — Extract $MFT If you have a live drive, FTK Imager → Export Files → Volume → root → $MFT. If you have a raw image: ```bash # On Linux sudo mmls disk.img sudo fls -r -o <offset> disk.img > files.txt sudo icat -o <offset> disk.img <inode-of-$MFT> > MFT.bin
MFTECmd.exe -f MFT.bin --csv ./out --csvf mft.csv
Expect ~30,000 rows for a small disk.
In Excel / pandas:
\Users\<user>\AppData\Roaming\
SI.Modified < FN.Modified
For each suspicious file:
Doc contains 3+ documented findings or a justified "no significant findings."
1-page Markdown findings doc.
--- ## Example 4 — AYSEC-104 M05: ISO 27001 Annex A SoA ```markdown # Lab Manual — AYSEC-104 M05: Build Acme SaaS's SoA ## Lab Objective Produce a complete Statement of Applicability for Acme SaaS covering all 93 Annex A controls. ## Prerequisites - ISO/IEC 27001:2022 (purchased copy or via your employer). - Spreadsheet template (provided in `templates/soa-template.xlsx`). - Module 04 outputs: ISMS scope + risk assessment. ## Time Required 4–6 hours. ## Step-by-Step ### Step 1 — Open Template The provided template has 93 rows (one per A.5 / A.6 / A.7 / A.8 control). Columns: - Control number - Title - Applicable (Yes / No) - Justification (free text) - Implementation status (Implemented / Partial / Planned / Not Implemented) - Reference (link to policy / system / evidence) - Owner - Last review date ### Step 2 — Decide Applicability For each control, decide if it applies to Acme SaaS (cloud-native, 60-person, US+EU customers): - **Always-applicable**: most A.5 + most A.8. - **Likely NA**: A.7.13 (equipment maintenance — no on-prem hardware), A.7.4 (physical security monitoring — small office, may rely on landlord), A.5.32 (intellectual property rights — depends on what they create). For NA, give a justification (auditors will probe). ### Step 3 — Implementation Status For each Applicable control, choose: - Implemented: ready for audit; evidence exists. - Partial: in progress; some evidence. - Planned: agreed to do, not started. - Not Implemented: gap. ### Step 4 — Reference Link each Implemented / Partial to: - Policy doc (e.g., Information Security Policy v3). - System / setting (e.g., Okta MFA enforced). - Evidence (audit log, cert, training record). ## Validation - All 93 controls have a row. - All NA have a justification. - All Applicable have an implementation status. - 70%+ are at least Partial. ## Deliverable `soa-acme-saas.xlsx` with all 93 rows complete. ## Grading Rubric - 100%: All rows complete, all NA justified, 70%+ implemented. - 80%: All rows; some justifications thin. - Fail: <50 rows complete.
# Lab Manual — AYSEC-105 M02: Build a Multi-Cloud IAM Pattern ## Lab Objective Set up federated SSO + Workload Identity Federation across AWS, Azure, GCP free-tier accounts. ## Prerequisites - AWS Free Tier, Azure Free, GCP Free Trial accounts. - A GitHub repo for OIDC source. ## Time Required 4 hours. ## Step-by-Step ### Step 1 — AWS IAM Identity Center 1. Enable IAM Identity Center in `us-east-1`. 2. Create permission set "ReadOnlyDevs" using AWS managed policy `ReadOnlyAccess`. 3. Add yourself; assign permission set to your AWS account. 4. Test SSO login. ### Step 2 — AWS OIDC for GitHub Actions 1. Create OIDC provider for `token.actions.githubusercontent.com` (thumbprint shown in AWS docs). 2. Create role with `sts:AssumeRoleWithWebIdentity` allowed for your GitHub repo:
"Condition": { "StringEquals": { "token.actions.githubusercontent.com:aud": "sts.amazonaws.com" }, "StringLike": { "token.actions.githubusercontent.com:sub": "repo:your-org/your-repo:*" } }
3. In GitHub Actions, use `aws-actions/configure-aws-credentials` with the role ARN. ### Step 3 — Azure Conditional Access + PIM 1. Configure Conditional Access requiring MFA from outside your country. 2. Enable PIM for Global Admin role. 3. Test elevation: request, then perform. ### Step 4 — GCP Workload Identity Federation 1. Create a Workload Identity Pool. 2. Add a provider (OIDC) for GitHub. 3. Create a service account with `roles/storage.objectViewer`. 4. Grant the GitHub identity binding to that SA. 5. From GitHub Actions, authenticate via WIF. ## Validation Three GitHub Actions workflows pull from AWS S3, Azure Blob, GCS — each authenticating without long-lived secrets. ## Deliverable The three workflow YAMLs; redacted screenshots. ## Common Pitfalls - AWS thumbprint changes — use the official AWS-managed pre-trusted cert chain. - GCP WIF requires a "subject" mapping; misconfigured = 401. - Azure CA "block legacy auth" requires app updates first.
# Lab Manual — AYSEC-106 M04: PortSwigger "Username enumeration via different responses" ## Lab Objective Use Burp Intruder to detect a usernames-leak via response-length differential. ## Prerequisites - PortSwigger account. - Burp Suite Community. ## Time Required 30 minutes. ## Step-by-Step ### Step 1 — Open the Lab `Authentication → Username enumeration via different responses` (Apprentice). Click "Access the lab." ### Step 2 — Capture login In Burp: 1. Set Proxy to intercept. 2. Submit any creds in the lab. 3. Capture the POST request. ### Step 3 — Send to Intruder Right-click → Send to Intruder. ### Step 4 — Configure - Attack type: Sniper. - Mark the username value as the only payload position. - Payloads → Simple list → load the lab's "Candidate usernames" list (provided). ### Step 5 — Run Start attack. In the result table, sort by Length. Identify the row whose length differs from the rest. That's the valid username. ### Step 6 — Now Brute Force the Password Repeat with the discovered username and the lab's password wordlist. ### Step 7 — Login Use the recovered credentials. ## Validation Lab marks "Solved" when you log in. ## Common Pitfalls - Length differential may be subtle (1–2 bytes). Sort carefully. - If Burp Intruder is rate-limited (Community), wait or use BrowserStorm with delay. ## Deliverable A screenshot of the "Solved" status + the recovered username/password.
# Lab Manual — AYSEC-201 M03: Configure GoPhish ## Lab Objective Stand up a phishing campaign in your lab — domain, email, landing page, payload tracking. ## Prerequisites - VPS ($5/mo). - Domain (cheap, e.g. .xyz). - GoPhish installed. ## Time Required 3 hours. ## Step-by-Step ### Step 1 — Domain & DNS - Register domain. - Set MX → your VPS. - Add SPF, DKIM, DMARC. ### Step 2 — Mail Server - Install Postfix. - Configure DKIM signing. - Test with mail-tester.com — aim for 9/10. ### Step 3 — Install GoPhish ```bash wget https://github.com/gophish/gophish/releases/download/v0.12.x/gophish-v0.12.x-linux-64bit.zip unzip; cd gophish ./gophish
Send to your test group. Monitor:
GoPhish dashboard shows tracking; mail-tester score ≥ 9.
Burn the domain after the lab. Don't reuse.
Screenshot of tracking dashboard + redacted target list.
--- ## Example 8 — AYSEC-202 M03: Crackme ```markdown # Lab Manual — AYSEC-202 M03: Solve a Beginner Crackme ## Lab Objective Recover or bypass a password check in a small Linux ELF. ## Prerequisites - Linux VM with `gdb`, `pwndbg`, `Ghidra`. ## Time Required 1 hour. ## Step-by-Step ### Step 1 — Get the Crackme Download a "Beginner" Linux crackme from https://crackmes.one. ### Step 2 — Static ```bash file crackme strings crackme | grep -i "password\|pass\|key"
If a password string is in the binary, that's your easy-mode answer. Otherwise, move on.
Open in Ghidra → auto-analyze → find main.
main
Find the password-check function. Look for strcmp or equivalent. Note where the comparison happens.
strcmp
gdb ./crackme (gdb) break *<address-of-strcmp> (gdb) run (gdb) info registers # rdi/rsi point at the strings (gdb) x/s $rdi
If your password is at one register and the expected is at the other, you've recovered the password.
./crackme > <recovered password> "Correct!"
The crackme prints the success message.
A 1-paragraph writeup with the password and how you found it.
--- ## Using This Template at Scale For all 159 AYSEC modules, generate a lab manual using the template + a domain expert's input. Each manual takes 1–4 hours to write well. Build them gradually as students request. Crowdsource: invite advanced students to write lab manuals for modules they've completed — review and merge. Once 50% of modules have lab manuals, AYSEC has the most complete free-to-use cybersecurity lab curriculum publicly available.