|
1 |
| -<!-- |
| 1 | +<!-- |
2 | 2 | sysmon-config | A Sysmon configuration focused on default high-quality event tracing and easy customization by the community
|
3 |
| - Source version: 70 | Date: 2019-12-04 |
| 3 | + Source version: 71 | Date: 2020-01-16 |
4 | 4 | Source project: https://github.com/SwiftOnSecurity/sysmon-config
|
5 | 5 | Source license: Creative Commons Attribution 4.0 | You may privatize, fork, edit, teach, publish, or deploy for commercial use - with attribution in the text.
|
6 | 6 |
|
|
46 | 46 |
|
47 | 47 | TECHNICAL:
|
48 | 48 | - Run sysmon.exe -? for a briefing on Sysmon configuration.
|
| 49 | + - Sysmon XML cannot use the AMPERSAND sign. Replace it with this: & |
49 | 50 | - Sysmon 8+ can track which rule caused an event to be logged through the "RuleName" field.
|
50 | 51 | - If you only specify exclude for a filtering subsection, everything in that subsection is logged by default.
|
51 | 52 | - Some Sysmon monitoring abilities are not meant for widely deployed general-purpose use due to performance impact. Depends on environment.
|
|
62 | 63 |
|
63 | 64 | <Sysmon schemaversion="4.22">
|
64 | 65 | <!--SYSMON META CONFIG-->
|
65 |
| - <HashAlgorithms>md5,sha256</HashAlgorithms> <!-- Both MD5 and SHA256 are the industry-standard algorithms for identifying files --> |
| 66 | + <HashAlgorithms>md5,sha256,IMPHASH</HashAlgorithms> <!-- Both MD5 and SHA256 are the industry-standard algorithms for identifying files --> |
66 | 67 | <CheckRevocation/> <!-- Check loaded drivers, log if their code-signing certificate has been revoked, in case malware stole one to sign a kernel driver -->
|
67 | 68 |
|
68 | 69 | <!-- <ImageLoad/> --> <!-- Would manually force-on ImageLoad monitoring, even without configuration below. Included only documentation. -->
|
|
82 | 83 | <RuleGroup name="" groupRelation="or">
|
83 | 84 | <ProcessCreate onmatch="exclude">
|
84 | 85 | <!--SECTION: Microsoft Windows-->
|
85 |
| - <ParentCommandLine condition="is">"C:\Program Files\Microsoft Monitoring Agent\Agent\MonitoringHost.exe" -Embedding</ParentCommandLine> |
86 | 86 | <CommandLine condition="begin with"> "C:\Windows\system32\wermgr.exe" "-queuereporting_svc" </CommandLine> <!--Windows:Windows error reporting/telemetry-->
|
87 | 87 | <CommandLine condition="begin with">C:\Windows\system32\DllHost.exe /Processid</CommandLine> <!--Windows-->
|
88 | 88 | <CommandLine condition="begin with">C:\Windows\system32\wbem\wmiprvse.exe -Embedding</CommandLine> <!--Windows: WMI provider host-->
|
|
115 | 115 | <CommandLine condition="is">C:\WINDOWS\system32\devicecensus.exe UserCxt</CommandLine>
|
116 | 116 | <CommandLine condition="is">C:\Windows\System32\usocoreworker.exe -Embedding</CommandLine>
|
117 | 117 | <ParentImage condition="is">C:\Windows\system32\SearchIndexer.exe</ParentImage> <!--Windows:Search: Launches many uninteresting sub-processes-->
|
118 |
| - <!--SECTION: Windows:Defender--> |
119 |
| - <Image condition="begin with">C:\Program Files\Windows Defender</Image> <!--Windows:Defender in Win10--> |
120 |
| - <Image condition="is">C:\Windows\system32\MpSigStub.exe</Image> <!--Windows: Microsoft Malware Protection Signature Update Stub--> |
121 | 118 | <!--SECTION: Windows:svchost-->
|
122 | 119 | <CommandLine condition="is">C:\Windows\system32\svchost.exe -k appmodel -s StateRepository</CommandLine>
|
123 | 120 | <CommandLine condition="is">C:\Windows\system32\svchost.exe -k appmodel -p -s camsvc</CommandLine>
|
|
482 | 479 | <TargetFilename condition="end with">.jnlp</TargetFilename> <!--Java applets-->
|
483 | 480 | <TargetFilename condition="end with">.jse</TargetFilename> <!--Scripting [ Example: https://www.sophos.com/en-us/threat-center/threat-analyses/viruses-and-spyware/Mal~Phires-C/detailed-analysis.aspx ] -->
|
484 | 481 | <TargetFilename condition="end with">.hta</TargetFilename> <!--Scripting-->
|
| 482 | + <TargetFilename condition="end with">.job</TargetFilename> <!--Scheduled task--> |
485 | 483 | <TargetFilename condition="end with">.pptm</TargetFilename> <!--Microsoft:Office:Word: Macro-->
|
486 | 484 | <TargetFilename condition="end with">.ps1</TargetFilename> <!--PowerShell [ More information: http://www.hexacorn.com/blog/2014/08/27/beyond-good-ol-run-key-part-16/ ] -->
|
487 | 485 | <TargetFilename condition="end with">.sys</TargetFilename> <!--System driver files-->
|
|
502 | 500 | <TargetFilename condition="begin with">C:\Windows\SysWOW64\WindowsPowerShell</TargetFilename> <!--Microsoft:Powershell: Look for modifications for persistence [ https://www.malwarearchaeology.com/cheat-sheets ] -->
|
503 | 501 | <TargetFilename name="T1053" condition="begin with">C:\Windows\Tasks\</TargetFilename> <!--Microsoft:ScheduledTasks [ https://attack.mitre.org/wiki/Technique/T1053 ] -->
|
504 | 502 | <TargetFilename name="T1053" condition="begin with">C:\Windows\system32\Tasks</TargetFilename> <!--Microsoft:ScheduledTasks [ https://attack.mitre.org/wiki/Technique/T1053 ] -->
|
| 503 | + <TargetFilename name="T1053" condition="begin with">C:\Windows\SysWOW64\Tasks</TargetFilename> <!--Microsoft:ScheduledTasks [ https://attack.mitre.org/wiki/Technique/T1053 ] --> |
505 | 504 | <Image condition="begin with">\Device\HarddiskVolumeShadowCopy</Image> <!--Nothing should be executing from VSC | Credit: @SBousseaden [ https://twitter.com/SBousseaden/status/1133030955407630336 ] -->
|
506 | 505 | <!--Windows application compatibility-->
|
507 | 506 | <TargetFilename condition="begin with">C:\Windows\AppPatch\Custom</TargetFilename> <!--Windows: Application compatibility shims [ https://www.fireeye.com/blog/threat-research/2017/05/fin7-shim-databases-persistence.html ] -->
|
|
550 | 549 | <!--NOTE: Because Sysmon runs as a service, it has no filtering ability for, or concept of, HKCU or HKEY_CURRENT_USER. Use "contains" or "end with" to get around this limitation-->
|
551 | 550 |
|
552 | 551 | <!-- ! CRITICAL NOTE !: It may appear this section is MISSING important entries, but SOME RULES MONITOR MANY KEYS, so look VERY CAREFULLY to see if something is already covered.
|
553 |
| - Sysmon's wildcard monitoring along with highly-tuned generic strings cuts the rulesets down immensely, compared to doing this in other tools. --> |
| 552 | + Sysmon's wildcard monitoring along with highly-tuned generic strings cuts the rulesets down immensely, compared to doing this in other tools. |
| 553 | + For example, most COM hijacking in CLSID's across the registry is covered by a single rule monitoring a InProcServer32 wildcard--> |
554 | 554 |
|
555 | 555 | <!--DATA: EventType, UtcTime, ProcessGuid, ProcessId, Image, TargetObject, Details (can't filter on), NewName (can't filter on)-->
|
556 | 556 | <RuleGroup name="" groupRelation="or">
|
|
560 | 560 | <!--ADDITIONAL REFERENCE: [ https://view.officeapps.live.com/op/view.aspx?src=https://arsenalrecon.com/downloads/resources/Registry_Keys_Related_to_Autorun.ods ] -->
|
561 | 561 | <!--ADDITIONAL REFERENCE: [ http://www.silentrunners.org/launchpoints.html ] -->
|
562 | 562 | <!--ADDITIONAL REFERENCE: [ https://www.microsoftpressstore.com/articles/article.aspx?p=2762082&seqNum=2 ] -->
|
| 563 | + <!--ADDITIONAL REFERENCE: [ https://web.archive.org/web/20200116001643/http://scholarworks.rit.edu/cgi/viewcontent.cgi?article=1533&context=theses | Understanding malware autostart techniques - Matthew Gottlieb ] --> |
563 | 564 | <TargetObject name="T1060,RunKey" condition="contains">CurrentVersion\Run</TargetObject> <!--Windows: Wildcard for Run keys, including RunOnce, RunOnceEx, RunServices, RunServicesOnce [Also covers terminal server] -->
|
564 | 565 | <TargetObject name="T1060,RunPolicy" condition="contains">Policies\Explorer\Run</TargetObject> <!--Windows: Alternate runs keys | Credit @ion-storm-->
|
565 | 566 | <TargetObject name="T1484" condition="contains">Group Policy\Scripts</TargetObject> <!--Windows: Group policy scripts-->
|
|
575 | 576 | <TargetObject condition="begin with">HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\BootExecute</TargetObject> <!--Windows: Autorun | Credit @ion-storm | [ https://www.cylance.com/windows-registry-persistence-part-2-the-run-keys-and-search-order ] -->
|
576 | 577 | <TargetObject condition="begin with">HKLM\Software\Microsoft\Windows NT\CurrentVersion\AeDebug</TargetObject> <!--Windows: Automatic program crash debug program [ https://www.symantec.com/security_response/writeup.jsp?docid=2007-050712-5453-99&tabid=2 ] -->
|
577 | 578 | <TargetObject condition="contains">UserInitMprLogonScript</TargetObject> <!--Windows: Legacy logon script environment variable [ http://www.hexacorn.com/blog/2014/11/14/beyond-good-ol-run-key-part-18/ ] -->
|
578 |
| - <TargetObject name="T1112,ChangeStartupFolderPath" condition="end with">User Shell Folders\Startup</TargetObject> <!--Monitor changes to Startup folder location for monitoring evasion | Credit @SBousseaden--> |
| 579 | + <TargetObject name="T1112,ChangeStartupFolderPath" condition="end with">user shell folders\startup</TargetObject> <!--Monitor changes to Startup folder location for monitoring evasion | Credit @SBousseaden--> |
579 | 580 | <!--Services-->
|
580 | 581 | <TargetObject name="T1031,T1050" condition="end with">\ServiceDll</TargetObject> <!--Windows: Points to a service's DLL [ https://blog.cylance.com/windows-registry-persistence-part-1-introduction-attack-phases-and-windows-services ] -->
|
581 | 582 | <TargetObject name="T1031,T1050" condition="end with">\ServiceManifest</TargetObject> <!--Windows: Manifest pointing to service's DLL [ https://www.geoffchappell.com/studies/windows/win32/services/svchost/index.htm ] -->
|
|
594 | 595 | <TargetObject name="T1122" condition="contains">{86C86720-42A0-1069-A2E8-08002B30309D}</TargetObject> <!--Windows: Tooltip handler-->
|
595 | 596 | <TargetObject name="T1042" condition="contains">exefile</TargetObject> <!--Windows Executable handler, to log any changes not already monitored-->
|
596 | 597 | <!--Windows COM-->
|
597 |
| - <TargetObject condition="end with">\InprocServer32\(Default)</TargetObject> <!--Windows:COM Object Hijacking [ https://blog.gdatasoftware.com/2014/10/23941-com-object-hijacking-the-discreet-way-of-persistence ] | Credit @ion-storm --> |
| 598 | + <TargetObject name="T1122" condition="end with">\InprocServer32\(Default)</TargetObject> <!--Windows:COM Object Hijacking [ https://blog.gdatasoftware.com/2014/10/23941-com-object-hijacking-the-discreet-way-of-persistence ] | Credit @ion-storm --> |
598 | 599 | <!--Windows shell visual modifications used by malware-->
|
599 | 600 | <TargetObject name="T1158" condition="end with">\Hidden</TargetObject> <!--Windows:Explorer: Some types of malware try to hide their hidden system files from the user, good signal event -->
|
600 | 601 | <TargetObject name="T1158" condition="end with">\ShowSuperHidden</TargetObject> <!--Windows:Explorer: Some types of malware try to hide their hidden system files from the user, good signal event [ Example: https://www.symantec.com/security_response/writeup.jsp?docid=2007-061811-4341-99&tabid=2 ] -->
|
|
605 | 606 | <TargetObject condition="contains">Classes\Directory\</TargetObject> <!--Windows:Explorer: [ https://stackoverflow.com/questions/1323663/windows-shell-context-menu-option ] -->
|
606 | 607 | <TargetObject condition="contains">Classes\Drive\</TargetObject> <!--Windows:Explorer: [ https://stackoverflow.com/questions/1323663/windows-shell-context-menu-option ] -->
|
607 | 608 | <TargetObject condition="contains">Classes\Folder\</TargetObject> <!--Windows:Explorer: ContextMenuHandlers, DragDropHandlers, CopyHookHandlers, [ https://stackoverflow.com/questions/1323663/windows-shell-context-menu-option ] -->
|
| 609 | + <TargetObject condition="contains">Classes\PROTOCOLS\</TargetObject> <!--Windows:Explorer: Protocol handlers--> |
608 | 610 | <TargetObject condition="contains">ContextMenuHandlers\</TargetObject> <!--Windows: [ http://oalabs.openanalysis.net/2015/06/04/malware-persistence-hkey_current_user-shell-extension-handlers/ ] -->
|
609 | 611 | <TargetObject condition="contains">CurrentVersion\Shell</TargetObject> <!--Windows: Shell Folders, ShellExecuteHooks, ShellIconOverloadIdentifers, ShellServiceObjects, ShellServiceObjectDelayLoad [ http://oalabs.openanalysis.net/2015/06/04/malware-persistence-hkey_current_user-shell-extension-handlers/ ] -->
|
610 | 612 | <TargetObject condition="begin with">HKLM\Software\Microsoft\Windows\CurrentVersion\explorer\ShellExecuteHooks</TargetObject> <!--Windows: ShellExecuteHooks-->
|
|
648 | 650 | <TargetObject condition="end with">\3\2500</TargetObject> <!--Microsoft:InternetExplorer: Malware sometimes disables Protected Mode in Internet Zone [ https://blog.avast.com/2013/08/12/your-documents-are-corrupted-from-image-to-an-information-stealing-trojan/ ] -->
|
649 | 651 | <TargetObject condition="end with">\3\1809</TargetObject> <!--Microsoft:InternetExplorer: Malware sometimes disables Pop-up Blocker in Internet Zone [ https://support.microsoft.com/en-us/help/182569/internet-explorer-security-zones-registry-entries-for-advanced-users ] -->
|
650 | 652 | <!--Magic registry keys-->
|
651 |
| - <TargetObject condition="contains">{AB8902B4-09CA-4bb6-B78D-A8F59079A8D5}\</TargetObject> <!--Windows: Thumbnail cache autostart [ http://blog.trendmicro.com/trendlabs-security-intelligence/poweliks-levels-up-with-new-autostart-mechanism/ ] --> |
652 |
| - <TargetObject name="Alert,Sysinternals Tool Used" condition="end with">\EulaAccepted</TargetObject> <!--Sysinternals tool launched. Lots of useful abilities for attackers --> |
653 |
| - <!--Install/Infection artifacts--> |
| 653 | + <TargetObject condition="begin with">HKLM\Software\Classes\CLSID\{AB8902B4-09CA-4BB6-B78D-A8F59079A8D5}\</TargetObject> <!--Windows: Thumbnail cache autostart [ http://blog.trendmicro.com/trendlabs-security-intelligence/poweliks-levels-up-with-new-autostart-mechanism/ ] --> |
| 654 | + <TargetObject condition="begin with">HKLM\Software\Classes\WOW6432Node\CLSID\{AB8902B4-09CA-4BB6-B78D-A8F59079A8D5}\</TargetObject> <!--Windows: Thumbnail cache autostart [ http://blog.trendmicro.com/trendlabs-security-intelligence/poweliks-levels-up-with-new-autostart-mechanism/ ] --> |
| 655 | + <TargetObject condition="begin with">HKLM\Software\Classes\CLSID\{083863F1-70DE-11d0-BD40-00A0C911CE86}\</TargetObject> <!--Windows: DirectX instances--> |
| 656 | + <TargetObject condition="begin with">HKLM\Software\Classes\WOW6432Node\CLSID\{083863F1-70DE-11d0-BD40-00A0C911CE86}\</TargetObject> <!--Windows: DirectX instances--> |
| 657 | + <!--Install/Run artifacts--> |
654 | 658 | <TargetObject condition="end with">\UrlUpdateInfo</TargetObject> <!--Microsoft:ClickOnce: Source URL is stored in this value [ https://subt0x10.blogspot.com/2016/12/mimikatz-delivery-via-clickonce-with.html ] -->
|
655 | 659 | <TargetObject condition="end with">\InstallSource</TargetObject> <!--Windows: Source folder for certain program and component installations-->
|
| 660 | + <TargetObject name="Alert,Sysinternals Tool Used" condition="end with">\EulaAccepted</TargetObject> <!--Sysinternals tool launched. Lots of useful abilities for attackers --> |
656 | 661 | <!--Antivirus tampering-->
|
657 | 662 | <TargetObject name="T1089,Tamper-Defender" condition="end with">\DisableAntiSpyware</TargetObject> <!--Windows:Defender: State modified via registry-->
|
658 | 663 | <TargetObject name="T1089,Tamper-Defender" condition="end with">\DisableAntiVirus</TargetObject> <!--Windows:Defender: State modified via registry-->
|
|
932 | 937 | <QueryName condition="end with">.typekit.net</QueryName> <!--Adobe fonts-->
|
933 | 938 | <QueryName condition="is">cdnjs.cloudflare.com</QueryName>
|
934 | 939 | <QueryName condition="end with">.stackassets.com</QueryName> <!--Stack Overflow-->
|
| 940 | + <QueryName condition="end with">.steamcontent.com</QueryName> |
935 | 941 | <!--Web resources-->
|
936 | 942 | <QueryName condition="end with">.disqus.com</QueryName> <!--Microsoft default exclusion-->
|
937 | 943 | <QueryName condition="end with">.fontawesome.com</QueryName>
|
|
0 commit comments