Detection rules › Sigma

Suspicious File Download From IP Via Wget.EXE - Paths

Status
test
Severity
high
Log source
product windows, category process_creation
Author
Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects potentially suspicious file downloads directly from IP addresses and stored in suspicious locations using Wget.exe

MITRE ATT&CK coverage

TacticTechniques
ExecutionNo specific technique

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: Suspicious File Download From IP Via Wget.EXE - Paths
id: 40aa399c-7b02-4715-8e5f-73572b493f33
status: test
description: Detects potentially suspicious file downloads directly from IP addresses and stored in suspicious locations using Wget.exe
references:
    - https://www.gnu.org/software/wget/manual/wget.html
author: Nasreddine Bencherchali (Nextron Systems)
date: 2024-02-23
tags:
    - attack.execution
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\wget.exe'
        - OriginalFileName: 'wget.exe'
    selection_ip:
        CommandLine|re: '://[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'
    selection_http:
        CommandLine|contains: 'http'
    selection_flag:
        - CommandLine|re: '\s-O\s'
        - CommandLine|contains: '--output-document'
    selection_paths:
        - CommandLine|contains:
              - ':\PerfLogs\'
              - ':\Temp\'
              - ':\Users\Public\'
              - ':\Windows\Help\'
              - ':\Windows\Temp\'
              - '\Temporary Internet'
        - CommandLine|contains|all:
              - ':\Users\'
              - '\Favorites\'
        - CommandLine|contains|all:
              - ':\Users\'
              - '\Favourites\'
        - CommandLine|contains|all:
              - ':\Users\'
              - '\Contacts\'
        - CommandLine|contains|all:
              - ':\Users\'
              - '\Pictures\'
    condition: all of selection_*
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_img

selection_img:
    - Image|endswith: '\wget.exe'
    - OriginalFileName: 'wget.exe'

Stage 2: selection_ip

selection_ip:
    CommandLine|re: '://[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'

Stage 3: selection_http

selection_http:
    CommandLine|contains: 'http'

Stage 4: selection_flag

selection_flag:
    - CommandLine|re: '\s-O\s'
    - CommandLine|contains: '--output-document'

Stage 5: selection_paths

selection_paths:
    - CommandLine|contains:
          - ':\PerfLogs\'
          - ':\Temp\'
          - ':\Users\Public\'
          - ':\Windows\Help\'
          - ':\Windows\Temp\'
          - '\Temporary Internet'
    - CommandLine|contains|all:
          - ':\Users\'
          - '\Favorites\'
    - CommandLine|contains|all:
          - ':\Users\'
          - '\Favourites\'
    - CommandLine|contains|all:
          - ':\Users\'
          - '\Contacts\'
    - CommandLine|contains|all:
          - ':\Users\'
          - '\Pictures\'

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
CommandLinematch
  • --output-document corpus 4 (sigma 4)
  • :\PerfLogs\ corpus 11 (sigma 11)
  • :\Temp\ corpus 14 (sigma 14)
  • :\Users\ corpus 6 (sigma 6)
  • :\Users\Public\ corpus 18 (sigma 18)
  • :\Windows\Help\ corpus 2 (sigma 2)
  • :\Windows\Temp\ corpus 16 (sigma 16)
  • \Contacts\ corpus 6 (sigma 6)
  • \Favorites\ corpus 6 (sigma 6)
  • \Favourites\ corpus 6 (sigma 6)
  • \Pictures\ corpus 4 (sigma 4)
  • \Temporary Internet corpus 7 (sigma 7)
  • http corpus 39 (sigma 34, elastic 2, chronicle 2, splunk 1)
CommandLineregex_match
  • ://[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3} corpus 5 (sigma 5)
  • \s-O\s corpus 4 (sigma 4)
Imageends_with
  • \wget.exe corpus 9 (sigma 9)
OriginalFileNameeq
  • wget.exe corpus 3 (sigma 3)