Sysmon event ID lookup
Type a Sysmon event ID, a name such as NetworkConnect or a word such as dns, or paste an event: its text as Event Viewer shows it, or its XML from the Details tab. The page says what the event records, which filter tag selects it in a Sysmon configuration and what each field holds. It reads only what you give it.
| Field | Value |
|---|
Sysmon events
Sysmon writes its events to the log Applications and Services Logs, Microsoft, Windows, Sysmon, Operational; its name for queries is Microsoft-Windows-Sysmon/Operational, and the events come from the provider Microsoft-Windows-Sysmon. The times in the events are in UTC. Event Viewer shows the filter tag in the task name, as in Process Create (rule: ProcessCreate).
The fields are those of the newest schema (4.90) in the event manifest that Microsoft publishes for both the Windows and the Linux versions of Sysmon. Events 27 to 29 are not in that manifest; sysmon64 -s prints the schema of the version you have installed, fields and types included. Event 1 has its hashes in the field Hashes, with the algorithms that the configuration names in HashAlgorithms (SHA1, MD5, SHA256, IMPHASH, or * for all).
| ID | Event | Filter tag | What it records | Fields |
|---|---|---|---|---|
| 1 | Process creation | ProcessCreate | A process started. The event has its full command line and its parent's, the hashes of its image file, and a ProcessGuid that is unique to this process across a domain, which the other events use to point at it. | RuleName, UtcTime, ProcessGuid, ProcessId, Image, FileVersion, Description, Product, Company, OriginalFileName, CommandLine, CurrentDirectory, User, LogonGuid, LogonId, TerminalSessionId, IntegrityLevel, Hashes, ParentProcessGuid, ParentProcessId, ParentImage, ParentCommandLine, ParentUser |
| 2 | A process changed a file creation time | FileCreateTime | A process set the creation time of a file. Attackers do it to make a file look as old as the system, but many programs do it for ordinary reasons. | RuleName, UtcTime, ProcessGuid, ProcessId, Image, TargetFilename, CreationUtcTime, PreviousCreationUtcTime, User |
| 3 | Network connection | NetworkConnect | A TCP or UDP connection, tied to its process by ProcessId and ProcessGuid, with the source and destination addresses, host names and ports. Off by default. | RuleName, UtcTime, ProcessGuid, ProcessId, Image, User, Protocol, Initiated, SourceIsIpv6, SourceIp, SourceHostname, SourcePort, SourcePortName, DestinationIsIpv6, DestinationIp, DestinationHostname, DestinationPort, DestinationPortName |
| 4 | Sysmon service state changed | None | The Sysmon service started or stopped. It cannot be filtered. | UtcTime, State, Version, SchemaVersion |
| 5 | Process terminated | ProcessTerminate | A process ended. | RuleName, UtcTime, ProcessGuid, ProcessId, Image, User |
| 6 | Driver loaded | DriverLoad | A driver was loaded, with its hashes and signature. Sysmon works out the signature separately, for speed, and says if the file was removed after loading. | RuleName, UtcTime, ImageLoaded, Hashes, Signed, Signature, SignatureStatus |
| 7 | Image loaded | ImageLoad | A module was loaded into a process, with its hashes and signature. Off by default; logging every load makes a great many events, so filter it. | RuleName, UtcTime, ProcessGuid, ProcessId, Image, ImageLoaded, FileVersion, Description, Product, Company, OriginalFileName, Hashes, Signed, Signature, SignatureStatus, User |
| 8 | CreateRemoteThread | CreateRemoteThread | A process started a thread in another process, a way that malware runs its code inside other processes. The event names both processes and where the thread starts; StartModule and StartFunction are worked out by Sysmon and can be empty. | RuleName, UtcTime, SourceProcessGuid, SourceProcessId, SourceImage, TargetProcessGuid, TargetProcessId, TargetImage, NewThreadId, StartAddress, StartModule, StartFunction, SourceUser, TargetUser |
| 9 | RawAccessRead | RawAccessRead | A process read a drive directly through \\.\, which malware uses to copy files that are locked and to get past file auditing. | RuleName, UtcTime, ProcessGuid, ProcessId, Image, Device, User |
| 10 | ProcessAccess | ProcessAccess | A process opened another process, as tools that read the memory of lsass.exe for credentials do. Diagnostic tools do it all the time, so turn it on with filters that leave out the expected cases. | RuleName, UtcTime, SourceProcessGUID, SourceProcessId, SourceThreadId, SourceImage, TargetProcessGUID, TargetProcessId, TargetImage, GrantedAccess, CallTrace, SourceUser, TargetUser |
| 11 | FileCreate | FileCreate | A file was created or overwritten. Useful for autostart locations such as the Startup folder, and for temporary and download folders. | RuleName, UtcTime, ProcessGuid, ProcessId, Image, TargetFilename, CreationUtcTime, User |
| 12 | RegistryEvent (Object create and delete) | RegistryEvent | A registry key or value was created or deleted. Sysmon writes the root keys short: HKLM, HKU, HKCR and HKLM\System\CurrentControlSet. | RuleName, EventType, UtcTime, ProcessGuid, ProcessId, Image, TargetObject, User |
| 13 | RegistryEvent (Value Set) | RegistryEvent | A registry value was set. For DWORD and QWORD values the event has the value written. | RuleName, EventType, UtcTime, ProcessGuid, ProcessId, Image, TargetObject, Details, User |
| 14 | RegistryEvent (Key and Value Rename) | RegistryEvent | A registry key or value was renamed. The event has the new name. | RuleName, EventType, UtcTime, ProcessGuid, ProcessId, Image, TargetObject, NewName, User |
| 15 | FileCreateStreamHash | FileCreateStreamHash | A named stream of a file was created, such as the Zone.Identifier stream (the mark of the web) that a browser adds to a download. The event has hashes of the file's contents and of the stream. | RuleName, UtcTime, ProcessGuid, ProcessId, Image, TargetFilename, CreationUtcTime, Hash, Contents, User |
| 16 | ServiceConfigurationChange | None | The Sysmon configuration changed, for example its filters. It cannot be filtered. | UtcTime, Configuration, ConfigurationFileHash |
| 17 | PipeEvent (Pipe Created) | PipeEvent | A named pipe was created. | RuleName, EventType, UtcTime, ProcessGuid, ProcessId, PipeName, Image, User |
| 18 | PipeEvent (Pipe Connected) | PipeEvent | A client connected to a named pipe. | RuleName, EventType, UtcTime, ProcessGuid, ProcessId, PipeName, Image, User |
| 19 | WmiEvent (WmiEventFilter activity detected) | WmiEvent | A WMI event filter was registered, one of the ways malware gets itself run. The event has the namespace, the filter's name and its query. | RuleName, EventType, UtcTime, Operation, User, EventNamespace, Name, Query |
| 20 | WmiEvent (WmiEventConsumer activity detected) | WmiEvent | A WMI consumer was registered: its name, log and destination. | RuleName, EventType, UtcTime, Operation, User, Name, Type, Destination |
| 21 | WmiEvent (WmiEventConsumerToFilter activity detected) | WmiEvent | A WMI consumer was bound to a filter: the consumer's name and the filter's path. | RuleName, EventType, UtcTime, Operation, User, Consumer, Filter |
| 22 | DNSEvent (DNS query) | DnsQuery | A process made a DNS query, answered or not, from the cache or not. Windows 8.1 and later. | RuleName, UtcTime, ProcessGuid, ProcessId, QueryName, QueryStatus, QueryResults, Image, User |
| 23 | FileDelete (File Delete archived) | FileDelete | A file was deleted, and Sysmon kept a copy in its archive folder (C:\Sysmon unless set otherwise), which can grow large. Event 26 logs deletions without keeping copies. | RuleName, UtcTime, ProcessGuid, ProcessId, User, Image, TargetFilename, Hashes, IsExecutable, Archived |
| 24 | ClipboardChange (New content in the clipboard) | ClipboardChange | The contents of the clipboard changed. | RuleName, UtcTime, ProcessGuid, ProcessId, Image, Session, ClientInfo, Hashes, Archived, User |
| 25 | ProcessTampering (Process image change) | ProcessTampering | Sysmon found a process whose image was changed, a sign of hiding techniques such as hollowing. | RuleName, UtcTime, ProcessGuid, ProcessId, Image, Type, User |
| 26 | FileDeleteDetected (File Delete logged) | FileDeleteDetected | A file was deleted. Only logged: no copy is kept. | RuleName, UtcTime, ProcessGuid, ProcessId, User, Image, TargetFilename, Hashes, IsExecutable |
| 27 | FileBlockExecutable | FileBlockExecutable | Sysmon blocked the creation of an executable file (PE format). | Not in the shared manifest |
| 28 | FileBlockShredding | FileBlockShredding | Sysmon blocked a tool such as SDelete from shredding a file. | Not in the shared manifest |
| 29 | FileExecutableDetected | FileExecutableDetected | Sysmon saw a new executable file (PE format) being created. | Not in the shared manifest |
| 255 | Error | None | Sysmon had an error: the system was too busy for some task, a bug in the service, or a security or integrity condition that was not met. | UtcTime, ID, Description |
Filters in a Sysmon configuration
A configuration file (installed with sysmon64 -i config.xml, changed with sysmon64 -c config.xml) has one filter tag per event under EventFiltering, such as <NetworkConnect onmatch="include">. With onmatch="include" only the events that match a rule are logged; with onmatch="exclude" all events are logged except those that match. A tag can have both an include and an exclude set, and exclude wins. Inside a set, rules on the same field are joined with OR and rules on different fields with AND. Each rule names a field of the event and can name a condition:
| Condition | Matches when |
|---|---|
is | The field equals the value. The default when a rule names no condition. |
is any | The field equals one of the values, separated by ;. |
is not | The field differs from the value. |
contains | The value is somewhere in the field. |
contains any | One of the values (separated by ;) is in the field. |
contains all | All of the values (separated by ;) are in the field. |
excludes | The value is not in the field. |
excludes any | At least one of the values (separated by ;) is not in the field. |
excludes all | None of the values (separated by ;) is in the field. |
begin with | The field starts with the value. |
end with | The field ends with the value. |
not begin with | The field does not start with the value. |
not end with | The field does not end with the value. |
less than | The field sorts before the value (compared as text). |
more than | The field sorts after the value (compared as text). |
image | Matches an image path, written in full or as the file name alone: lsass.exe matches c:\windows\system32\lsass.exe. |
Conditions do not care about upper and lower case. Events 4 and 16 have no filter tag and are always logged.
Reading the log
The last 50 network connections, in PowerShell:
Get-WinEvent -LogName Microsoft-Windows-Sysmon/Operational -FilterXPath "*[System[EventID=3]]" -MaxEvents 50
The event log query builder writes such commands, and the XML for a custom view in Event Viewer, for any event IDs and time span.
Sources
- The events, what each records, the filter tags, the conditions and how filters combine: Microsoft's Sysmon page for Sysmon v15.22 (sysinternals at commit eaffda1), used under the Creative Commons Attribution 4.0 International licence (creativecommons.org/
licenses/ by/ 4.0/). - The fields and their types, the log and provider names, and the layout of the event text: the event manifest (schema 4.90) and its template in SysmonCommon at commit 6678ccf, Microsoft's code shared by Sysmon for Windows and for Linux (MIT licence).
- The command: Microsoft's Get-WinEvent reference (PowerShell-Docs at commit aedd8ef).
More Logs tools
-
Access log checker
Find the exploit requests in a web server log and the addresses that sent them.
-
Windows security event ID lookup
Look up 4740, 4625, 4728, 1102 or any other Security log event: its meaning, audit setting and criticality.
-
Event log query builder
Pick a log, event IDs, levels and a time span: the XPath, the custom view XML and the Get-WinEvent command.
-
auditpol command builder
Choose what each audit subcategory logs, or start from Microsoft's baseline: the auditpol commands, with GUIDs.
-
Windows Firewall log reader
Open pfirewall.log: its lines as a table, the drops by port and address, and the commands that turn logging on.
-
Schannel and TLS alert code lookup
Read Schannel events 36887 and 36888 and TLS alerts such as 40, 46, 48 and 70.
-
IIS status codes and log line reader
Look up 500.19, 403.14 or any other IIS status and substatus, or read W3C log lines field by field.
-
Syslog PRI calculator
Read the facility and severity in a syslog priority such as <134>, or build one from local0 to local7.
-
Timestamp converter
Unix seconds and milliseconds, FILETIME, Chrome, Apple, Excel and MS-DOS dates to a date, and back.
-
Scanner watch
What attack tools ask of this site's web server: the addresses, the paths and the networks, rebuilt each day.