Detect, investigate & write an incident report
Detect the simulated activity, investigate it end to end and write an incident report.
By Invicly Tech, , in Cyber Security Fundamentals. About 11 minutes to read.
In short
The core SOC skill is turning telemetry into a story: detect the activity, investigate it across hosts and users, build a timeline, and write a report that both executives and engineers can act on. This is the capstone that proves readiness.
Explained simply
After the simulations, you know which attacks your lab missed. Now you close those gaps and then practise the core job of a SOC analyst: when an alert fires, find out what really happened, from first step to last, and explain it clearly in writing.
A detection is a saved search or rule that runs automatically and raises an alert when it matches. Many teams write detections in Sigma, a shared format for log rules written in YAML (a simple text format). A converter then turns a Sigma rule into the query language of your SIEM.
An investigation starts with one alert and keeps asking questions. Which user? Which machine? What started this process? What did it do next? Did it talk to the network? Did the same thing happen anywhere else? Each answer points to the next log to check.
Finally you write an incident report. It has two audiences. Managers need a short summary of what happened, what it means for the business and what to decide. Engineers need the technical detail: timeline, evidence, indicators and specific fixes.
Press Play on a diagram to walk through it one step at a time.
- Step 1Detect
Alert or hunt finds activity.
- Step 2Investigate
Pull logs across hosts.
- Step 3Timeline
Order the events.
- Step 4Report
Executive and technical writeup.
- Analyst to SIEM: Open alert: schtasks /create by powershell.exe1Open alert: schtasks /create by powershell.exe
- SIEM to Sysmon events: Find parent by ParentProcessGuid2Find parent by ParentProcessGuid
- Sysmon events to Analyst: Parent: powershell.exe started by WINWORD.EXE3Parent: powershell.exe started by WINWORD.EXE
- Analyst to SIEM: Search file events before Word opened4Search file events before Word opened
- Sysmon events to Analyst: invoice.docm downloaded by browser5invoice.docm downloaded by browser
- Analyst to SIEM: Search network events after the task ran6Search network events after the task ran
- Sysmon events to Analyst: Beacon to a new domain every 60 s7Beacon to a new domain every 60 s
In depth
From gap to tested detection
Take a technique that showed telemetry but no alert, such as scheduled task creation. Step 1: look at the raw event from your test and note the exact fields: image path, command line, parent process, user. Step 2: write a rule on the behaviour, not on the test's exact strings, so it catches variations. Step 3: convert it for your SIEM. Step 4: replay the atomic test and confirm the alert fires. Step 5: run normal activity for a while to see how noisy the rule is, and add narrow exclusions for known good software.
Sigma rules have a logsource (for example product windows, category process_creation), a detection block with named selections and a condition, plus metadata like level and ATT&CK tags. The sigma-cli tool converts rules with backends installed as plugins, for example sigma plugin install splunk, then sigma convert -t splunk -p sysmon rule.yml. Wazuh uses its own XML rules, so many Wazuh users write rules directly in local_rules.xml.
- 1Study telemetry
Fields from the test event
- 2Write rule
Target the behaviour
- 3Convert and deploy
Sigma to SIEM query
- 4Replay test
Does it fire?
- 5Tune
Measure noise, add exclusions
- Back to step 1
Investigating an alert step by step
Start with the five Ws: who (user account), what (process and command), where (host), when (exact UTC time), and how it started (parent process chain). Sysmon helps a lot here: every process has a ProcessGuid, and each event 1 includes the ParentProcessGuid, so you can walk up the tree reliably even when process IDs are reused.
Then widen out in time and space. Look 30 minutes before the alert on the same host: what was the user doing, which files were downloaded (event 11), which domains were queried (event 22)? Look after: new network connections (event 3), registry changes (event 13), new services or tasks. Then search other hosts for the same hash, command line or domain to find the scope.
Write as you go. Every finding gets a timestamp, source and a short note. Keeping notes during the investigation, not afterwards, saves hours and prevents mistakes in the report.
- Pivot on: user, host, process GUID, hash, domain, IP
- Expand time window before and after the alert
- Check other hosts for the same indicators to find scope
Building a timeline that tells the story
A timeline is a table of events in time order, all in UTC. Typical columns: time, host, user, source log, event, ATT&CK technique and a note. Include only events that matter to the story; a timeline of 2,000 rows is a log dump, not an analysis.
Mark the key moments clearly: first sign of malicious activity (initial access), when persistence was added, first contact with command and control, the most serious action (for example credential dumping), when the alert fired, and when containment happened. The gap between initial access and detection is called dwell time, and it is one of the most important numbers in a report.
When events come from different sources, check clock alignment. If Sysmon and the firewall disagree by a few seconds, note it rather than silently reordering events.
Writing the report for two audiences
Start with an executive summary of half a page in plain language: what happened, when it was found, the business impact, whether it is contained, and the two or three decisions or investments you recommend. No event IDs here.
The technical sections follow: scope (hosts, accounts, data involved), detailed timeline, analysis of each stage mapped to ATT&CK, indicators of compromise (defanged), root cause (the underlying reason, such as no MFA on the VPN, not just user clicked link), and recommendations. Make each recommendation specific and owned: enable PowerShell Script Block Logging on all endpoints, owner endpoint team, due in 30 days.
Add an appendix with queries you used and screenshots of key events, so another analyst can repeat your work. In a lab report, state clearly that the activity was simulated with Atomic Red Team in an isolated environment.
- 1Executive summary
Impact, status, decisions needed
- 2Scope and timeline
Hosts, accounts, ordered events
- 3Technical analysis
Each stage with ATT&CK and evidence
- 4IOCs and root cause
Defanged indicators, real cause
- 5Recommendations
Specific, owned, dated
- 6Appendix
Queries, screenshots, raw evidence
Learn it in 4 short steps
About 1h 15m each. Track them with a timer in your plan.
- 1Write detections for missed techniques~1h 15m
- 2Triage and investigate each alert~1h 15m
- 3Build a timeline of events~1h 15m
- 4Write an executive and technical report~1h 15m
Key points
- Write detections for techniques you initially missed.
- Investigate across endpoint, network and identity logs.
- A timeline connects the events into a narrative.
- Report for both executive and technical readers.
Key terms
Tap a card to flip it. 0/4 known
Examples
Sigma rule for scheduled task creation
Your test showed schtasks.exe with /create in the command line, but no alert. This Sigma rule matches that behaviour on any host. Then convert it (for example with sigma convert -t splunk -p sysmon) and replay the atomic test to prove it fires. Expect some noise from software installers and updaters; tune by excluding specific known parent processes, not by removing the whole rule. The level is medium because scheduled tasks are also used legitimately.
title: Scheduled Task Created With schtasks
status: experimental
description: Detects creation of a scheduled task via schtasks.exe
tags:
- attack.persistence
- attack.t1053.005
logsource:
product: windows
category: process_creation
detection:
selection:
Image|endswith: '\schtasks.exe'
CommandLine|contains: '/create'
condition: selection
falsepositives:
- Software installers and update agents
level: mediumInvestigate and build a five-row timeline
The alert fired for the scheduled task. Step 1: pivot to the parent process: powershell.exe with an encoded command, started by WINWORD.EXE. Step 2: decode the command in a safe VM: it downloaded a script. Step 3: search events before: a .docm file was created in Downloads. Step 4: search after: new network connections every 60 seconds to one IP. Step 5: search all hosts for that IP: none. Build the timeline below, compute dwell time (11 minutes from file to alert), and note root cause: macros allowed from internet files.
Time (UTC) Host Event ATT&CK
09:02:10 WIN invoice.docm saved to Downloads (S11) T1566.001
09:03:45 WIN WINWORD.EXE -> powershell.exe -enc (S1) T1059.001
09:04:02 WIN schtasks /create /sc onlogon (S1) T1053.005
09:04:30 WIN First connection to 10.10.10.66:443 (S3) T1071.001
09:13:10 SIEM Alert: Scheduled Task Created -Quick reference
- Sigma rule parts: title, logsource, detection (selections + condition), level, tags
- sigma plugin install splunk, then sigma convert -t splunk -p sysmon rule.yml
- Write rules on behaviour (image + key arguments), not on one test's exact strings
- Use ProcessGuid and ParentProcessGuid to walk Sysmon process trees
- Timeline columns: UTC time, host, user, source, event, ATT&CK, note
- Dwell time = detection time minus first malicious activity
- Root cause is the underlying gap, e.g. no MFA on VPN, not just user clicked
- Recommendations must be specific, owned and dated
Quick quiz
Pick an answer to see if you're right and why.
Practice exercises
Try each one yourself first. Use the hint if you get stuck, then compare with the solution.
- Exercise 1easy
For one alert from your simulations, answer the five Ws (who, what, where, when, how it started) using only SIEM data, with the event that proves each answer.
- Exercise 2medium
Write and test a Sigma rule that detects the Windows Security event log being cleared, convert it for your SIEM, and prove it fires using Atomic test T1070.001.
- Exercise 3hard
Run a chain of three atomics (execution, persistence, credential access) on one host, then investigate it as if you did not know what ran, and write a two-page report with an executive summary, timeline, ATT&CK mapping, root cause and three recommendations.
Check yourself
Answer in your head, reveal, then be honest with yourself.
Feel confident about this topic?
Frequently asked questions
- What is Sigma and why not write SIEM queries directly?
- Sigma is an open, vendor-neutral format for detection rules. Writing in Sigma lets you share rules and convert them to Splunk, Elastic, Microsoft Sentinel and other SIEMs, instead of rewriting each one.
- How long should an incident report be?
- As short as possible while still complete. For a single-host lab incident, two to four pages plus an appendix is typical; the executive summary should fit on half a page.
- What is the difference between a true positive and a benign true positive?
- A true positive is real malicious activity. A benign true positive is when the rule correctly detected the behaviour, but it was authorised, such as an admin's script or your own lab test.
- Where can I find example detection rules?
- The SigmaHQ repository on GitHub has thousands of community Sigma rules, and Elastic and Splunk publish their detection rules openly. Reading them is a great way to learn patterns.