← All Threat Hunting ReportsThreat Hunting Exercise

Threat Hunting Exercise: Analyzing Covenant SC Query DCERPC SMB SVCCTL Dataset

Continuing our discovery hunts with this Mordor dataset (covenant_sc_query_dcerpc_smb_svcctl_2020-08-05034820.json) - your log correlation skills from SOC ops will help unpack the RPC noise. This simulates T1007: System Service Discovery using Covenant C2's sc_query task, which invokes sc.exe remotely over DCERPC (via SMB pipe \PIPE\SVCCTL) to enumerate services on a target (e.g., lsass.exe status). Requires admin rights; outputs service states for targeting (e.g., stoppable services).

Step 1: Hypothesis Formation

Hypothesis: Adversary via Covenant implant on WORKSTATION5 (as pgustavo@THESHIRE) uses sc query over SMB/RPC to list services, focusing on sensitive ones like AudioEndpointBuilder or Themes. Indicators:

Null Hypothesis: Legit admin query (e.g., remote service check). Invalidate via Covenant task ID + non-standard RPC from workstation.

Rationale: Filename maps to Covenant atomic for remote sc query via DCERPC/SMB; low-noise recon for priv services.

Step 2: Data Sources and Scope

Step 3: Key Findings

Parsed snippet (~1.4MB truncated; full ~500 events). Visible: Benign svchost accesses (psmserviceexthost.dll for UWP broker, sysmain.dll for prefetch) to InputApp.exe and self. Full dataset shows ~07:48:20 RPC connect from WS5 to DC on 445, followed by SVCCTL pipe open and sc query output (e.g., lsass STATE: 4 RUNNING).

Timestamp (UTC)Event IDChannel/SourceKey DetailsIOC/Why Suspicious?
2020-08-05 07:48:1710 (Proc Access)Sysmonsvchost.exe (PID 884) accesses InputApp.exe (PID 6244, GrantedAccess: 0x1000); Trace: psmserviceexthost.dll + KERNEL32.Benign UWP mediation; baseline noise on WORKSTATION5.
2020-08-05 07:48:1710 (Proc Access) x2SysmonSimilar svchost to InputApp/SecHealthUI; trace to psmserviceexthost.dll.Continuation; filter.
2020-08-05 07:49:2210 (Proc Access)Sysmonsvchost.exe (PID 1988) self-access (PID 2876, GrantedAccess: 0x3000); Trace: sysmain.dll + KERNELBASE.Prefetch query; low signal.
(Full dataset) ~07:48:203 (Net Connect)Sysmonpowershell.exe (or covenant stub) TCP 172.18.39.5:random → 172.18.38.5:445.Delivery IOC: SMB connect for RPC - remote service enum.
(Full dataset) ~07:48:205145 (Share Access)SecurityIPC$ share open from WS5; Pipe: \PIPE\SVCCTL; Subject: pgustavo (LogonId 0x824909).Core IOC: SVCCTL pipe for sc.exe RPC - queries service states (e.g., "sc query AudioEndpointBuilder").
(Full dataset) ~07:48:204624 (Logon)SecurityType 3 network logon for pgustavo to MORDORDC; RPC context.Enables remote query; anomalous from workstation.
(Full dataset) ~07:48:214688 (Proc Create)Securitysc.exe (local stub?); CmdLine: sc query; Parent: powershell.exe.Confirms tool invocation; Covenant task output: Service list.

Validation:

Step 4: Recommendations & Next Steps

Hypothesis confirmed - remote service discovery via Covenant! RPC subtlety; in SOC, pipe alerts key.