Detection rules › Sigma

Outbound Network Connection Initiated By Script Interpreter

Status
test
Severity
high
Log source
product windows, category network_connection
Author
frack113, Florian Roth (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects a script interpreter wscript/cscript opening a network connection to a non-local network. Adversaries may use script to download malicious payloads.

MITRE ATT&CK coverage

TacticTechniques
Command & ControlT1105 Ingress Tool Transfer

Event coverage

ProviderEventTitle
SysmonEvent ID 3Network connection

Rule body yaml

title: Outbound Network Connection Initiated By Script Interpreter
id: 992a6cae-db6a-43c8-9cec-76d7195c96fc
related:
    - id: 08249dc0-a28d-4555-8ba5-9255a198e08c
      type: derived
status: test
description: Detects a script interpreter wscript/cscript opening a network connection to a non-local network. Adversaries may use script to download malicious payloads.
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/28d190330fe44de6ff4767fc400cc10fa7cd6540/atomics/T1105/T1105.md
author: frack113, Florian Roth (Nextron Systems)
date: 2022-08-28
modified: 2024-03-13
tags:
    - attack.command-and-control
    - attack.t1105
logsource:
    category: network_connection
    product: windows
detection:
    selection:
        Initiated: 'true'
        Image|endswith:
            - '\wscript.exe'
            - '\cscript.exe'
    filter_main_local_ranges:
        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
    filter_main_ms_ranges:
        DestinationIp|cidr: '20.0.0.0/11' # Microsoft range, caused some FPs
    condition: selection and not 1 of filter_main_*
falsepositives:
    - Legitimate scripts
level: high

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_main_*

Stage 1: selection

selection:
    Initiated: 'true'
    Image|endswith:
        - '\wscript.exe'
        - '\cscript.exe'

Stage 2: not filter_main_*

filter_main_local_ranges:
    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'
filter_main_ms_ranges:
    DestinationIp|cidr: '20.0.0.0/11'

Exclusions

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
DestinationIpcidr_match10.0.0.0/8
DestinationIpcidr_match127.0.0.0/8
DestinationIpcidr_match169.254.0.0/16
DestinationIpcidr_match172.16.0.0/12
DestinationIpcidr_match192.168.0.0/16
DestinationIpcidr_match20.0.0.0/11
DestinationIpcidr_match::1/128
DestinationIpcidr_matchfc00::/7
DestinationIpcidr_matchfe80::/10

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
Imageends_with
  • \cscript.exe corpus 73 (sigma 73)
  • \wscript.exe corpus 75 (sigma 75)
Initiatedeq
  • true corpus 50 (sigma 50)