Mshta VBScript Execute PowerShell

Metadata

Contributors

Roberto Rodriguez @Cyb3rWard0g

Creation Date

2020/10/22

Modification Date

2020/10/22

Tactics

TA0005

Techniques

T1218.005

Tags

art.906865c3-e05f-4acc-85c4-fbc185455095

Dataset Description

This dataset represents threat actors leveraging mshta.exe to proxy execute malicious powershell commands via vbscript.

Simulation Metadata

Tools

type

Name

Module

Manual

Cmd

Cmd

Adversary View

mshta vbscript:Execute("CreateObject(""Wscript.Shell"").Run ""powershell -noexit -command Get-Service sysmon"":close")

Explore Datasets

Download & Decompress Dataset

import requests
from zipfile import ZipFile
from io import BytesIO

url = https://raw.githubusercontent.com/OTRF/Security-Datasets/master/datasets/atomic/windows/defense_evasion/host/cmd_mshta_vbscript_execute_psh.zip
zipFileRequest = requests.get(url)
zipFile = ZipFile(BytesIO(zipFileRequest.content))
datasetJSONPath = zipFile.extract(zipFile.namelist()[0])

Read JSON File

from pandas.io import json

df = json.read_json(path_or_buf=datasetJSONPath, lines=True)

Access Security Events

df.groupby(['Channel']).size().sort_values(ascending=False)