Sysmon and Splunk Advanced Threat Detection
Sysmon and Splunk Advanced Threat Detection
In today’s cybersecurity landscape, having visibility into system-level activity is critical for
detecting threats and ensuring operational integrity. This project focuses on deploying and
utilizing Sysmon (System Monitor) to capture detailed information about system events such as
process creation, file modification, network connections, and registry changes.
1. Purpose: To set up Sysmon on the host machine for detailed event logging.
2. Configuration File: A Sysmon configuration file tailored for monitoring critical events is applied.
This file determines which activities Sysmon logs, such as process creations, file integrity checks,
and network activity.
Key Insight:
Properly configured Sysmon provides high-fidelity data while minimizing noise, making it a powerful tool
for threat hunting.
Sysmon generates detailed event logs that offer a wealth of information for identifying
suspicious activities, uncovering vulnerabilities, and fortifying system defenses. Let’s dive into
the critical Sysmon Event IDs captured in this project and what they signify.
Description:
This event is logged whenever a new process is created on the system. It includes details such as:
This is one of the most valuable event types for detecting malicious activity.
Malicious software (e.g., ransomware, trojans) often creates processes to execute payloads or
establish persistence.
Command-line arguments can reveal intent, such as PowerShell scripts used for data exfiltration
or privilege escalation.
Potential Vulnerabilities:
Description:
This event logs outgoing TCP/UDP network connections initiated by the host. It includes:
Potential Vulnerabilities:
1. Untrusted Destinations:
Connections to unknown or blacklisted IP addresses could indicate data exfiltration or malware
calling home.
2. Open Ports:
Unnecessary open ports can serve as entry points for attackers.
Mitigation Strategy:
Analyze traffic to unknown destinations and cross-reference with threat intelligence feeds.
Monitor for connections to unusual ports or countries.
Implement network segmentation and enforce firewall rules to restrict outbound traffic.
Description:
This event logs changes to file creation timestamps, which are often manipulated by attackers to
cover their tracks. It includes:
File path
Timestamps
User or process responsible for the change
Attackers might modify file timestamps to align malicious files with legitimate ones, making
them harder to detect.
File creation events can also indicate unauthorized file operations, such as dropping malicious
executables or altering system files.
Potential Vulnerabilities:
1. Tampered Timestamps:
Attackers may backdate files to avoid detection during forensic investigations.
2. Unauthorized File Changes:
Malicious scripts or processes might drop payloads disguised as system files.
Mitigation Strategy:
Monitor critical directories for unusual file creation activity (e.g., system32, temp folders).
Combine file monitoring with process creation logs (Event ID 1) to correlate file changes with
suspicious processes.
General Vulnerabilities in Sysmon Implementation
While Sysmon is a powerful tool, its efficacy depends on how it’s configured and monitored.
Here are some potential flaws:
By correlating these logs, you can detect sophisticated attack techniques like lateral movement,
privilege escalation, and data exfiltration.
For this phase, I focused on analyzing Sysmon Event ID 3 (Network Connections) and Event
ID 11 (File Creation Time) in Splunk. These event types were chosen due to their importance in
identifying potentially malicious activity related to unauthorized network connections and file
operations.
The number of events generated was manageable, so I concentrated on meaningful queries rather
than creating dashboards. Instead, the insights were drawn directly from the analysis,
demonstrating how Sysmon logs can be effectively used for threat detection and forensic
investigation.
Description:
Event ID 3 captures all outbound network connections initiated by the host. This event is critical
for identifying abnormal communications that may signify:
Key Insights:
1. Destination IP Analysis:
o Connections to unfamiliar or external IPs, especially those in regions where legitimate
business operations do not exist, were flagged for review.
2. Port Analysis:
o Uncommon ports or services, such as port 4444 (often associated with reverse shells),
were highlighted as potential threats.
3. Process Associations:
o A deeper look at processes initiating network connections (e.g., powershell.exe or
cmd.exe) provided critical context for identifying possible misuse of legitimate system
tools (LOLBins).
Excessive Open Connections: Processes opening multiple connections to unknown IPs could be
indicative of malware.
Unusual Ports: Ports not typically used by business applications might be exploited by attackers.
Event ID 11: File Creation Time
Description:
Event ID 11 monitors changes to file creation timestamps. This is essential for detecting
suspicious file modifications or creations, especially in critical system directories or temporary
folders where attackers often drop payloads.
Splunk Query:
To track file creation events, you use the following query:
Key Insights:
Unauthorized File Changes: Malicious payloads disguised as legitimate files were identified
based on unusual file names or locations.
Backdating of Files: Timestamp manipulation to hide malicious files was observed as a tactic to
evade detection.
Phase 4: Deriving Actionable Insights
The analysis of Event IDs 3 and 11 led to valuable insights into system behavior:
1. Behavioral Patterns:
o Normal patterns of network connections and file operations were identified to establish
a baseline for future anomaly detection.
2. Anomalous Activity:
o Outliers in the data, such as unusual IP connections or unauthorized file creations,
highlighted potential threats that warranted further investigation.
Challenges:
The volume of logs was relatively small, which simplified analysis but limited opportunities for
dashboard creation.
While no major security incidents were detected, the exercise provided critical visibility into
system operations and laid the groundwork for continuous monitoring.
Phase 5: Recommendations
Based on the insights from Event ID 3 and 11, I propose the following:
Implement strict firewall rules to block connections to untrusted IP addresses and uncommon
ports.
Regularly review logs for connections initiated by unusual processes like powershell.exe.
2. Enforce File Integrity Monitoring:
Use Sysmon in conjunction with SIEM tools like Splunk to correlate system and network events
for a more holistic view.
Continuously update Sysmon configuration to include new indicators of compromise (IOCs).
Periodically review network and file creation logs to uncover hidden threats or potential
misconfigurations.
Investigate high-severity events, such as connections to external IPs or suspicious file
operations.
Educate users on avoiding actions that could introduce malware, such as downloading files from
untrusted sources.
Conclusion
This project demonstrates the effectiveness of Sysmon in capturing granular details about
network activity and file changes. By leveraging Splunk for analysis, I showcased the ability to
extract actionable insights from these logs. The recommendations provided align with best
practices for endpoint monitoring and proactive threat detection, ensuring a robust defense
against potential security risks.