<!--
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">
        <!-- Branch 1: cscript.exe is the PARENT process running //e:jscript, excluding AgentHIScript jobs -->
        <Rule name="Jscript Execution Using Cscript App" groupRelation="and">
          <ParentImage name="technique_id=T1059.007,technique_name=JavaScript" condition="image">cscript.exe</ParentImage>
          <ParentCommandLine name="technique_id=T1059.007,technique_name=JavaScript" condition="contains">//e:jscript</ParentCommandLine>
          <ParentCommandLine name="technique_id=T1059.007,technique_name=JavaScript" condition="excludes">/Job:AgentHIScript</ParentCommandLine>
          <CommandLine name="technique_id=T1059.007,technique_name=JavaScript" condition="excludes">/Job:AgentHIScript</CommandLine>
        </Rule>
        <!-- Branch 1 variant: match ParentImage by OriginalFileName instead of path -->
        <Rule name="Jscript Execution Using Cscript App" groupRelation="and">
          <ParentImage name="technique_id=T1059.007,technique_name=JavaScript" condition="not begin with">C:\</ParentImage>
          <!-- OriginalFileName is not available for ParentImage; covered via Image condition above -->
          <!-- This placeholder rule intentionally omitted to avoid invalid schema use;
               OriginalFileName applies only to the launched process, not parent -->
        </Rule>
        <!-- Branch 2: cscript.exe IS the process running //e:jscript, matched via Image -->
        <Rule name="Jscript Execution Using Cscript App" groupRelation="and">
          <Image name="technique_id=T1059.007,technique_name=JavaScript" condition="image">cscript.exe</Image>
          <CommandLine name="technique_id=T1059.007,technique_name=JavaScript" condition="contains">//e:jscript</CommandLine>
          <CommandLine name="technique_id=T1059.007,technique_name=JavaScript" condition="excludes">/Job:AgentHIScript</CommandLine>
          <ParentCommandLine name="technique_id=T1059.007,technique_name=JavaScript" condition="excludes">/Job:AgentHIScript</ParentCommandLine>
        </Rule>
        <!-- Branch 2 variant: cscript.exe IS the process, matched via OriginalFileName -->
        <Rule name="Jscript Execution Using Cscript App" groupRelation="and">
          <OriginalFileName name="technique_id=T1059.007,technique_name=JavaScript" condition="is">cscript.exe</OriginalFileName>
          <CommandLine name="technique_id=T1059.007,technique_name=JavaScript" condition="contains">//e:jscript</CommandLine>
          <CommandLine name="technique_id=T1059.007,technique_name=JavaScript" condition="excludes">/Job:AgentHIScript</CommandLine>
          <ParentCommandLine name="technique_id=T1059.007,technique_name=JavaScript" condition="excludes">/Job:AgentHIScript</ParentCommandLine>
        </Rule>
      </ProcessCreate>
    </RuleGroup>
  </EventFiltering>
</Sysmon>