Introduction to Sysmon

Introduction

On Day 8 of the MyDFIR 30-Day SOC Challenge, I delved into a crucial tool for endpoint monitoring: Sysmon. Sysmon, short for System Monitor, is part of Microsoft’s Sysinternals suite and provides deep visibility into system activity. This tool is incredibly valuable for security analysts as it captures detailed logs of processes, network connections, and more, helping us trace malicious activities on Windows endpoints.

Understanding how Sysmon works is essential for improving visibility into endpoint activities and increasing the chances of detecting suspicious behaviors. In this post, I’ll walk you through the concepts of Sysmon and its capabilities, as explained by my instructor.

What is Sysmon?

Sysmon is a free tool from Microsoft, designed to monitor and log system events such as process creations, file modifications, and network connections. It’s customizable, allowing users to define which events should be logged by configuring a simple XML file. This flexibility ensures we can capture detailed telemetry data that is invaluable during incident investigations.

Key Features:

  • Process Creation Logging: Logs command lines for both parent and child processes.
  • File Hashing: Records hashes of processes, which can be cross-referenced using open-source intelligence (OSINT).
  • Process GUIDs: Sysmon generates unique identifiers for each process, enabling analysts to correlate different events.
  • Network Connection Logging: Captures source and destination IP addresses and ports, which can be correlated with the responsible process.

Sysmon helps security analysts by collecting these valuable logs, which would otherwise not be available by default on Windows systems.

Sysmon’s Importance in Endpoint Monitoring

  • Having visibility into endpoint activities is critical for any SOC analyst. Without proper monitoring, it becomes extremely difficult to trace back suspicious behaviors or confirm if a compromise has occurred. While Windows systems have basic logging enabled by default, they do not log key events such as process creations. This is where Sysmon comes in.

Why use Sysmon?

    • It enables tracking of critical events that are otherwise missed by default Windows logging.
    • Helps in investigating potential compromises by providing detailed logs of process execution, network connections, and even file creation events.

Event IDs: Understanding Sysmon’s Capabilities

  • Sysmon provides detailed logs under different Event IDs that allow us to track specific activities. Here’s a quick overview of some of the most important Sysmon Event IDs:

    • Event ID 1 (Process Creation): Tracks new processes created on the system, including their command lines and file hashes.
    • Event ID 3 (Network Connections): Logs network connections made by processes, including source/destination IP addresses and ports.
    • Event ID 6, 7, and 8: Logs related to driver loading, image loading, and thread creation. These are particularly useful for identifying defense evasion techniques, such as process injection.
    • Event ID 10 (Process Access): Commonly used to detect credential access attempts, particularly against sensitive processes like LSASS.
    • Event ID 22 (DNS Query): Tracks DNS queries made by the system, which can help identify suspicious domain requests (e.g., domains generated by malware).

    By correlating these Event IDs using process GUIDs, I can see the bigger picture during an investigation.

How Sysmon Enhances Security Operations

  • Imagine a scenario where a command and control (C2) server establishes a connection with your endpoint. Without Sysmon, you might miss the suspicious network connection. However, with Sysmon’s network connection logging (Event ID 3), you can track the connection’s source, destination, and associated process. This can be pivotal in identifying a compromise.

    Another powerful feature of Sysmon is its ability to log process GUIDs, which can be used to correlate multiple events involving the same process. This level of granularity is essential when investigating complex attacks involving multiple stages of execution.

Conclusion

On Day 8, I gained a deeper understanding of Sysmon and its importance for monitoring Windows endpoints. Sysmon provides valuable telemetry, helping analysts detect malicious activity by tracking various system events like process creations, network connections, and file modifications. This knowledge prepares me to set up Sysmon and start using its logs for advanced threat detection in the next stage of my project.