Detection rules › Sigma

Remotely Hosted HTA File Executed Via Mshta.EXE

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

Detects execution of the "mshta" utility with an argument containing the "http" keyword, which could indicate that an attacker is executing a remotely hosted malicious hta file

MITRE ATT&CK coverage

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule body

title: Remotely Hosted HTA File Executed Via Mshta.EXE
id: b98d0db6-511d-45de-ad02-e82a98729620
status: test
description: Detects execution of the "mshta" utility with an argument containing the "http" keyword, which could indicate that an attacker is executing a remotely hosted malicious hta file
references:
    - https://www.trendmicro.com/en_us/research/22/e/avoslocker-ransomware-variant-abuses-driver-file-to-disable-anti-Virus-scans-log4shell.html
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-08-08
modified: 2023-02-06
tags:
    - attack.execution
    - attack.stealth
    - attack.t1218.005
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\mshta.exe'
        - OriginalFileName: 'MSHTA.EXE'
    selection_cli:
        CommandLine|contains:
            - 'http://'
            - 'https://'
            - 'ftp://'
    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: '\mshta.exe'
    - OriginalFileName: 'MSHTA.EXE'

Stage 2: selection_cli

selection_cli:
    CommandLine|contains:
        - 'http://'
        - 'https://'
        - 'ftp://'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • ftp:// corpus 13 (sigma 11, elastic 1, kusto 1)
  • http:// corpus 23 (sigma 18, elastic 2, kusto 2, splunk 1)
  • https:// corpus 23 (sigma 18, elastic 2, kusto 2, splunk 1)
field:"CommandLine" kind:match
Imageends_with
  • \mshta.exe corpus 66 (sigma 66)
field:"Image" kind:ends_with value:"\mshta.exe"
OriginalFileNameeq
  • MSHTA.EXE corpus 40 (elastic 21, sigma 13, splunk 6)
field:"OriginalFileName" kind:eq value:"MSHTA.EXE"