mirror of
https://github.com/valitydev/atomic-threat-coverage.git
synced 2024-11-06 09:35:21 +00:00
5.0 KiB
5.0 KiB
Title | WMIExec VBS Script |
---|---|
Description | Detects suspicious file execution by wscript and cscript |
ATT&CK Tactic | |
ATT&CK Technique | |
Data Needed | |
Trigger | |
Severity Level | critical |
False Positives |
|
Development Status | Development Status wasn't defined for this Detection Rule yet |
References | |
Author | Florian Roth |
Other Tags |
|
Detection Rules
Sigma rule
title: WMIExec VBS Script
id: 966e4016-627f-44f7-8341-f394905c361f
description: Detects suspicious file execution by wscript and cscript
author: Florian Roth
date: 2017/04/07
references:
- https://www.pwc.co.uk/cyber-security/pdf/cloud-hopper-annex-b-final.pdf
tags:
- attack.execution
- attack.g0045
- attack.t1064 # an old one
- attack.t1059.005
logsource:
category: process_creation
product: windows
detection:
selection:
Image: '*\cscript.exe'
CommandLine: '*.vbs /shell *'
condition: selection
fields:
- CommandLine
- ParentCommandLine
falsepositives:
- Unlikely
level: critical
powershell
Get-WinEvent | where {($_.message -match "Image.*.*\\\\cscript.exe" -and $_.message -match "CommandLine.*.*.vbs /shell .*") } | select TimeCreated,Id,RecordId,ProcessId,MachineName,Message
es-qs
(winlog.event_data.Image.keyword:*\\\\cscript.exe AND winlog.event_data.CommandLine.keyword:*.vbs\\ \\/shell\\ *)
xpack-watcher
curl -s -XPUT -H \'Content-Type: application/json\' --data-binary @- localhost:9200/_watcher/watch/966e4016-627f-44f7-8341-f394905c361f <<EOF\n{\n "metadata": {\n "title": "WMIExec VBS Script",\n "description": "Detects suspicious file execution by wscript and cscript",\n "tags": [\n "attack.execution",\n "attack.g0045",\n "attack.t1064",\n "attack.t1059.005"\n ],\n "query": "(winlog.event_data.Image.keyword:*\\\\\\\\cscript.exe AND winlog.event_data.CommandLine.keyword:*.vbs\\\\ \\\\/shell\\\\ *)"\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.Image.keyword:*\\\\\\\\cscript.exe AND winlog.event_data.CommandLine.keyword:*.vbs\\\\ \\\\/shell\\\\ *)",\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 \'WMIExec VBS Script\'",\n "body": "Hits:\\n{{#ctx.payload.hits.hits}}Hit on {{_source.@timestamp}}:\\n CommandLine = {{_source.CommandLine}}\\nParentCommandLine = {{_source.ParentCommandLine}}================================================================================\\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
(Image.keyword:*\\\\cscript.exe AND CommandLine.keyword:*.vbs \\/shell *)
splunk
(Image="*\\\\cscript.exe" CommandLine="*.vbs /shell *") | table CommandLine,ParentCommandLine
logpoint
(Image="*\\\\cscript.exe" CommandLine="*.vbs /shell *")
grep
grep -P '^(?:.*(?=.*.*\\cscript\\.exe)(?=.*.*\\.vbs /shell .*))'