Operator On The Wire
Join
← Back to Knowledge Base
BLUE TEAM / THREAT HUNT / WINDOWS / EXECUTION

Script Host Abuse

This note documents detection patterns related to Script Host Abuse within Windows environments.


Direct Indicators

LogEvent IDMeaningForensic ValueNotes
Security4688Process creationCriticalDetects wscript.exe / cscript.exe execution.
Sysmon1Process creationCriticalBest lineage source for script host execution.
Sysmon11File createHighScript drops, temporary outputs, payload staging.
Sysmon3Network connectionHighScript-based download or beaconing.
Sysmon7Image loadedMediumDLL/script engine context.
PowerShell4104Script block loggingMediumUseful when scripts launch PowerShell.

Indirect Indicators

IndicatorWhat To Look ForForensic ValueNotes
Office launches script hostwinword.exe -> wscript.exeCriticalMacro chain signal.
Script host launches shellcmd / powershell childCriticalMulti-stage execution.
Remote script pathUNC / URL / temp scriptCriticalStrong malicious clue.
Hidden execution/B, //E:jscript, //nologoHighCommon stealth flags.
Script in temp/AppDataUser profile stagingHighCommon attacker path.
Short-lived script hostFast launch and exitHighAutomation clue.

Common Tools

ToolUsage
wscript.exeGUI script host
cscript.exeConsole script host
.vbsVBScript execution
.jsJScript execution
.wsfWindows Script File
mshta.exeAdjacent script execution

Relevant Artifacts

  • Security Event ID 4688
  • Sysmon Event IDs 1, 3, 7, 11
  • Prefetch:
    • WSCRIPT.EXE
    • CSCRIPT.EXE
  • Script files:
    • .vbs
    • .js
    • .wsf
  • Amcache / ShimCache
  • MFT / USN for script location
  • EDR process tree

MITRE ATT&CK References

  • T1059.005 Visual Basic
  • T1059.007 JavaScript

Decision Tree

  1. Which script host?

    • wscript
    • cscript
  2. Script location?

    • Temp
    • AppData
    • Network share
  3. Parent suspicious?

    • Office
    • Browser
    • Shell
  4. Child process follows?

    • PowerShell
    • cmd
    • LOLBIN
  5. Expand:

    • Script content
    • Network activity
    • Persistence
  6. Scope:

    • Single script
    • Multi-stage chain
    • Campaign artifact

Example Detection Templates

KQL

SecurityEvent
| where EventID == 4688
| where NewProcessName has_any ("wscript.exe","cscript.exe")
| project TimeGenerated, Computer, ParentProcessName, CommandLine
Sysmon
| where EventID == 1
| where Image has_any ("\\wscript.exe","\\cscript.exe")
| project TimeGenerated, Computer, ParentImage, CommandLine

EQL

process where process.name in ("wscript.exe","cscript.exe")
sequence by host.name with maxspan=5m
  [ process where process.name in ("wscript.exe","cscript.exe") ]
  [ process where process.parent.name in ("wscript.exe","cscript.exe") ]

Sigma

title: Script Host Abuse Detection
id: 4e6a1d25-script-host
status: experimental
description: Detects suspicious Windows Script Host execution
references:
  - https://attack.mitre.org/
author: Vergil
date: 2026-03-07
logsource:
  product: windows
  service: security
detection:
  selection:
    NewProcessName|endswith:
      - '\wscript.exe'
      - '\cscript.exe'
  condition: selection
fields:
  - ParentProcessName
  - CommandLine
falsepositives:
  - Administrative scripts
level: high
tags:
  - attack.execution

Mitigation & Hardening

Control AreaMitigationEffectivenessNotes
Script host monitoringAlert on suspicious parentsCriticalHigh-value signal
Script file controlRestrict script executionHighReduce abuse
Command-line retentionPreserve argumentsCriticalEssential context
Temp path monitoringWatch user profile scriptsHighCommon attacker path
EDR lineageTrack script child chainsCriticalBest visibility