Detection rules › Sigma

Local Network Connection Initiated By Script Interpreter

Status
test
Severity
medium
Log source
product windows, category network_connection
Author
frack113
Source
github.com/SigmaHQ/sigma

Detects a script interpreter (Wscript/Cscript) initiating a local network connection to download or execute a script hosted on a shared folder.

MITRE ATT&CK coverage

TacticTechniques
Command & ControlT1105 Ingress Tool Transfer

Event coverage

ProviderEventTitle
SysmonEvent ID 3Network connection

Rule body yaml

title: Local Network Connection Initiated By Script Interpreter
id: 08249dc0-a28d-4555-8ba5-9255a198e08c
related:
    - id: 992a6cae-db6a-43c8-9cec-76d7195c96fc
      type: derived
status: test
description: |
    Detects a script interpreter (Wscript/Cscript) initiating a local network connection to download or execute a script hosted on a shared folder.
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/28d190330fe44de6ff4767fc400cc10fa7cd6540/atomics/T1105/T1105.md
author: frack113
date: 2022-08-28
modified: 2024-05-31
tags:
    - attack.command-and-control
    - attack.t1105
logsource:
    category: network_connection
    product: windows
detection:
    selection:
        Initiated: 'true'
        Image|endswith:
            - '\wscript.exe'
            - '\cscript.exe'
        # Note: This list is added to avoid duplicate alerting with 992a6cae-db6a-43c8-9cec-76d7195c96fc
        DestinationIp|cidr:
            - '127.0.0.0/8'
            - '10.0.0.0/8'
            - '172.16.0.0/12'
            - '192.168.0.0/16'
            - '169.254.0.0/16'
            - '::1/128'  # IPv6 loopback
            - 'fe80::/10'  # IPv6 link-local addresses
            - 'fc00::/7'  # IPv6 private addresses
    condition: selection
falsepositives:
    - Legitimate scripts
level: medium

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    Initiated: 'true'
    Image|endswith:
        - '\wscript.exe'
        - '\cscript.exe'
    DestinationIp|cidr:
        - '127.0.0.0/8'
        - '10.0.0.0/8'
        - '172.16.0.0/12'
        - '192.168.0.0/16'
        - '169.254.0.0/16'
        - '::1/128'
        - 'fe80::/10'
        - 'fc00::/7'

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
DestinationIpcidr_match
  • 10.0.0.0/8 corpus 9 (kusto 6, elastic 2, sigma 1)
  • 127.0.0.0/8 corpus 10 (kusto 6, sigma 2, elastic 2)
  • 169.254.0.0/16 corpus 9 (kusto 6, elastic 2, sigma 1)
  • 172.16.0.0/12 corpus 9 (kusto 6, elastic 2, sigma 1)
  • 192.168.0.0/16 corpus 9 (kusto 6, elastic 2, sigma 1)
  • ::1/128 corpus 3 (sigma 2, elastic 1)
  • fc00::/7 corpus 2 (sigma 1, elastic 1)
  • fe80::/10 corpus 2 (sigma 1, elastic 1)
Imageends_with
  • \cscript.exe corpus 73 (sigma 73)
  • \wscript.exe corpus 75 (sigma 75)
Initiatedeq
  • true corpus 50 (sigma 50)