T1659

Content Injection

This detection identifies adversary content injection attacks where malicious payloads are delivered by manipulating in-transit network traffic between victims and legitimate online services. Rather than hosting payloads on attacker-controlled websites, adversaries operating at a compromised network position—such as a compromised ISP or routing infrastructure—intercept and modify DNS, HTTP, or SMB responses before they reach the victim. The detection focuses on three behavioral indicators: suspicious interpreter or downloader processes spawned by web browsers or Windows Update components following unencrypted HTTP connections to known update domains; HTTP connections to Microsoft update infrastructure over plaintext port 80 (which should exclusively use HTTPS/443); and DNS resolutions of trusted domains returning IP addresses outside expected authoritative ranges. Known threat activity consistent with this technique includes MoustachedBouncer injecting fake Windows Update pages to deploy malware against diplomatic targets in Belarus, and the Disco implant achieving initial access through injected DNS, HTTP, and SMB replies that redirected victims to attacker-controlled download servers.

Microsoft Sentinel / Defender
kusto
let LookbackTime = 1d;
let UpdateDomains = dynamic(["windowsupdate.com", "update.microsoft.com", "download.microsoft.com", "delivery.mp.microsoft.com"]);
let SuspiciousChildren = dynamic(["wscript.exe", "cscript.exe", "mshta.exe", "rundll32.exe", "regsvr32.exe", "certutil.exe", "bitsadmin.exe", "msiexec.exe", "powershell.exe", "cmd.exe"]);
let InjectionParents = dynamic(["svchost.exe", "wuauclt.exe", "usoclient.exe", "chrome.exe", "firefox.exe", "msedge.exe", "iexplore.exe"]);
let HttpUpdateConnections = DeviceNetworkEvents
| where TimeGenerated > ago(LookbackTime)
| where RemotePort == 80
| where RemoteUrl has_any (UpdateDomains)
| project DeviceId, DeviceName, NetworkTime = TimeGenerated, RemoteIP, RemoteUrl;
let SuspiciousSpawns = DeviceProcessEvents
| where TimeGenerated > ago(LookbackTime)
| where InitiatingProcessFileName in~ (InjectionParents)
| where FileName in~ (SuspiciousChildren)
| where ProcessCommandLine has_any ("http://", "invoke-webrequest", "wget", "curl", "-enc ", "download", "bitsadmin")
    or FolderPath has "temp" or FolderPath has "downloads"
| project DeviceId, DeviceName, ProcessTime = TimeGenerated, FileName, FolderPath, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine, AccountName, SHA256;
HttpUpdateConnections
| join kind=inner SuspiciousSpawns on DeviceId
| where abs(datetime_diff('second', NetworkTime, ProcessTime)) <= 300
| project NetworkTime, ProcessTime, DeviceName, AccountName, RemoteIP, RemoteUrl, SuspiciousProcess = FileName, SuspiciousProcessPath = FolderPath, ProcessCommandLine, ParentProcess = InitiatingProcessFileName, ParentCommandLine = InitiatingProcessCommandLine, SHA256, TimeDeltaSec = abs(datetime_diff('second', NetworkTime, ProcessTime))
| order by NetworkTime desc
high severity medium confidence

Data Sources

Microsoft Defender for Endpoint

Required Tables

DeviceNetworkEvents DeviceProcessEvents

False Positives

  • Legacy enterprise systems still configured to use HTTP for Windows Update (pre-WSUS TLS migration) may generate benign HTTP connections to update domains matched by the network filter
  • Corporate WSUS or SCCM proxy servers that use HTTP internally to redistribute updates will cause svchost.exe to connect to update domains over port 80 as a legitimate workflow
  • IT automation tools (SCCM client actions, Intune management extensions, Ansible) that legitimately spawn PowerShell or cmd.exe via svchost.exe as part of managed patch workflows
  • Developers testing HTTP client libraries or update utilities who manually trigger download cradles from a browser session within the 5-minute correlation window

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections