action: global
title: Invoke-Obfuscation Via Use MSHTA
description: Detects Obfuscated Powershell via use MSHTA in Scripts
status: experimental
author: Nikita Nazarov, oscd.community
date: 2020/10/09
modified: 2021/08/09
references:
    - https://github.com/Neo23x0/sigma/issues/1009 #(Task31)
tags:
    - attack.defense_evasion
    - attack.t1027
    - attack.execution
    - attack.t1059.001
falsepositives:
    - Unknown
level: high
detection:
    selection:
        ImagePath|re: '(?i).*(set).*(&&).*(mshta).*(vbscript:createobject).*(\.run).*\(window\.close\).*"'
    condition: selection and selection_eventid
---
id: 7e9c7999-0f9b-4d4a-a6ed-af6d553d4af4
logsource:
    product: windows
    service: system
detection:
    selection_eventid:
        EventID: 7045
---
id: a4e82ad2-7430-4ee8-b858-6ad6099773fa
logsource:
    product: windows
    category: driver_load
detection:
    selection_eventid:
        EventID: 6
---
id: 9b8d9203-4e0f-4cd9-bb06-4cc4ea6d0e9a
logsource:
    product: windows
    service: security
detection:
    selection_eventid:
        EventID: 4697
