<!--
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">
      <ProcessCreate onmatch="include">
        <!--
          Detection: Unusually Long Command Line
          NOTE: This detection uses statistical thresholds (mean + 3*stdev per host) computed
          across all observed command lines - logic that cannot be replicated as a static
          Sysmon string-match rule. The rules below approximate the intent by flagging
          command lines whose raw length exceeds a conservative fixed threshold (1024 chars),
          which covers the most common obfuscated/encoded payload patterns. Tune the
          'more than' value to match your environment's baseline.

          MITRE ATT&amp;CK: No specific technique ID was provided for this detection.
          The behavior (unusually long / obfuscated command lines) most closely maps to
          T1027 (Obfuscated Files or Information), which is used below as the tag.

          macro `security_content_summariesonly` - resolves to a standard tstats summary
          index filter; no additional field conditions to add.
          macro `unusually_long_command_line_filter` - whitelist/exception macro from
          security_content; exact contents could not be confidently resolved from the
          repository, so no exclusions have been applied here. Review and add environment-
          specific exclusions as needed.
        -->
        <Rule name="Unusually Long Command Line" groupRelation="and">
          <CommandLine name="technique_id=T1027,technique_name=Obfuscated Files or Information" condition="more than">1024</CommandLine>
        </Rule>
      </ProcessCreate>
    </RuleGroup>
  </EventFiltering>
</Sysmon>