Covenant SC.exe Utility Query#

Metadata#

Contributors

Roberto Rodriguez @Cyb3rWard0g

Creation Date

2020/08/05

Modification Date

2020/08/05

Tactics

TA0008

Techniques

T1021.002

Tags

RPC QueryServiceStatus,SMB Svcctl

Dataset Description#

This dataset represents an adversary leveraging the sc.exe utility to query (RPC QueryServiceStatus method) for the statu of a service on a remote endpoint.

Simulation Metadata#

Tools#

type

Name

Module

C2

Covenant

SharpSC

Adversary View#

sc.exe \\WORKSTATION6 query ikeext

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/lateral_movement/host/covenant_sc_query_dcerpc_smb_svcctl.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)