Six production-grade labs built from real SOC experience, project work, and the MITRE ATT&CK framework. Each includes runnable Python scripts, guided exercises, and a challenge extension.
Write a production Sigma rule for Mimikatz detection, validate ATT&CK tagging, convert to Splunk SPL and Sentinel KQL, then simulate automated CI/CD deployment to both SIEMs.
logsource, detection with multiple selections, and proper tags for tactic + technique. The script saves it to lab1_output/mimikatz_detection.yml.title, description, detection, level), verifies all attack.tXXXX technique IDs exist, confirms at least one tactic tag, and validates severity level. Fails CI if any check fails.|contains, |endswith) to SPL equivalents (field="*value*"). Output is a fully runnable saved search with index=windows scope, table projection, and sort. Saved to lab1_output/mimikatz_detection.spl.contains, endswith). Output targets DeviceProcessEvents table with where TimeGenerated >= ago(1h) windowing. Saved to lab1_output/mimikatz_detection.kql.lab1_output/YOUR_RULE_challenge.yml and write a detection for one of: T1078 (Valid Accounts — impossible travel), T1190 (Exploit Public-Facing App — web shell upload), or T1071.004 (DNS C2 beaconing). Validate it passes all checks, then convert to both SIEM targets.# Sample generated Splunk SPL output index=windows EventCode=4688 OR EventCode=1 | search (Image="*\mimikatz.exe" OR Image="*\mimilib.dll") OR (CommandLine="*privilege::debug*" OR CommandLine="*sekurlsa::logonpasswords*" OR CommandLine="*lsadump::sam*") | table _time, host, user, CommandLine, Image, ParentImage | sort -_time
Audit a simulated production AWS account across IAM, S3, security groups, and CloudTrail against 18 CIS AWS Foundations Benchmark v1.5 controls. Score every finding and build a phased remediation plan.
Action:* Resource:*), a public S3 bucket, SSH/RDP open security groups, and a single-region CloudTrail without log validation.audit_iam() (5 checks), audit_s3() (15 checks across 4 buckets), audit_security_groups() (checks all 5 SGs for dangerous ports and all-traffic rules), and audit_cloudtrail() (2 checks). Each finding maps to a CIS control reference.base_severity × category_weight × env_multiplier. Production accounts multiply by 1.5×. IAM and S3 categories carry a 1.2–1.3× category weight because they directly expose data. A Critical IAM finding in prod scores up to 10.0 × 1.3 × 1.5 = 19.5.MOCK_AWS_ENV with CHALLENGE_ENV in run_lab() and re-run. Three additional findings are embedded: a CloudTrail log bucket with public access, an additional user with a wildcard IAM policy, and a service account with an over-privileged inline policy. Can you find all three?Hunt for 8 embedded attacker TTPs across 500 simulated Windows Security and Sysmon log events. Six ATT&CK-aligned hypotheses. Measure precision, recall, and false positive rate for each hunt query.
| Hypothesis | ATT&CK | What to Hunt | Precision Target |
|---|---|---|---|
| H-01 | T1059.001 | PowerShell -enc / -ExecutionPolicy Bypass | Tune to >90% |
| H-02 | T1003.001 | LSASS dump: comsvcs.dll MiniDump / procdump | 100% (no FP) |
| H-03 | T1021.002 | PsExec / PaExec lateral movement | 100% (no FP) |
| H-04 | T1053.005 | schtasks.exe /create command | 100% (no FP) |
| H-05 | T1110 | EventID 4625 count > 3 per user in 5min | >80% |
| H-06 | T1048.001 | DNS query length >40 chars (tunneling) | Tune threshold |
ParentImage not in (trusted list)) and working directory constraints to the hypothesis query to eliminate FPs without missing the true positive. Target: precision = 100%.A host is compromised. Analyze Prefetch files, Windows Event Logs, registry keys, network connections, and file hashes to reconstruct the full attack chain, extract IOCs, and write an executive IR report.
| Technique | Tactic | Evidence Source |
|---|---|---|
| T1566.001 | Initial Access | Outlook.exe prefetch + timing correlation |
| T1059.001 | Execution | EventID 4688: powershell.exe -nop -enc SQBFAFg... |
| T1003.001 | Credential Access | EventID 4688: rundll32.exe comsvcs.dll MiniDump + lsass.dmp file |
| T1134.001 | Priv Escalation | mimikatz.exe prefetch + EventID 4688 with privilege::debug |
| T1021.002 | Lateral Movement | PsExec64.exe prefetch + EventID 4624 logon type 3 on SRV-DC-01 |
| T1053.005 | Persistence | EventID 4688: schtasks /create /tn WindowsUpdate + EventID 4698 |
| T1547.001 | Persistence | Registry: HKCU\...\Run\WindowsUpdate = C:\Temp\payload.exe |
| T1071.001 | C2 | Network: SRV-DC-01 → 185.220.101.47:443 (HTTPS beacon) |
| T1048.001 | Exfiltration | Network: SRV-DC-01 → 185.220.101.47:53, 32KB DNS traffic |
calculate_dwell_time(timeline) function that finds the earliest suspicious event and the first detection event (first EventID 4625 failure that triggered investigation). Append the dwell time to the executive summary in the IR report.Triage 3 phishing emails: a Microsoft 365 credential harvest, a macro-dropper invoice, and a BEC wire fraud. Analyze headers, extract IOCs, classify campaigns, and trigger automated response playbooks.
security-alert@micros0ft-verify.com. SPF FAIL, DKIM NONE, DMARC FAIL. Body contains a lookalike login URL with base64-encoded user token. Reply-To redirects to .ru domain. Classification: CREDENTIAL_HARVESTING. Score: 85/100 (CRITICAL).Invoice_INV20250315.doc (MD5 matches known Emotet macro dropper). Sender domain spoofs a legitimate vendor with .evil.ru suffix. SPF SOFTFAIL. Score: 90/100 (CRITICAL). Response: endpoint hash hunt triggered across fleet..phishing-domains.xyz. Requests $127,500 wire transfer "urgently." Bank account number extracted (4532015112830366). Reply-To redirects to attacker Gmail. Score: 95/100 (CRITICAL). Finance team alert fired immediately.verify_dkim(email) function that parses the DKIM-Signature header (if present), extracts the bh (body hash) field, independently computes SHA-256(canonicalized_body), and compares. If they don't match, the email has been tampered with in transit.Follow the Penetration Testing Execution Standard against a Metasploitable 2 topology. Recon 13 open services, simulate 7 CVE exploits, post-exploit to harvest credentials, and deliver a professional pentest report. Run against your live VM for real hands-on practice.
| CVE | CVSS | Port / Service | Result |
|---|---|---|---|
| CVE-2011-2523 | 10.0 | 21 — vsftpd 2.3.4 | Root shell via backdoor on :6200 |
| CVE-2007-2447 | 10.0 | 445 — Samba MS-RPC | Root shell via usermap_script |
| CVE-2010-2075 | 10.0 | 6667 — UnrealIRCd | Root shell via IRC backdoor |
| CVE-2004-2687 | 9.3 | 3632 — distccd | daemon shell → sudo root |
| CVE-2007-3280 | 9.0 | 5432 — PostgreSQL | Meterpreter as postgres |
| CVE-2009-3548 | 7.5 | 8180 — Tomcat | Shell via default creds + WAR upload |
| N/A | 8.8 | 80 — DVWA | Full DB dump via SQLmap |
msfconsole and run the actual modules shown in Exercise 3. Challenge: exploit distccd (port 3632) and escalate to root using the sudo -l finding from post-exploitation. Document each step in the findings report template at lab6_output/pentest_report_metasploitable2.txt.Design a 3-VLAN Zero Trust network lab (Dev / Prod / Management). Build a default-deny policy engine that enforces mTLS and identity for every flow. Simulate 6 attacker lateral movement scenarios and score your architecture against NIST SP 800-207 and the CISA Zero Trust Maturity Model.
VLAN_10_DEV (trust=low), VLAN_20_PROD (trust=high), and VLAN_30_MGMT (trust=critical). Each zone has a defined subnet and host roster. The key principle: no zone implicitly trusts any other — even prod-web-01 cannot reach prod-db-01 without an explicit policy.ALLOW policies are defined. Every other flow hits the default DENY. Each policy enforces: source zone/host, destination, port, whether mTLS cert is required, and which service identity must be presented. The engine evaluates all conditions in sequence and logs every decision for audit.identity=svc-app, not svc-web. Identity-aware policies stop credential theft from enabling lateral movement.| Scenario | Attacker Has | Target | Result |
|---|---|---|---|
| Direct Dev → Prod DB | Foothold on dev-ws-01 | prod-db-01:5432 | DENY — no policy |
| Dev → Prod Web HTTP | Developer identity | prod-web-01:80 | DENY — no policy |
| Dev → SIEM (log replay) | Valid mTLS cert | mgmt-siem:514 | DENY — wrong src zone |
| Stolen svc-web → DB | svc-web cert (stolen) | prod-db-01:5432 | DENY — identity mismatch |
| Legitimate app → DB | svc-app cert + identity | prod-db-01:5432 | ALLOW ✓ |
| Bastion → Prod SSH | ops-engineer + MFA cert | any prod:22 | ALLOW ✓ |
ocsp_stapling_enabled flag to the cert inventory and update ZT_PRINCIPLES to check it. Re-run to hit 100% maturity.token_exp_minutes field and show how a 15-minute expiry window limits the attack surface even if the token is captured.