Created
October 18, 2021 11:11
-
-
Save oz9un/079114d034fb93d6dce22e1d0441d2cc to your computer and use it in GitHub Desktop.
SysmonForLinux - Allow only specific ports and protocols.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Sysmon schemaversion="4.70"> | |
<EventFiltering> | |
<!-- Event ID 3 == NetworkConnect Detected. Do not log anything!--> | |
<RuleGroup name="" groupRelation="and"> | |
<NetworkConnect onmatch="exclude"> | |
<Protocol condition="is">tcp</Protocol> | |
<Protocol condition="is">udp</Protocol> | |
<DestinationPort condition="is">80</DestinationPort> | |
<DestinationPort condition="is">443</DestinationPort> | |
</NetworkConnect> | |
</RuleGroup> | |
<!-- BELOW PART DISABLES ALL OTHER LOGS FOR FIXING THE MESS!--> | |
<!-- Event ID 1 == ProcessCreate. Log only ping process. --> | |
<RuleGroup name="" groupRelation="or"> | |
<ProcessCreate onmatch="include"/> | |
</RuleGroup> | |
<!-- Event ID 5 == ProcessTerminate. Do not log anything! --> | |
<RuleGroup name="" groupRelation="or"> | |
<ProcessTerminate onmatch="include"/> | |
</RuleGroup> | |
<!-- Event ID 9 == RawAccessRead. Do not log anything! --> | |
<RuleGroup name="" groupRelation="or"> | |
<RawAccessRead onmatch="include"/> | |
</RuleGroup> | |
<!-- Event ID 10 == ProcessAccess. Do not log anything! --> | |
<RuleGroup name="" groupRelation="or"> | |
<ProcessAccess onmatch="include"/> | |
</RuleGroup> | |
<!-- Event ID 11 == FileCreate. Do not log anything! --> | |
<RuleGroup name="" groupRelation="or"> | |
<FileCreate onmatch="include"/> | |
</RuleGroup> | |
<!--Event ID 23 == FileDelete. Do not log anything! --> | |
<RuleGroup name="" groupRelation="or"> | |
<FileDelete onmatch="include"/> | |
</RuleGroup> | |
</EventFiltering> | |
</Sysmon> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment