Mshta Making Network Connections

edit

Identifies Mshta.exe making outbound network connections. This may indicate adversarial activity, as Mshta is often leveraged by adversaries to execute malicious scripts and evade detection.

Rule type: eql

Rule indices:

  • logs-endpoint.events.*
  • winlogbeat-*
  • logs-windows.*

Severity: medium

Risk score: 21

Runs every: 5 minutes

Searches indices from: now-20m (Date Math format, see also Additional look-back time)

Maximum alerts per execution: 100

Tags:

  • Elastic
  • Host
  • Windows
  • Threat Detection
  • Defense Evasion

Version: 7 (version history)

Added (Elastic Stack release): 7.10.0

Last modified (Elastic Stack release): 8.4.0

Rule authors: Elastic

Rule license: Elastic License v2

Rule query

edit
sequence by process.entity_id with maxspan=10m [process where
event.type in ("start", "process_started") and process.name :
"mshta.exe" and not process.parent.name :
"Microsoft.ConfigurationManagement.exe" and not
(process.parent.executable : "C:\\Amazon\\Amazon
Assistant\\amazonAssistantService.exe" or
process.parent.executable : "C:\\TeamViewer\\TeamViewer.exe") and
not process.args : "ADSelfService_Enroll.hta"] [network where
process.name : "mshta.exe"]

Threat mapping

edit

Framework: MITRE ATT&CKTM

Rule version history

edit
Version 7 (8.4.0 release)
  • Formatting only
Version 5 (7.15.0 release)
  • Formatting only
Version 4 (7.14.0 release)
  • Updated query, changed from:

    sequence by process.entity_id with maxspan=2h [process where
    event.type in ("start", "process_started") and process.name :
    "mshta.exe" and not process.parent.name :
    "Microsoft.ConfigurationManagement.exe" and not
    (process.parent.executable : "C:\\Amazon\\Amazon
    Assistant\\amazonAssistantService.exe" or
    process.parent.executable : "C:\\TeamViewer\\TeamViewer.exe") and
    not process.args : "ADSelfService_Enroll.hta"] [network where
    process.name : "mshta.exe"]
Version 3 (7.12.0 release)
  • Formatting only
Version 2 (7.11.0 release)
  • Formatting only