T1001.001

Junk Data

Adversaries may add junk data to protocols used for command and control to make detection more difficult. By appending, prepending, or inserting random or meaningless data into C2 communications, adversaries prevent trivial signature-based detection. Examples include SUNBURST appending junk bytes to HTTP C2, P2P ZeuS adding junk data to UDP peer communications, Downdelph inserting pseudo-random characters between meaningful characters in C2 requests, and GoldMax generating decoy traffic to surround malicious traffic. This technique is primarily a network-level obfuscation method, making it challenging to detect purely through host-based telemetry.

Microsoft Sentinel / Defender
kusto
// T1001.001 - Junk Data C2 Obfuscation Detection
// Approach 1: Detect unusually large HTTP payloads with low entropy content ratio (junk padding)
// Combines DeviceNetworkEvents with process context to identify suspicious beaconing patterns
let SuspiciousProcesses = dynamic(["powershell.exe", "pwsh.exe", "cmd.exe", "wscript.exe", "cscript.exe", "mshta.exe", "rundll32.exe", "regsvr32.exe", "svchost.exe", "dllhost.exe"]);
let KnownC2Ports = dynamic([80, 443, 8080, 8443, 4444, 4445, 1080, 3128]);
// Detect high-frequency beaconing with consistent intervals (C2 with junk padding)
let BeaconingActivity = DeviceNetworkEvents
| where Timestamp > ago(24h)
| where ActionType in ("ConnectionSuccess", "HttpConnectionInspected")
| where InitiatingProcessFileName has_any (SuspiciousProcesses)
| where RemoteIPType == "Public"
| where RemotePort in (KnownC2Ports)
| summarize 
    ConnectionCount = count(),
    BytesSentTotal = sum(SentBytes),
    BytesReceivedTotal = sum(ReceivedBytes),
    UniqueRemoteIPs = dcount(RemoteIP),
    ConnectionTimes = make_list(Timestamp, 500),
    RemoteIPs = make_set(RemoteIP, 20),
    RemotePorts = make_set(RemotePort, 20)
    by DeviceName, InitiatingProcessFileName, InitiatingProcessCommandLine, InitiatingProcessId
| where ConnectionCount >= 5
| extend AvgBytesSent = BytesSentTotal / ConnectionCount
| extend AvgBytesReceived = BytesReceivedTotal / ConnectionCount
// Flag processes with high volume outbound (possible junk padding) or very consistent small sends (beaconing)
| where (AvgBytesSent > 5000 and AvgBytesReceived < 500) or (ConnectionCount > 20 and AvgBytesSent between (100 .. 2000))
| project Timestamp = now(), DeviceName, InitiatingProcessFileName, InitiatingProcessCommandLine,
         ConnectionCount, AvgBytesSent, AvgBytesReceived, UniqueRemoteIPs, RemoteIPs, RemotePorts;
// Approach 2: Detect DNS queries with unusually long or high-entropy labels (junk data in DNS C2)
let SuspiciousDNS = DeviceNetworkEvents
| where Timestamp > ago(24h)
| where ActionType == "DnsConnectionInspected" or ActionType == "DnsQueryResponse"
| where isnotempty(RemoteUrl)
| extend DomainLabel = tostring(split(RemoteUrl, ".")[0])
| extend LabelLength = strlen(DomainLabel)
| extend SubdomainDepth = array_length(split(RemoteUrl, "."))
// Long subdomains with random-looking characters are indicative of junk data padding in DNS C2
| where LabelLength > 20 or SubdomainDepth > 6
| where RemoteIPType == "Public"
| summarize
    QueryCount = count(),
    UniqueDomains = dcount(RemoteUrl),
    SampleDomains = make_set(RemoteUrl, 10)
    by DeviceName, InitiatingProcessFileName, InitiatingProcessCommandLine
| where QueryCount >= 3 or UniqueDomains >= 3;
// Combine both signals
BeaconingActivity
| union SuspiciousDNS
| sort by Timestamp desc
medium severity low confidence

Data Sources

Network Traffic: Network Connection Creation Network Traffic: Network Traffic Content Network Traffic: Network Traffic Flow Microsoft Defender for Endpoint

Required Tables

DeviceNetworkEvents

False Positives

  • Legitimate software telemetry agents that send large amounts of diagnostic data to cloud endpoints with asymmetric request/response sizes
  • CDN or streaming applications making many small HTTP requests with varying payload sizes that resemble beaconing patterns
  • DNS-based load balancing or service discovery mechanisms that use long subdomains for routing (e.g., AWS, Azure service endpoints)
  • Software update mechanisms that poll update servers frequently with small request payloads
  • Security monitoring agents (EDR, DLP) that beacon home to management infrastructure on standard ports

Unlock Pro Content

Get the full detection package for T1001.001 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections