The Windows Sysinternals team inside Microsoft released a new utility last week called Sysmon. It’s a persistent system monitor that allows you to track Windows events even over a reboot and dumps the information into a Windows Event log.
System Monitor (Sysmon) is a Windows system service and device driver that, once installed on a system, remains resident across system reboots to monitor and log system activity to the Windows event log. It provides detailed information about process creations, network connections, and changes to file creation time. By collecting the events it generates using Windows Event Collection or SIEM agents and subsequently analyzing them, you can identify malicious or anomalous activity and understand how intruders and malware operate on your network.
Note that Sysmon does not provide analysis of the events it generates, nor does it attempt to protect or hide itself from attackers.
Version 1.0 of the utility was released on August 5th. It features command line support and can optionally log network connection information. It also detects true file creation time to see past malware attemping to cover its tracks. Since Sysmon uses a device driver to load itself, it is monitoring the system early into the boot process, giving it a chance against rootkits and kernel-mode malware that would also load before the operating system is available.
Event log example:
Command line support:
Uses Sysmon simple command-line options to install and uninstall it, as well as to check and modify Sysmon’s configuration:
Install: Sysmon.exe -i [-h [sha1|md5|sha256]] [-n]
Configure: Sysmon.exe -c [[-h [sha1|md5|sha256]] [-n]|–]
Uninstall: Sysmon.exe -u
-c Update configuration of an installed Sysmon driver or dump the current configuration if no other argument is provided.
-h Specify the hash algorithm used for image identification (default is SHA1).
-i Install service and driver.
-m Install the event manifest (done on service install as well).
-n Log network connections.
-u Uninstall service and driver.
The service logs events immediately and the driver installs as a boot-start driver to capture activity from early in the boot that the service will write to the event log when it starts.
On Vista and higher, events are stored in “Applications and Services Logs/Microsoft/Windows/Sysmon/Operational”
On older systems events write to the System event log.
Specify -accepteula to automatically accept the EULA on installation, otherwise you will be interactively prompted to accept it.
Neither install nor uninstall require a reboot.
Install with default settings (process images hashed with sha1 and no network monitoring)
sysmon –i -accepteula
Install with md5 hashing of process created and monitoring network connections
sysmon –i -accepteula –h md5 –n
Dump the current configuration
Change the configuration (when Sysmon is running) to be hash sha256 and no network monitoring
sysmon –c –h sha256
Change the configuration to default settings
sysmon –c —
The 465KB Sysmon utility, by Mark Russinovich and Thomas Garnier, is available for free download from the Windows Sysinternals TechNet site.