T1608.006

SEO Poisoning

Adversaries manipulate search engine optimization (SEO) rankings to promote malicious infrastructure hosting payloads toward potential victims. Techniques include keyword stuffing in compromised websites (often WordPress/CMS sites), purchasing or planting incoming links to boost site reputation, combining with cloaking and redirect mechanisms to evade crawler scrutiny while serving malicious content to real users, and gaming in-site developer platform searches (GitHub, npm, PyPI) for supply chain lures. The goal is to intercept users conducting legitimate searches and route them to adversary-controlled download sites, directly enabling Drive-by Compromise (T1189). Gootloader is the most extensively documented threat actor leveraging SEO poisoning — compromised WordPress sites rank highly in search results for legal document and business template queries, serving ZIP archives containing obfuscated JavaScript payloads. Detection pivots entirely to victim-side indicators: proxy and web gateway logs capturing HTTP Referer headers from search engines correlating with suspicious file downloads, endpoint telemetry showing browser-spawned script interpreter execution chains, and file system artifacts showing archive extraction followed by script execution in user-writable directories.

Microsoft Sentinel / Defender
kusto
// SEO Poisoning Detection — Victim-side proxy/web gateway telemetry
// Detects search-engine-referred downloads of high-risk file types
let SearchEngineReferers = dynamic([
    'google.com/search', 'bing.com/search', 'yahoo.com/search',
    'duckduckgo.com', 'search.yahoo.com', 'yandex.com/search',
    'google.co.uk', 'google.com.au', 'google.ca', 'google.de',
    'google.fr', 'google.co.jp', 'baidu.com/s'
]);
CommonSecurityLog
| where TimeGenerated > ago(24h)
| where DeviceAction !in ("deny", "block", "drop", "Deny", "Block", "Drop", "reset-both")
| where isnotempty(RequestContext)
| where RequestContext has_any (SearchEngineReferers)
| where RequestURL matches regex @"(?i)\.(zip|exe|msi|js|jse|hta|wsf|ps1|vbs|vbe|dll|iso|img|cab|7z|rar)(\?|#|$)"
| extend RiskCategory = case(
    RequestURL has_any ('.exe', '.dll', '.msi', '.cab'), 'HighRisk-Executable',
    RequestURL has_any ('.js', '.jse', '.hta', '.wsf', '.ps1', '.vbs', '.vbe'), 'HighRisk-Script',
    RequestURL has_any ('.zip', '.iso', '.img', '.7z', '.rar'), 'MediumRisk-Archive',
    'Other'
  )
| extend SearchQuery = url_decode(extract(@"[?&]q=([^&#]+)", 1, RequestContext))
| extend DestDomain = extract(@"https?://([^/]+)", 1, RequestURL)
| extend FileRequested = extract(@"([^/]+\.(zip|exe|msi|js|jse|hta|wsf|ps1|vbs|dll|iso|img|cab|7z|rar))(?:\?|#|$)", 1, RequestURL)
| project TimeGenerated, SourceUserName, SourceIP, DestDomain, FileRequested,
          RequestURL, RequestContext, RiskCategory, SearchQuery,
          RequestClientApplication, DeviceVendor, DeviceProduct, DestinationIP
| sort by TimeGenerated desc
high severity medium confidence

Data Sources

Network Traffic: Network Traffic Content Network Traffic: Network Traffic Flow Application Log: Application Log Content

Required Tables

CommonSecurityLog

False Positives

  • Legitimate software downloads where users search for and directly download vendor-provided installers — particularly common for open-source tools, developer utilities, and freeware; mitigation: maintain an allowlist of trusted software vendor domains
  • IT administrators discovering and downloading troubleshooting or diagnostic tools via web search, particularly ZIP archives and MSI packages
  • Developer workflows where searching for SDK documentation leads to downloading JavaScript sample files or compressed source archives from official project sites
  • Automated patch management or software inventory agents using browser user-agents that may produce referrer headers resembling search engine traffic
  • Security researchers intentionally downloading samples from threat-sharing platforms or malware repositories that appear in search results

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections