Generating the default configuration
The following commands will generate the default, balanced configuration. This config uses nearly all include and exclude modules and will provide an acceptable amount of volume for most environments. All with the exception of FileDelete events and ClipboardEvents. these have been disabled for disk space preservation and privacy reasons. Use them during IR, not all the time.
Keep in mind that because not everything is configured to be logged that his will impose certain blind spots.
Should that not be acceptable to your organization you could either add additional include modules for certain event types or make use of the more verbose configuration sysmonconfig-exclude-only.xml
Generating custom configs
New Function: Find-RulesInBasePath - takes a base path (i.e. C:\folder\sysmon-modular) and finds all candidate xml rule files based upon regex pattern
Merge-AllSysmonXml New Parameters:
-BasePath - finds all candidate xml rule files from a provided path based upon regex pattern and merges them
-ExcludeList - Combined with -BasePath, takes a list of rules and excludes them from found rules prior to merge
The BasePath must be the full path, otherwise it will not be incorporated
-IncludeList - Combined with -BasePath, finds all available rules from base path but only merges those defined in a list
This also allows you to add a custom folder like: 100_company_tuning and include custom, environment specific module files there.
That way you can keep in sync with the repository and determine what will be enabled/disabled for your own configuration.
Include/Exclude List Format Example:
Generating a full configuration
To utilize all modules and generate a configuration that includes the FileDelete events