atomic-threat-coverage/Atomic_Threat_Coverage/Detection_Rules/win_mavinject_proc_inj.md
2020-10-07 00:26:25 +02:00

4.9 KiB

Title MavInject Process Injection
Description Detects process injection using the signed Windows tool Mavinject32.exe
ATT&CK Tactic This Detection Rule wasn't mapped to ATT&CK Tactic yet
ATT&CK Technique
Data Needed
Trigger
Severity Level critical
False Positives
  • unknown
Development Status experimental
References
Author Florian Roth

Detection Rules

Sigma rule

title: MavInject Process Injection
id: 17eb8e57-9983-420d-ad8a-2c4976c22eb8
status: experimental
description: Detects process injection using the signed Windows tool Mavinject32.exe
references:
    - https://twitter.com/gN3mes1s/status/941315826107510784
    - https://reaqta.com/2017/12/mavinject-microsoft-injector/
    - https://twitter.com/Hexacorn/status/776122138063409152
author: Florian Roth
date: 2018/12/12
modified: 2020/09/01
tags:
    - attack.t1055          # an old one
    - attack.t1055.001
    - attack.t1218
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        CommandLine: '* /INJECTRUNNING *'
    condition: selection
falsepositives:
    - unknown
level: critical

powershell

Get-WinEvent | where {$_.message -match "CommandLine.*.* /INJECTRUNNING .*" } | select TimeCreated,Id,RecordId,ProcessId,MachineName,Message

es-qs

winlog.event_data.CommandLine.keyword:*\\ \\/INJECTRUNNING\\ *

xpack-watcher

curl -s -XPUT -H \'Content-Type: application/json\' --data-binary @- localhost:9200/_watcher/watch/17eb8e57-9983-420d-ad8a-2c4976c22eb8 <<EOF\n{\n  "metadata": {\n    "title": "MavInject Process Injection",\n    "description": "Detects process injection using the signed Windows tool Mavinject32.exe",\n    "tags": [\n      "attack.t1055",\n      "attack.t1055.001",\n      "attack.t1218"\n    ],\n    "query": "winlog.event_data.CommandLine.keyword:*\\\\ \\\\/INJECTRUNNING\\\\ *"\n  },\n  "trigger": {\n    "schedule": {\n      "interval": "30m"\n    }\n  },\n  "input": {\n    "search": {\n      "request": {\n        "body": {\n          "size": 0,\n          "query": {\n            "bool": {\n              "must": [\n                {\n                  "query_string": {\n                    "query": "winlog.event_data.CommandLine.keyword:*\\\\ \\\\/INJECTRUNNING\\\\ *",\n                    "analyze_wildcard": true\n                  }\n                }\n              ],\n              "filter": {\n                "range": {\n                  "timestamp": {\n                    "gte": "now-30m/m"\n                  }\n                }\n              }\n            }\n          }\n        },\n        "indices": [\n          "winlogbeat-*"\n        ]\n      }\n    }\n  },\n  "condition": {\n    "compare": {\n      "ctx.payload.hits.total": {\n        "not_eq": 0\n      }\n    }\n  },\n  "actions": {\n    "send_email": {\n      "throttle_period": "15m",\n      "email": {\n        "profile": "standard",\n        "from": "root@localhost",\n        "to": "root@localhost",\n        "subject": "Sigma Rule \'MavInject Process Injection\'",\n        "body": "Hits:\\n{{#ctx.payload.hits.hits}}{{_source}}\\n================================================================================\\n{{/ctx.payload.hits.hits}}",\n        "attachments": {\n          "data.json": {\n            "data": {\n              "format": "json"\n            }\n          }\n        }\n      }\n    }\n  }\n}\nEOF\n

graylog

CommandLine.keyword:* \\/INJECTRUNNING *

splunk

CommandLine="* /INJECTRUNNING *"

logpoint

CommandLine="* /INJECTRUNNING *"

grep

grep -P '^.* /INJECTRUNNING .*'