Windows System: mshta Launches vbscript:createobject via Service Control Manager (Event ID 7045)

Flags Windows service creation (7045) where ImagePath includes mshta and vbscript:createobject.

FreeReviewedSigma · High · v2
Product
windows
Service
system
Author
Nikita Nazarov, oscd.community (SigmaHQ), DRL 1.1
Published
2020-10-09
Updated
2026-07-31
title: "Windows System: mshta Launches vbscript:createobject via Service Control Manager (Event ID 7045)"
id: 24f9821e-3273-4399-a8d0-bee8523226e8
status: test
description: This rule flags Windows System events where the Service Control Manager (EventID 7045) starts a process whose ImagePath contains both mshta and vbscript:createobject. Attackers commonly use mshta to execute script content and leverage createobject calls to run or stage additional code while reducing visibility. The detection relies on System telemetry for EventID 7045 and string matches within the reported ImagePath.
references:
  - https://github.com/SigmaHQ/sigma/issues/1009
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/builtin/system/service_control_manager/win_system_invoke_obfuscation_via_use_mshta_services.yml
author: Nikita Nazarov, oscd.community, Huntrule Team
date: 2020-10-09
modified: 2022-11-29
tags:
  - attack.stealth
  - attack.t1027
  - attack.execution
  - attack.t1059.001
logsource:
  product: windows
  service: system
detection:
  selection:
    Provider_Name: Service Control Manager
    EventID: 7045
    ImagePath|contains|all:
      - mshta
      - vbscript:createobject
  condition: selection
falsepositives:
  - Unknown
level: high
license: DRL-1.1
related:
  - id: 7e9c7999-0f9b-4d4a-a6ed-af6d553d4af4
    type: derived