diff --git a/README.md b/README.md index 3c6c9df..4ef2ebc 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -

+

# TrustedSec Sysmon Community Guide @@ -23,55 +23,60 @@ The authors encourage you to redistribute this content as widely as possible, bu Table of Contents ================= -* [What is Sysmon](./what-is-sysmon.md) +* [What is Sysmon](./chapters/what-is-sysmon.md) -* [The Sysmon Driver](./the-sysmon-driver.md) +* Sysmon on Windows -* [Install and Configuration](./install-and-configuration.md) + * [The Sysmon Driver](./chapters/the-sysmon-driver.md) + + * [Install and Configuration](./chapters/install-and-configuration.md) + +* Sysmon on Linux + * [sysinternalsEBPF](./chapters/eBPF.md) * Sysmon Events - * [Process Events](./process-events.md) + * [Process Events](./chapters/process-events.md) - * [Process Creation](./process-creation.md) + * [Process Creation](./chapters/process-creation.md) - * [Process Termination](./process-termination.md) + * [Process Termination](./chapters/process-termination.md) - * [Process Access](./process-access.md) + * [Process Access](./chapters/process-access.md) * File Events - * [File Create](./file-create.md) + * [File Create](./chapters/file-create.md) - * [File Create Time Change](./file-create-time-change.md) + * [File Create Time Change](./chapters/file-create-time-change.md) - * [File Stream Creation Hash](./file-stream-creation-hash.md) + * [File Stream Creation Hash](./chapters/file-stream-creation-hash.md) - * [File Delete](./file-delete.md) + * [File Delete](./chapters/file-delete.md) - * [File Delete Detected](./file_delete_detected.md) + * [File Delete Detected](./chapters/file_delete_detected.md) - * [Named Pipes](./named-pipes.md) + * [Named Pipes](./chapters/named-pipes.md) - * [Driver Loading](./driver-loading.md) + * [Driver Loading](./chapters/driver-loading.md) - * [Registry Actions](./registry-actions.md) + * [Registry Actions](./chapters/registry-actions.md) - * [Image Loading](./image-loading.md) + * [Image Loading](./chapters/image-loading.md) - * [Network Connections](./network-connections.md) + * [Network Connections](./chapters/network-connections.md) - * [Create Remote Thread](./create-remote-thread.md) + * [Create Remote Thread](./chapters/create-remote-thread.md) - * [Raw Access Read](./raw-access-read.md) + * [Raw Access Read](./chapters/raw-access-read.md) - * [DNS Query](./dns-query.md) + * [DNS Query](./chapters/dns-query.md) - * [WMI Events](./WMI-events.md) + * [WMI Events](./chapters/WMI-events.md) - * [Clipboard Capture](./clipboard-capture.md) + * [Clipboard Capture](./chapters/clipboard-capture.md) - * [Process Image Tampering](./process-tampering.md) + * [Process Image Tampering](./chapters/process-tampering.md) ## Current State: diff --git a/Sysmon.md b/chapters/Sysmon.md similarity index 100% rename from Sysmon.md rename to chapters/Sysmon.md diff --git a/WMI-events.md b/chapters/WMI-events.md similarity index 96% rename from WMI-events.md rename to chapters/WMI-events.md index c330c82..553f16b 100644 --- a/WMI-events.md +++ b/chapters/WMI-events.md @@ -1,111 +1,111 @@ -WMI Events -========== - -WMI events, both temporary and permanent (survive a reboot), have been used for -over a decade by vendors and enterprise users to automate actions on systems. -Attackers leverage events in the same manner for automating actions and for -persistence. Attackers will create or modify existing event components (APT 28, -29) on systems for which they gain administrator privilege. WMI events are those -events that happen when a specific Event Class instance is created or they are -modified in the WMI Model. - -An attacker can monitor (and take certain actions) when these events occur by -using subscriptions that monitor for them. - -There are two types of WMI Event Subscriptions: - -- **Temporary** - Subscription is active as long as the process that created - the subscription is active (They run under the privilege of the process) - -- **Permanent** - Subscription is stored in the CIM Database and is active - until removed from it (They always run as SYSTEM) - -All event subscriptions have three components: - -- **Filter** - WQL Query for the events we want - -- **Consumer** - An action to take upon triggering the filter - -- **Binding** - Registers a filter to a consumer - -The filter and consumer are created individually and then registered together. -The actions that Sysmon filters on are those for permanent events. Sysmon will -only log **ActiveScript** and **CommandLine** consumers since these are the ones -abused by attackers. - -Fields for the Filter creation, modification, or deletion are: - -- **RuleName**: Rule name for filter - -- **EventType**: Will always be *WmiFilterEvent* - -- **UtcTime**: Time event happened - -- **Operation**: Created, modified or deleted - -- **User**: User that performed the action - -- **EventNamespace**: WMI Namespace where object was created - -- **Name**: Name of the filter - -- **Query**: Query defined for the filter - -The fields for Consumer creation, modification, or deletion are: - -- **RuleName**: Rule name for filter - -- **EventType**: Will always be *WmiConsumerEvent* - -- **UtcTime**: Time event happened - -- **Operation**: Created, modified, or deleted - -- **User**: User that performed the action - -- **Name**: Name of the consumer - -- **Type**: Type of consumer - -- **Destination**: Command or Script being executed - -The fields for filter to consumer binding are: - -- **RuleName**: Rule name for filter - -- **EventType**: Will always be *WmiBindingEvent* - -- **UtcTime**: Time event happened - -- **Operation**: Created, modified, or deleted - -- **User**: User that performed the action - -- **Consumer**: Consumer path in the CIM Database - -- **Filter**: Filter path in the CIM Database - -When a Permanent Event Subscription is created, an EventID **5861** in -**Microsoft-Windows-WMI-Activity/Operational** is created in **Windows 2012 R2, -Windows 2016,** and **Windows 10 Pro/Enterprise**. - -The event includes the Query and Consumer object information for the -subscription in its data. - -![Bind Event](media/image62.png) - -It is recommended to log all instances of this event type. - -```XML - - - * - - - - - - - - -``` +WMI Events +========== + +WMI events, both temporary and permanent (survive a reboot), have been used for +over a decade by vendors and enterprise users to automate actions on systems. +Attackers leverage events in the same manner for automating actions and for +persistence. Attackers will create or modify existing event components (APT 28, +29) on systems for which they gain administrator privilege. WMI events are those +events that happen when a specific Event Class instance is created or they are +modified in the WMI Model. + +An attacker can monitor (and take certain actions) when these events occur by +using subscriptions that monitor for them. + +There are two types of WMI Event Subscriptions: + +- **Temporary** - Subscription is active as long as the process that created + the subscription is active (They run under the privilege of the process) + +- **Permanent** - Subscription is stored in the CIM Database and is active + until removed from it (They always run as SYSTEM) + +All event subscriptions have three components: + +- **Filter** - WQL Query for the events we want + +- **Consumer** - An action to take upon triggering the filter + +- **Binding** - Registers a filter to a consumer + +The filter and consumer are created individually and then registered together. +The actions that Sysmon filters on are those for permanent events. Sysmon will +only log **ActiveScript** and **CommandLine** consumers since these are the ones +abused by attackers. + +Fields for the Filter creation, modification, or deletion are: + +- **RuleName**: Rule name for filter + +- **EventType**: Will always be *WmiFilterEvent* + +- **UtcTime**: Time event happened + +- **Operation**: Created, modified or deleted + +- **User**: User that performed the action + +- **EventNamespace**: WMI Namespace where object was created + +- **Name**: Name of the filter + +- **Query**: Query defined for the filter + +The fields for Consumer creation, modification, or deletion are: + +- **RuleName**: Rule name for filter + +- **EventType**: Will always be *WmiConsumerEvent* + +- **UtcTime**: Time event happened + +- **Operation**: Created, modified, or deleted + +- **User**: User that performed the action + +- **Name**: Name of the consumer + +- **Type**: Type of consumer + +- **Destination**: Command or Script being executed + +The fields for filter to consumer binding are: + +- **RuleName**: Rule name for filter + +- **EventType**: Will always be *WmiBindingEvent* + +- **UtcTime**: Time event happened + +- **Operation**: Created, modified, or deleted + +- **User**: User that performed the action + +- **Consumer**: Consumer path in the CIM Database + +- **Filter**: Filter path in the CIM Database + +When a Permanent Event Subscription is created, an EventID **5861** in +**Microsoft-Windows-WMI-Activity/Operational** is created in **Windows 2012 R2, +Windows 2016,** and **Windows 10 Pro/Enterprise**. + +The event includes the Query and Consumer object information for the +subscription in its data. + +![Bind Event](media/image62.png) + +It is recommended to log all instances of this event type. + +```XML + + + * + + + + + + + + +``` diff --git a/clipboard-capture.md b/chapters/clipboard-capture.md similarity index 100% rename from clipboard-capture.md rename to chapters/clipboard-capture.md diff --git a/cover.png b/chapters/cover.png similarity index 100% rename from cover.png rename to chapters/cover.png diff --git a/create-remote-thread.md b/chapters/create-remote-thread.md similarity index 100% rename from create-remote-thread.md rename to chapters/create-remote-thread.md diff --git a/dns-query.md b/chapters/dns-query.md similarity index 100% rename from dns-query.md rename to chapters/dns-query.md diff --git a/driver-loading.md b/chapters/driver-loading.md similarity index 100% rename from driver-loading.md rename to chapters/driver-loading.md diff --git a/chapters/eBPF.md b/chapters/eBPF.md new file mode 100644 index 0000000..3a55143 --- /dev/null +++ b/chapters/eBPF.md @@ -0,0 +1,14 @@ +sysinternalsEBPF +================= + + Sysmon for Linux uses its own library “sysinternalsEBPF” to handle the security events monitoring process. The advantages are that eBPF is a technology that allows programs to run in a sandbox in an operating system at the kernel level. The eBPF library will allow for the collection of information on: + + - Processes + - System Calls + - Network Sockets + + The “sysinternalsEBPF” library is open sourced and licensed under the MIT License. The source is available in GitHub at https://github.com/Sysinternals/SysinternalsEBPF In GitHub the latest installation and build instructions can be found. + +![Bind Event](media/image64.png) + +The eBPF library leverages a large library of Kernel memory offsets that are stored after installation in a JSON file at \ No newline at end of file diff --git a/file-create-time-change.md b/chapters/file-create-time-change.md similarity index 100% rename from file-create-time-change.md rename to chapters/file-create-time-change.md diff --git a/file-create.md b/chapters/file-create.md similarity index 100% rename from file-create.md rename to chapters/file-create.md diff --git a/file-delete.md b/chapters/file-delete.md similarity index 100% rename from file-delete.md rename to chapters/file-delete.md diff --git a/file-stream-creation-hash.md b/chapters/file-stream-creation-hash.md similarity index 100% rename from file-stream-creation-hash.md rename to chapters/file-stream-creation-hash.md diff --git a/file_delete_detected.md b/chapters/file_delete_detected.md similarity index 100% rename from file_delete_detected.md rename to chapters/file_delete_detected.md diff --git a/image-loading.md b/chapters/image-loading.md similarity index 100% rename from image-loading.md rename to chapters/image-loading.md diff --git a/install-and-configuration.md b/chapters/install-and-configuration.md similarity index 100% rename from install-and-configuration.md rename to chapters/install-and-configuration.md diff --git a/media/image1.png b/chapters/media/image1.png similarity index 100% rename from media/image1.png rename to chapters/media/image1.png diff --git a/media/image10.png b/chapters/media/image10.png similarity index 100% rename from media/image10.png rename to chapters/media/image10.png diff --git a/media/image11.png b/chapters/media/image11.png similarity index 100% rename from media/image11.png rename to chapters/media/image11.png diff --git a/media/image12.png b/chapters/media/image12.png similarity index 100% rename from media/image12.png rename to chapters/media/image12.png diff --git a/media/image13.png b/chapters/media/image13.png similarity index 100% rename from media/image13.png rename to chapters/media/image13.png diff --git a/media/image14.png b/chapters/media/image14.png similarity index 100% rename from media/image14.png rename to chapters/media/image14.png diff --git a/media/image15.png b/chapters/media/image15.png similarity index 100% rename from media/image15.png rename to chapters/media/image15.png diff --git a/media/image16.png b/chapters/media/image16.png similarity index 100% rename from media/image16.png rename to chapters/media/image16.png diff --git a/media/image17.png b/chapters/media/image17.png similarity index 100% rename from media/image17.png rename to chapters/media/image17.png diff --git a/media/image18.png b/chapters/media/image18.png similarity index 100% rename from media/image18.png rename to chapters/media/image18.png diff --git a/media/image19.png b/chapters/media/image19.png similarity index 100% rename from media/image19.png rename to chapters/media/image19.png diff --git a/media/image2.png b/chapters/media/image2.png similarity index 100% rename from media/image2.png rename to chapters/media/image2.png diff --git a/media/image20.png b/chapters/media/image20.png similarity index 100% rename from media/image20.png rename to chapters/media/image20.png diff --git a/media/image21.png b/chapters/media/image21.png similarity index 100% rename from media/image21.png rename to chapters/media/image21.png diff --git a/media/image22.png b/chapters/media/image22.png similarity index 100% rename from media/image22.png rename to chapters/media/image22.png diff --git a/media/image23.png b/chapters/media/image23.png similarity index 100% rename from media/image23.png rename to chapters/media/image23.png diff --git a/media/image24.png b/chapters/media/image24.png similarity index 100% rename from media/image24.png rename to chapters/media/image24.png diff --git a/media/image25.png b/chapters/media/image25.png similarity index 100% rename from media/image25.png rename to chapters/media/image25.png diff --git a/media/image26.png b/chapters/media/image26.png similarity index 100% rename from media/image26.png rename to chapters/media/image26.png diff --git a/media/image27.png b/chapters/media/image27.png similarity index 100% rename from media/image27.png rename to chapters/media/image27.png diff --git a/media/image28.png b/chapters/media/image28.png similarity index 100% rename from media/image28.png rename to chapters/media/image28.png diff --git a/media/image29.png b/chapters/media/image29.png similarity index 100% rename from media/image29.png rename to chapters/media/image29.png diff --git a/media/image3.png b/chapters/media/image3.png similarity index 100% rename from media/image3.png rename to chapters/media/image3.png diff --git a/media/image30.png b/chapters/media/image30.png similarity index 100% rename from media/image30.png rename to chapters/media/image30.png diff --git a/media/image31.png b/chapters/media/image31.png similarity index 100% rename from media/image31.png rename to chapters/media/image31.png diff --git a/media/image32.png b/chapters/media/image32.png similarity index 100% rename from media/image32.png rename to chapters/media/image32.png diff --git a/media/image33.png b/chapters/media/image33.png similarity index 100% rename from media/image33.png rename to chapters/media/image33.png diff --git a/media/image34.png b/chapters/media/image34.png similarity index 100% rename from media/image34.png rename to chapters/media/image34.png diff --git a/media/image35.png b/chapters/media/image35.png similarity index 100% rename from media/image35.png rename to chapters/media/image35.png diff --git a/media/image36.png b/chapters/media/image36.png similarity index 100% rename from media/image36.png rename to chapters/media/image36.png diff --git a/media/image37.png b/chapters/media/image37.png similarity index 100% rename from media/image37.png rename to chapters/media/image37.png diff --git a/media/image38.png b/chapters/media/image38.png similarity index 100% rename from media/image38.png rename to chapters/media/image38.png diff --git a/media/image39.png b/chapters/media/image39.png similarity index 100% rename from media/image39.png rename to chapters/media/image39.png diff --git a/media/image4.png b/chapters/media/image4.png similarity index 100% rename from media/image4.png rename to chapters/media/image4.png diff --git a/media/image40.png b/chapters/media/image40.png similarity index 100% rename from media/image40.png rename to chapters/media/image40.png diff --git a/media/image41.png b/chapters/media/image41.png similarity index 100% rename from media/image41.png rename to chapters/media/image41.png diff --git a/media/image42.png b/chapters/media/image42.png similarity index 100% rename from media/image42.png rename to chapters/media/image42.png diff --git a/media/image43.png b/chapters/media/image43.png similarity index 100% rename from media/image43.png rename to chapters/media/image43.png diff --git a/media/image44.png b/chapters/media/image44.png similarity index 100% rename from media/image44.png rename to chapters/media/image44.png diff --git a/media/image45.png b/chapters/media/image45.png similarity index 100% rename from media/image45.png rename to chapters/media/image45.png diff --git a/media/image46.png b/chapters/media/image46.png similarity index 100% rename from media/image46.png rename to chapters/media/image46.png diff --git a/media/image47.png b/chapters/media/image47.png similarity index 100% rename from media/image47.png rename to chapters/media/image47.png diff --git a/media/image48.png b/chapters/media/image48.png similarity index 100% rename from media/image48.png rename to chapters/media/image48.png diff --git a/media/image49.png b/chapters/media/image49.png similarity index 100% rename from media/image49.png rename to chapters/media/image49.png diff --git a/media/image5.png b/chapters/media/image5.png similarity index 100% rename from media/image5.png rename to chapters/media/image5.png diff --git a/media/image50.png b/chapters/media/image50.png similarity index 100% rename from media/image50.png rename to chapters/media/image50.png diff --git a/media/image51.png b/chapters/media/image51.png similarity index 100% rename from media/image51.png rename to chapters/media/image51.png diff --git a/media/image52.png b/chapters/media/image52.png similarity index 100% rename from media/image52.png rename to chapters/media/image52.png diff --git a/media/image53.png b/chapters/media/image53.png similarity index 100% rename from media/image53.png rename to chapters/media/image53.png diff --git a/media/image54.png b/chapters/media/image54.png similarity index 100% rename from media/image54.png rename to chapters/media/image54.png diff --git a/media/image55.png b/chapters/media/image55.png similarity index 100% rename from media/image55.png rename to chapters/media/image55.png diff --git a/media/image56.png b/chapters/media/image56.png similarity index 100% rename from media/image56.png rename to chapters/media/image56.png diff --git a/media/image57.png b/chapters/media/image57.png similarity index 100% rename from media/image57.png rename to chapters/media/image57.png diff --git a/media/image58.png b/chapters/media/image58.png similarity index 100% rename from media/image58.png rename to chapters/media/image58.png diff --git a/media/image59.png b/chapters/media/image59.png similarity index 100% rename from media/image59.png rename to chapters/media/image59.png diff --git a/media/image6.png b/chapters/media/image6.png similarity index 100% rename from media/image6.png rename to chapters/media/image6.png diff --git a/media/image60.png b/chapters/media/image60.png similarity index 100% rename from media/image60.png rename to chapters/media/image60.png diff --git a/media/image61.png b/chapters/media/image61.png similarity index 100% rename from media/image61.png rename to chapters/media/image61.png diff --git a/media/image62.png b/chapters/media/image62.png similarity index 100% rename from media/image62.png rename to chapters/media/image62.png diff --git a/media/image63.png b/chapters/media/image63.png similarity index 100% rename from media/image63.png rename to chapters/media/image63.png diff --git a/chapters/media/image64.png b/chapters/media/image64.png new file mode 100644 index 0000000..6f519f5 Binary files /dev/null and b/chapters/media/image64.png differ diff --git a/media/image7.png b/chapters/media/image7.png similarity index 100% rename from media/image7.png rename to chapters/media/image7.png diff --git a/media/image8.png b/chapters/media/image8.png similarity index 100% rename from media/image8.png rename to chapters/media/image8.png diff --git a/media/image9.png b/chapters/media/image9.png similarity index 100% rename from media/image9.png rename to chapters/media/image9.png diff --git a/media/tslogo.png b/chapters/media/tslogo.png similarity index 100% rename from media/tslogo.png rename to chapters/media/tslogo.png diff --git a/metadata.yml b/chapters/metadata.yml similarity index 100% rename from metadata.yml rename to chapters/metadata.yml diff --git a/named-pipes.md b/chapters/named-pipes.md similarity index 100% rename from named-pipes.md rename to chapters/named-pipes.md diff --git a/network-connections.md b/chapters/network-connections.md similarity index 100% rename from network-connections.md rename to chapters/network-connections.md diff --git a/operational-events.md b/chapters/operational-events.md similarity index 100% rename from operational-events.md rename to chapters/operational-events.md diff --git a/pandoc.css b/chapters/pandoc.css similarity index 100% rename from pandoc.css rename to chapters/pandoc.css diff --git a/process-access.md b/chapters/process-access.md similarity index 100% rename from process-access.md rename to chapters/process-access.md diff --git a/process-creation.md b/chapters/process-creation.md similarity index 100% rename from process-creation.md rename to chapters/process-creation.md diff --git a/process-events.md b/chapters/process-events.md similarity index 100% rename from process-events.md rename to chapters/process-events.md diff --git a/process-tampering.md b/chapters/process-tampering.md similarity index 100% rename from process-tampering.md rename to chapters/process-tampering.md diff --git a/process-termination.md b/chapters/process-termination.md similarity index 100% rename from process-termination.md rename to chapters/process-termination.md diff --git a/raw-access-read.md b/chapters/raw-access-read.md similarity index 100% rename from raw-access-read.md rename to chapters/raw-access-read.md diff --git a/registry-actions.md b/chapters/registry-actions.md similarity index 100% rename from registry-actions.md rename to chapters/registry-actions.md diff --git a/sysmon-changelog.md b/chapters/sysmon-changelog.md similarity index 100% rename from sysmon-changelog.md rename to chapters/sysmon-changelog.md diff --git a/sysmon-events.md b/chapters/sysmon-events.md similarity index 100% rename from sysmon-events.md rename to chapters/sysmon-events.md diff --git a/the-sysmon-driver.md b/chapters/the-sysmon-driver.md similarity index 100% rename from the-sysmon-driver.md rename to chapters/the-sysmon-driver.md diff --git a/chapters/what-is-sysmon.md b/chapters/what-is-sysmon.md new file mode 100644 index 0000000..536526b --- /dev/null +++ b/chapters/what-is-sysmon.md @@ -0,0 +1,74 @@ +What is Sysmon +============== + +Sysmon is a free tool initially developed by Mark Russinovich and by Tomas Garnier,with contributions David Magnotti, Mark Cook, Rob Mead, Giulia Biagini, Alex Mihaiuc, Kevin Sheldrake, John Lambert and others at Microsoft. The tools was initially released for. Windows. host and on October 2021 a Open Source Linux version of the tools was release. The tool is designed to extend the current logging capabilities in Windows and Linux so as to aid in understanding and detecting attackers by behavior. + +The original version the tool was for internal use at Microsoft. Under Windows the tool the tool supports 64-bit and 32-bit systems and uses a single command line tool for installation and configuration management. + +For Linux the tool can be compiled from source or installed via the distribution package manager. It supports the following distributions: + +- Ubuntu +- Debian +- Red Hat Enterprise Linux +- Fedora Linux +- OpenSuse +- Suse Linux Enterprise Server + +Sysmon will store logs in the default operating system login system. For Windows all of the events generated by Sysmon are saved in Microsoft-Windows-Sysmon/Operational EventLog and in the case of Linux under /var/log/syslog in order to accommodate security products that already collect and centralize logs from both operating systems. + +Sysmon is able to monitor for a series of actions on a host that relate to existing behavior that is abused by threat actors. With this view on the actions, defenders are able to better detect abnormal behavior and abuses on a system. + +The table below shows the event types and event ID that the version of Windows collects. + +| EventType| EventId| +|---|---| +|Sysmon Service Status Changed|0 +|ProcessCreate|1 +|FileCreateTime|2 +|NetworkConnect|3 +|Service State Change|4 +|ProcessTerminate|5 +|DriverLoad|6 +|ImageLoad|7 +|CreateRemoteThread| 8 +|RawAccessRead| 9 +|ProcessAccess| 10 +|FileCreate| 11 +|Registry object added or deleted | 12 +|Registry Create| 13 +|Registry Rename| 14 +|FileCreateStreamHash | 15 +|Sysmon Config Change| 16 +|Named Pipe Create| 17 +|Named Pipe Connected|18 +|WMI Event Filter|19 +|WMI Event Consumer|20 +|WMI Consumer to Filter|21 +|DNS Query|22 +|File Delete|23 +|Clipboard Capture|24 +|Process Tampering|25 +|File Delete Detected|26 +|Error|255 + +The Linux version supports given the OS and technologies a smaller number of events. + +| EventType| EventId| +|---|---| +|Sysmon Service Status Changed|0 +|ProcessCreate|1 +|NetworkConnect|3 +|Service State Change|4 +|ProcessTerminate|5 +|RawAccessRead| 9 +|FileCreate| 11 +|Sysmon Config Change| 16 +|File Delete|23 + + + +The Sysmon version for Linux is an open-source version of the tool, developed to collect security events from Linux environments using eBPF (Extended Berkeley Packet Filter) and placing the captured events in to Syslog for easy consumption by existing centralized log collection solutions. + +Sysmon for Linux use the sysinternalsEBPF library to allow it to capture actions against files on disk and network actions. eBPF is a technology that allows to run the program at the Kernel level in a sandbox allowing it to capture read and. Sysmon leverages this technology to capture information on processes, reads and writes to block devices and also for Socket and TCP/IP actions before they reach a network interface. This behaviour is similar to that of mini filter drivers in Windows that allow for the capture of events as they are executed by the APIs in the OS. + +The sysinternalsEBPF and Sysmon for Linux are Open Source projects, this allows the community to contribute and to further expand the capabilities of the tools. They can be found at https://github.com/Sysinternals. Both Projects are written in C and in each repository they include documentation on how to build the utilities. diff --git a/what-is-sysmon.md b/what-is-sysmon.md deleted file mode 100644 index 8562df4..0000000 --- a/what-is-sysmon.md +++ /dev/null @@ -1,41 +0,0 @@ -What is Sysmon -============== - -Sysmon is a free tool initially developed by Mark Russinovich and has contributions by Tomas Garnier, David Magnotti, Mark Cook, Rob Mead, Giulia Biagini, and others at Microsoft. The tool is designed to extend the current logging capabilities in Windows to aid in understanding and detecting attackers by behavior. It was developed originally for internal use at Microsoft. (Note: There are still two versions of the tool—internal and external.) Currently, the tool supports 64-bit and 32-bit systems and uses a single command line tool for installation and configuration management. - -All of the events generated by Sysmon are saved in Microsoft-Windows-Sysmon/Operational EventLog in order to accomodate security products that already leverage the EventLog, and to make the events easier to view and collect. - -Sysmon is able to monitor for a series of actions on a Windows host that relate to existing behavior that is abused by threat actors. With this view on the actions, defenders are able to better detect abnormal behavior and abuses on a system. - -The table below shows the event types and event ID for each. - -| EventType| EventId| -|---|---| -|Sysmon Service Status Changed|0 -|ProcessCreate|1 -|FileCreateTime|2 -|NetworkConnect|3 -|Service State Change|4 -|ProcessTerminate|5 -|DriverLoad|6 -|ImageLoad|7 -|CreateRemoteThread| 8 -|RawAccessRead| 9 -|ProcessAccess| 10 -|FileCreate| 11 -|Registry object added or deleted | 12 -|Registry Create| 13 -|Registry Rename| 14 -|FileCreateStreamHash | 15 -|Sysmon Config Change| 16 -|Named Pipe Create| 17 -|Named Pipe Connected|18 -|WMI Event Filter|19 -|WMI Event Consumer|20 -|WMI Consumer to Filter|21 -|DNS Query|22 -|File Delete|23 -|Clipboard Capture|24 -|Process Tampering|25 -|File Delete Detected|26 -|Error|255