Introduction to SIEM
An introduction to Security Information and Event Management.
Last updated
An introduction to Security Information and Event Management.
Last updated
SIEM stands for Security Information and Event Management system.
SIEM
collects data from various endpoints across the network
stores data at a centralized place
correlates data
Imagine that we have this network topology.
each network component can have one or more log sources generating different logs.
Sysmon
Windows Event logs
Network log sources can be divided into 2 logical parts
Host-Centric Log Source
Logs that will capture events that occurred within or related to the host:
Windows Event Logs
Sysmon
OSquery
Examples of logs would be:
A user accessing a file
A user attempting to authenticate
A process Execution Activity
A process of adding, editing, or deleting a registry key or value
Powershell execution
Network-Centric Log Source
Logs that are generated when:
the hosts communicate with each other
the host is accessing the internet to visit a website
Network-based protocols are:
SSH
VPN
HTTP
HTTPS
FTP
Examples of logs would be:
SSH connection
The file is accessed via FTP
Web traffic
A user accessing company resources via VPN
Network file-sharing activity
SIEM key features:
Takes logs from various sources in real-time
Provides the ability to correlate between events
Provides the ability to search through the logs
Provides the ability to investigate incidents
Provides the ability to respond promptly
Real-time log ingestion
Alerting against abnormal activities
24/7 Monitoring and visibility
Protection against the latest threats through ealy detection
Data Insights and visualization
Ability to investigate past incidents
Every device in the network generates some kind of log whenever an activity is performed on it
User visiting a website
Connecting to SSH
Logging in to a workstation
Common devices found in a network environment:
Windows Machine
Event Viewer utility
Records every event by assigning a unique ID to each type of log activity.
To access Event Viewer
Type "Event Viewer" in Search Bar
These logs from all windows endpoints are forwarded to the SIEM
Linux Workstation
stores all related logs like:
Events
Errors
Warnings
etc
Common log locations
/var/log/httpd
HTTP requests
HTTP response
Error logs
/var/log/cron
Events related to cron jobs
/var/log/auth.log and /var/log/secure
Authentication related logs
/var/log/kern
Kernel related events
Example of cron log
Web Server
Important to keep an eye on all the requests/responses coming in and out of the webserver for any potential web attack attempt.
Common Apache logs
/var/log/apache
/var/log/httpd
Apache log example
SIEM log ingestion methods
Agent / Forwarder
Lightweight agent tool gets installed in the Endpoint
Agent tool gets configured to capture all important logs and send them to SIEM server
Syslog
Protocol used to collect data fom various systems
web servers
databases
sent in real time
Manual upload
Allow users to ingest offline data.
Tools like:
Splunk
ELK
Qradar
Port-Forwarding
SIEM server configured to listen on the certain port from endpoint
Endpoint is configured to forward data to SIEM server listening port
Provides collected data correlation to detect threats
Raises alerts when a threat is detected
Helps detect threats
Helps protect against threats in a timely manner
A major component of a Security Operations Center
Correlation between events from different log sources
Provide visibility on Host and Network centric activities
Allow analysts to investigate the latest threats and timely responses
Hunt for threats that are not detected by the rules in place
Gets all the security-related logs ingested through agents, port forwarding, etc.
Once the logs are ingested, SIEM looks for unwanted behavior or suspicious pattern within the logs with the help of the conditions set in the rules by the analysts.
If the condition is met, a rule gets triggered, and the incident is investigated.
SOC Analysts
utilize SIEM solutions in order to have better visibility of what is happening within the network
Monitoring and Investigating
Identifying False positives
Tuning Rules which are causing the noise or False positives
Reporting
Compliance
Identifying blind spots in the network
Covering blind spots in the network
Dashboard
The most important components of any SIEM
Some of the information that can be found in a dashboard are:
Alert Highlights
System Notification
Health Alert
List of Failed Login Attempts
Events Ingested Count
Rules triggered
Top Domains Visited
Correlation Rules
Logical expressions set to be triggered to allow timely detect threat where examples are:
Multiple Failed Login Attempts
If a User gets 5 failed Login Attempts in 10 seconds
Successful Login After multiple Login Attempts
If login is successful after multiple failed login attempts
A rule is set to alert every time a user plugs in a USB
If outbound traffic is > 25 MB
Potential Data exfiltration Attempt
Create correlation rule
Adversaries tend to remove the logs during the post-exploitation phase to remove their tracks.
A unique Event ID 104 is logged every time a user tries to remove or clear event logs.
To create a rule based on this activity, we can set the condition as follows:
Rule: If the Log source is WinEventLog AND EventID is 104 - Trigger an alert Event Log Cleared
Adversaries use commands like whoami after the exploitation/privilege escalation phase.
Log source: Identify the log source capturing the event logs
Event ID: which Event ID is associated with Process Execution activity? In this case, event id 4688 will be helpful.
NewProcessName: which process name will be helpful to include in the rule?
Rule: If Log Source is WinEventLog AND EventCode is 4688, and NewProcessName contains whoami, then Trigger an ALERT WHOAMI command Execution DETECTED
Alert investigation
Alert is False Alarm.
It may require tuning the rule to avoid similar False positives from occurring again.
Alert is True Positive.
Perform further investigation.
Contact the asset owner to inquire about the activity.
Suspicious activity is confirmed.
Isolate the infected host.
Block the suspicious IP.
Click on Start Suspicious Activity, which process caused the alert?
Find the event that caused the alert, which user was responsible for the process execution?
chris.fort
What is the hostname of the suspect user?
HR_02
Examine the rule and the suspicious process; which term matched the rule that caused the alert?
miner
What is the best option that represents the event?
true-positive
Selecting the right ACTION will display the FLAG. What is the FLAG?
THM{000_SIEM_INTRO}