T1505.004
IIS Components
Adversaries install malicious ISAPI extensions, ISAPI filters, or IIS modules on Internet Information Services (IIS) web servers to establish persistent access. These components are DLLs loaded by the IIS worker process (w3wp.exe) and have unrestricted access to all HTTP requests and responses. RGDoor (OilRig) and OwaAuth (Threat Group-3390) used this technique. IceApple is an IIS post-exploitation framework with 18 modules. Unlike web shells, IIS components are invisible to directory listing and harder to detect.
Microsoft Sentinel / Defender
kusto
// T1505.004 — Malicious IIS Components detection
// ISAPI filters/extensions registered in IIS configuration and loaded by w3wp.exe
// Part 1: Detect DLL registration in IIS configuration registry paths
let IISComponentReg = DeviceRegistryEvents
| where Timestamp > ago(24h)
| where RegistryKey has_any (
"W3SVC",
"ISAPI Filter",
"ISAPI Extension",
"GlobalModules",
"IIS\\FastCGI",
"system32\\inetsrv"
)
| where RegistryValueName has_any ("FilterDLLs", "Path", "ImagePath", "DLL", "Filename")
| where RegistryValueData has ".dll"
| extend DetectionType = "IIS_Component_Registration"
| project Timestamp, DeviceName, AccountName, RegistryKey, RegistryValueName, RegistryValueData,
InitiatingProcessFileName, InitiatingProcessCommandLine, DetectionType;
// Part 2: Detect DLL writes to IIS directories from unexpected processes
let IISDirWrite = DeviceFileEvents
| where Timestamp > ago(24h)
| where ActionType in ("FileCreated", "FileModified")
| where FolderPath has_any ("\\system32\\inetsrv\\", "\\iis\\",
"\\inetsrv\\", "\\inetpub\\")
| where FileName endswith ".dll"
| where InitiatingProcessFileName !in~ ("msiexec.exe", "setup.exe", "pkgmgr.exe",
"TiWorker.exe", "TrustedInstaller.exe",
"wusa.exe", "dism.exe")
| extend DetectionType = "IIS_DLL_Write"
| project Timestamp, DeviceName, AccountName, FileName, FolderPath,
InitiatingProcessFileName, InitiatingProcessCommandLine, DetectionType;
// Part 3: Detect unusual DLL loads by w3wp.exe from non-standard paths
let IISUnexpectedLoad = DeviceImageLoadEvents
| where Timestamp > ago(24h)
| where InitiatingProcessFileName =~ "w3wp.exe"
| where FolderPath has_any ("\\Users\\", "\\Temp\\", "\\ProgramData\\",
"\\AppData\\", "\\Windows\\Temp\\")
| where FileName endswith ".dll"
| extend DetectionType = "IIS_Non_Standard_DLL_Load"
| project Timestamp, DeviceName, AccountName, FileName, FolderPath,
InitiatingProcessFileName, DetectionType;
union IISComponentReg, IISDirWrite, IISUnexpectedLoad
| sort by Timestamp desc critical severity
high confidence
Data Sources
Windows Registry: Registry Value Modification File: File Creation Module: Module Load Microsoft Defender for Endpoint
Required Tables
DeviceRegistryEvents DeviceFileEvents DeviceImageLoadEvents
False Positives
- Legitimate IIS module installations for anti-virus scanning, WAF, or URL rewriting (URL Rewrite Module, Application Request Routing)
- Windows Updates applying patches to IIS components via TrustedInstaller/wusa
- Third-party web application security products installing ISAPI filters for request inspection
- Web application framework installations (ASP.NET, PHP for Windows, etc.) registering their respective ISAPI extensions
Last updated: 2026-04-20 Research depth: deep
References (5)
- https://attack.mitre.org/techniques/T1505/004/
- https://i.blackhat.com/USA21/Wednesday-Handouts/us-21-Anatomy-Of-Native-Iis-Malware-wp.pdf
- https://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/the-curious-case-of-the-malicious-iis-module/
- https://www.crowdstrike.com/blog/iceapple-a-novel-internet-information-services-post-exploitation-framework/
- https://docs.microsoft.com/en-us/iis/get-started/introduction-to-iis/iis-modules-overview
Unlock Pro Content
Get the full detection package for T1505.004 including response playbook, investigation guide, and atomic red team tests.
Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance