Mshta VBScript Execute PowerShell¶
Metadata¶
Author |
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.
Datasets Downloads¶
Dataset Type |
Link |
---|---|
Host |
Adversary View¶
mshta vbscript:Execute("CreateObject(""Wscript.Shell"").Run ""powershell -noexit -command Get-Service sysmon"":close")
Explore Mordor Dataset¶
Initialize Analytics Engine¶
from openhunt.mordorutils import *
spark = get_spark()
Download & Process Mordor File¶
mordor_file = "https://raw.githubusercontent.com/OTRF/mordor/master/datasets/small/windows/defense_evasion/host/cmd_mshta_vbscript_execute_psh.zip"
registerMordorSQLTable(spark, mordor_file, "mordorTable")
[+] Processing a Spark DataFrame..
[+] DataFrame Returned !
[+] Temporary SparkSQL View: mordorTable
Get to know your data¶
df = spark.sql(
'''
SELECT Hostname,Channel,EventID, Count(*) as count
FROM mordorTable
GROUP BY Hostname,Channel,EventID
ORDER BY count DESC
'''
)
df.show(truncate=False)
+------------+------------------------------------+-------+-----+
|Hostname |Channel |EventID|count|
+------------+------------------------------------+-------+-----+
|WORKSTATION5|Microsoft-Windows-Sysmon/Operational|12 |401 |
|WORKSTATION5|Microsoft-Windows-Sysmon/Operational|7 |238 |
|WORKSTATION5|Microsoft-Windows-Sysmon/Operational|10 |184 |
|WORKSTATION5|Security |4658 |95 |
|WORKSTATION5|Microsoft-Windows-Sysmon/Operational|13 |48 |
|WORKSTATION5|Security |4656 |48 |
|WORKSTATION5|Security |4690 |48 |
|WORKSTATION5|Security |4663 |32 |
|WORKSTATION5|Microsoft-Windows-Sysmon/Operational|9 |6 |
|WORKSTATION5|Microsoft-Windows-Sysmon/Operational|11 |5 |
|WORKSTATION5|Microsoft-Windows-Sysmon/Operational|1 |3 |
|WORKSTATION5|Microsoft-Windows-Sysmon/Operational|23 |3 |
|WORKSTATION5|Security |4688 |3 |
|WORKSTATION5|System |104 |2 |
|WORKSTATION5|Security |4673 |2 |
|WORKSTATION5|Security |4703 |1 |
|WORKSTATION5|Security |5158 |1 |
|WORKSTATION5|Microsoft-Windows-Sysmon/Operational|17 |1 |
|WORKSTATION5|Security |5156 |1 |
|WORKSTATION5|Microsoft-Windows-Sysmon/Operational|18 |1 |
+------------+------------------------------------+-------+-----+
only showing top 20 rows