Windows Script Host launching a JScript or JSE file
AN0733's Windows leg, narrowed to what actually separates this technique from its command-interpreter siblings elsewhere in this corpus: not that wscript.exe or cscript.exe ran, but that the file handed to it is a JScript source (.js) or encoded JScript (.jse). Sibling rules already in this corpus key on wscript.exe/cscript.exe/mshta.exe as children of an Office application or explorer.exe without checking which scripting language was invoked, since Windows Script Host runs VBScript and JScript through the same two binaries; this rule is deliberately host-plus-extension only, with no ParentImage gate, so it also catches JScript launched directly (a scheduled task, a shortcut, a double-click) rather than only the Office/browser-spawned case AN0733 highlights. mshta.exe is excluded: an HTA file gives no signal on this command line for which script language it embeds, so including it here would be a claim this logic cannot support. The analytic's correlated network and system-modification legs are separate events with no join Sigma can express, so this rule matches on launch alone. The command-line substring match on `.js` is a known limitation: it would also match a `.json` argument passed alongside the script path, though wscript/cscript invocations are typically single-file and this is not expected to be a meaningful source of noise. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0264, not hand-written and not tested by its author. Any lab result is on this rule's own page.Full descriptionShow less
The detection
The 4 SIEM queries below are previews produced by Siemphony’s own translator, not pySigma, and none has been executed against a real backend — review before you deploy.
detection.yml
Sentinel · KQL
Run this as a search.
DeviceProcessEvents| where ((FolderPath endswith "\\wscript.exe" or FolderPath endswith "\\cscript.exe") and (ProcessCommandLine contains ".js" or ProcessCommandLine contains ".jse"))
Splunk · SPL
Run this as a search.
index=* ((Image="*\\wscript.exe" OR Image="*\\cscript.exe") AND (CommandLine="*.js*" OR CommandLine="*.jse*"))Elastic · ES|QL
Run this as a search.
FROM logs-*| WHERE ((TO_LOWER(process.executable) LIKE "*\\\\wscript.exe" OR TO_LOWER(process.executable) LIKE "*\\\\cscript.exe") AND (TO_LOWER(process.command_line) LIKE "*.js*" OR TO_LOWER(process.command_line) LIKE "*.jse*"))
Wazuh · XML rule
Deploy to your manager — this is a rule, not a search.
<group name="sigma,windows,process_creation,"> <!-- Rule ids must be unique on your manager; 100000+ is the user range. --> <rule id="100000" level="5"> <!-- Set <if_sid> to the decoder/base rule for windows so this only evaluates relevant events. --> <field name="Image" type="pcre2">(?i)(\\wscript\.exe$|\\cscript\.exe$)</field> <field name="CommandLine" type="pcre2">(?i)(\.js|\.jse)</field> <description>Windows Script Host launching a JScript or JSE file</description> <mitre> <id>T1059.007</id> </mitre> </rule></group>
Verdicts · reactions · comments
Community
Verdicts from engineers who actually deployed it, and the conversation around it.
Nobody has run this in a real environment and said what happened.
Verdicts from engineers who deployed it
0 castNo verdicts reported yet. The first one is worth more than the tenth — say what you ran it against.
Log in to report a verdict.
Log in to join the discussion.
No comments yet. Someone who deploys this will have something to say about it.