SOC › Module 5 › Lesson 4
Lab — Rules
Pack rule anatomy, Sigma, and tuning cards — detection rules file from $SOC_LAB only.
Visual · t29_rules_lab
Lab: rules pack. $SOC_LAB only. Original Cyberlium.
Opening
Rules pack merges anatomy to Sigma to tuning — paperwork before alert triage module.
Lessons 5-1–5-3 named rule anatomy, Sigma structure, and tuning hygiene. This lab merges three sections into one $SOC_LAB detection artifact with optional Sigma-to-field mapping table. No production rule deployment — detection literacy paperwork only. Next: Quiz — Detection Rules.
1. Lab contract: rules pack
Create $HOME/cyberlium-lab/t29-m05-l04-rules-lab.txt merging anatomy diagram, Sigma structure card, and tuning plan with $SOC_LAB scenario ID and M1 ethics cross-reference.
Optional: paste five-line fictional Sigma-style YAML skeleton — no production hostnames.
Command guide
Try these commands — Lab contract: rules pack
═══ LINUX / BASH (SOC Analyst Triage) ═══
Filter system logs for security-relevant warnings and errors
Command — copy this
journalctl -p 3 -xb --no-pager | head -20
Search for suspicious persistent cron entries or service changes
Command — copy this
ls -lat /etc/cron.* /etc/systemd/system/ | head -15
═══ WINDOWS POWERSHELL ═══ Triage recent system service installations (Event 7045)
Command — copy this
Get-WinEvent -FilterHashtable @{LogName='System';Id=7045} -MaxEvents 5 -ErrorAction SilentlyContinue | Format-Table TimeCreated, Message -WrapCheck open listening network connections with process owners
Command — copy this
Get-NetTCPConnection -State Listen | Select-Object LocalAddress, LocalPort, OwningProcess | Sort-Object LocalPort
Primary tools to practice this lesson: grep, curl. Reference sites: Sigma repo (https://github.com/SigmaHQ/sigma); Elastic detection engine (https://www.elastic.co/guide/en/security/current/detection-engine-overview.html); Splunk sigma (https://docs.splunk.com/Documentation/ES). Run every command in the box — install first, then the usage lines — only on YOUR lab / program scope.
2. Cross-check ethics
Grep for production index names, live rule IDs, stranger tenant URLs — remove. Pack labels all rules as $SOC_LAB training only.
Confirm malware/phishing/brute references stay detection literacy on fake logs — no exploit steps.
3. Lock the proof
chmod 600 on the pack. Quiz next — then Triage Process in M6.
Detection rule literacy feeds alert triage lessons next module.
4. What you ship: detection rules pack for $SOC_LAB
Merged anatomy, Sigma, tuning sections. $SOC_LAB named. NO prod deploy. chmod 600.
5. What you record before the next lesson
Date. Rules pack path. $SOC_LAB named. File t29-m05-l04-rules-lab.txt chmod 600.
6. Wrong vs right: stranger SIEM vs YOUR sample logs
Worked failure — same MSF word, opposite target. Right never needs a café Wi-Fi or classmate laptop.
Wrong
Include production Splunk savedsearch name in pack. Skip tuning plan section.
Right
Write YOUR detection rules pack for $SOC_LAB. chmod 600. Next: Quiz — Detection Rules.
Mission: freeze YOUR detection rules pack
1) Merge M5 literacy sections. 2) Confirm zero production rule refs. 3) Link M1 ethics cross-ref. 4) chmod 600.
Stuck? Ask Cyberlium AI Mentor
One governed rules pack beats ten noisy alerts on a stranger tenant.
Knowledge Check
APPLY: This lab requires:
Multiple choice
Knowledge Check
APPLY: True or False: Rules pack must label scenarios as $SOC_LAB training only.
True or False
Knowledge Check
APPLY: Brute/phishing/malware in rules pack are:
Multiple choice