Skip to content
Threat Feed
medium advisory

Script Interpreter Initiating Local Network Connections

Detection of suspicious network activity where Windows script interpreters (Wscript.exe and Cscript.exe) initiate connections to local IP ranges.

Microsoft Windows Script Host (WSH) binaries, specifically Wscript.exe and Cscript.exe, are frequently utilized by threat actors to execute malicious scripts that facilitate lateral movement or internal payload staging. When these interpreters initiate network connections to private IP address space, it often indicates the retrieval of scripts or modules hosted on internal SMB shares or other local network resources. This behavior is characteristic of post-exploitation activity where attackers leverage trusted system binaries (Living-off-the-Land) to circumvent standard perimeter defenses. Defenders should prioritize visibility into network connections spawned by these processes, as legitimate script execution rarely requires establishing raw socket connections to local network segments.

Impact

Successful exploitation allows an attacker to fetch and execute secondary payloads within an internal network segment, facilitating lateral movement and persistence. This technique helps bridge the gap between initial access and deeper environment compromise, increasing the difficulty for detection tools that only monitor external egress traffic.

Recommendation

  1. Deploy the provided Sigma rule to detect Wscript or Cscript processes initiating local network connections.
  2. Baseline internal script execution to identify legitimate administrative tasks, such as logon scripts or local automation, to reduce false positives.
  3. Enable process-level network connection logging (e.g., Sysmon Event ID 3 or EDR telemetry) to correlate process origin with network socket destination.
  4. Restrict or monitor outbound SMB/RPC connections originating from non-administrative endpoints to sensitive internal file shares.

Immediate actions

Deploy the Sigma rule for Wscript/Cscript local network connections to SIEM

Detection Engineering 48h

Threat Hunt

Search for historical process creation events where Wscript.exe or Cscript.exe spawned network connections to private IP space

T1105 medium medium confidence hunt now

Data: Process creation and Network connection logs

Detection coverage 1

Local Network Connection Initiated By Script Interpreter

medium

Detects Wscript.exe or Cscript.exe initiating network connections to internal/private IP ranges, which may indicate lateral movement or local payload staging.

sigma tactics: command_and_control techniques: T1105 sources: network_connection, windows

Detection queries are available on the platform. Get full rules →