<!--
MARDUK  /  SYSMON DYNAMIX

       ,,,,,,,,,,,,,,,,,,,,,,.     ,,,,,,,,,,,,,,,,,,,,,,
       ,,,,,,,,,,,,,,,,,,,,,,.     ,,,,,,,,,,,,,,,,,,,,,,
       ,,,,,,,,,,,,,,,,,,,,,,.     ,,,,,,,,,,,,,,,,,,,,,,
       ,,,,,,,,,,,,,,,,,,,,,,.     ,,,,,,,,,,,,,,,,,,,,,,
       ,,,,,,,,,,,,,,,,,,,,,,.     ,,,,,,,,,,,,,,,,,,,,,,
       ,,,,,,,,,,,,,,,,,,,,,,.     ,,,,,,,,,,,,,,,,,,,,,,
       ,,,,,,,,,,,,,,,,,,,,,,.     ,,,,,,,,,,,,,,,,,,,,,,
       ,,,,,,,,,,,,,,,,,,,,,,.     ,,,,,,,,,,,,,,,,,,,,,,
       ,,,,,,,,,,,,,,,,,,,,,,.     ,,,,,,,,,,,,,,,,,,,,,,
       ,,,,,,,,,,,,,,,,,,,,,,.     ,,,,,,,,,,,,,,,,,,,,,,
       ,,,,,,,,,,,,,,,,,,,,,,.     ,,,,,,,,,,,,,,,,,,,,,,
       ,,,,,,,,,,,..,,,,,,,,,.     ,,,,,,,,,,.,,,,,,,,,,,
       ,,,,,,,,,,,    ..,,,,,.     ,,,,,..    ,,,,,,,,,,,
       ,,,,,,,,,,,        ..,.    .,..        ,,,,,,,,,,,

Detection attribution and licensing are documented in THIRD_PARTY_NOTICES.md.
MITRE ATT&amp;CK mapping: © 2026 The MITRE Corporation. This work is reproduced
and distributed with the permission of The MITRE Corporation.
-->
<Sysmon schemaversion="4.90">
  <EventFiltering>
    <RuleGroup name="" groupRelation="or">
      <!--
        NOTE: This detection ("Detect Rare Executables") is a statistical/behavioral analytic that
        identifies processes seen on fewer than 10 distinct hosts across the environment within a
        given time window. It does not match on specific process names, paths, command lines, hashes,
        or any other fixed field values - the detection condition is purely a low-prevalence threshold
        computed by Splunk's tstats aggregation (dc(Processes.dest) < 10, grouped by process_name).

        This kind of population-level rarity signal cannot be expressed as a Sysmon include rule,
        because Sysmon rules match individual events at collection time against static field patterns -
        they have no mechanism to count distinct destination hosts across the fleet or compare that
        count to a threshold. Any Sysmon rule written here would either match everything (defeating
        the purpose) or match nothing meaningful without the aggregation context.

        The `detect_rare_executables_filter` macro referenced in the SPL could not be resolved from
        the splunk/security_content repository to a specific set of exclusion values, so no filter
        conditions can be represented here either.

        RECOMMENDED APPROACH:
        To complement this Splunk analytic with Sysmon-level telemetry, ensure that Sysmon is
        configured to log ALL process creation events (EventCode 1 / ProcessCreate) with no
        include-filter restrictions, so that Splunk receives the full process inventory needed
        to compute the dc(dest) < 10 rarity threshold. A broad catch-all ProcessCreate rule
        (onmatch="include" with no field filters) is provided below for this purpose. The actual
        rarity-based alerting must remain in Splunk.
      -->
      <ProcessCreate onmatch="include">
        <Rule name="Detect Rare Executables - Broad ProcessCreate Telemetry Collection" groupRelation="and">
          <!--
            This rule captures all process creation events to feed the Splunk
            dc(Processes.dest) < 10 rarity analytic (T1204 - User Execution).
            The rarity threshold cannot be enforced at the Sysmon layer; Splunk
            performs the cross-host aggregation that drives the actual alert.

            Macro `detect_rare_executables_filter` could not be resolved - any
            exclusion values it contains are not reflected here. Review the macro
            definition in your Splunk environment and add appropriate Sysmon
            exclude rules or Splunk post-processing as needed.
          -->
          <Image name="technique_id=T1204,technique_name=User Execution" condition="contains">\\</Image>
        </Rule>
      </ProcessCreate>
    </RuleGroup>
  </EventFiltering>
</Sysmon>