T1505.004 Elastic Security · Elastic

Detect IIS Components in Elastic Security

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.

MITRE ATT&CK

Tactic
Persistence
Technique
T1505 Server Software Component
Sub-technique
T1505.004 IIS Components
Canonical reference
https://attack.mitre.org/techniques/T1505/004/

Elastic Detection Query

Elastic Security (Elastic)
eql
sequence by host.name with maxspan=1h
  [registry where event.type in ("creation", "change")
    and registry.path : ("*W3SVC*", "*ISAPI Filter*", "*ISAPI Extension*", "*GlobalModules*", "*inetsrv*")
    and registry.value : ("FilterDLLs", "Path", "ImagePath", "DLL", "Filename")
    and registry.data.strings : "*.dll*"]
  [file where event.type in ("creation", "change")
    and file.extension : "dll"
    and file.path : ("*\\system32\\inetsrv\\*", "*\\iis\\*", "*\\inetsrv\\*", "*\\inetpub\\*")
    and not process.name : ("msiexec.exe", "setup.exe", "pkgmgr.exe", "TiWorker.exe", "TrustedInstaller.exe", "wusa.exe", "dism.exe")]
or
any where event.category == "library"
  and process.name : "w3wp.exe"
  and dll.path : ("*\\Users\\*", "*\\Temp\\*", "*\\ProgramData\\*", "*\\AppData\\*", "*\\Windows\\Temp\\*")
  and dll.name : "*.dll"
high severity high confidence

Detects malicious IIS component installation via three correlated signals: (1) ISAPI filter/extension or IIS module DLL paths written to IIS-related registry keys, (2) DLL files dropped into IIS directories by non-installer processes, and (3) w3wp.exe loading DLLs from non-standard user-writable locations. Covers techniques used by RGDoor (OilRig), OwaAuth (TG-3390), and the IceApple post-exploitation framework.

Data Sources

Windows Registry Events (Sysmon EventID 12/13/14)Windows File Events (Sysmon EventID 11)Windows Image Load Events (Sysmon EventID 7)Elastic Endpoint Security agent

Required Tables

logs-endpoint.events.registry-*logs-endpoint.events.file-*logs-endpoint.events.library-*logs-windows.sysmon_operational-*

False Positives & Tuning

  • Legitimate IIS module installation via Microsoft Web Platform Installer or IIS Manager — will produce registry writes and DLL drops in inetsrv with msiexec.exe or similar as the initiating process (whitelisted in query)
  • Third-party web application frameworks (ORDS, ASP.NET modules, URL Rewrite) that install native DLL modules into inetsrv during normal deployment pipelines
  • Security products such as Imperva WAF, F5 iRules, or Dynatrace OneAgent that legitimately install as ISAPI filters or IIS native modules and load from non-default paths
Download portable Sigma rule (.yml)

Other platforms for T1505.004


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1List IIS Global Modules (Detection Audit)

    Expected signal: Sysmon EventCode 1: powershell.exe with CommandLine containing 'Get-WebGlobalModule'. No system changes made.

  2. Test 2Write Test DLL to IIS Directory

    Expected signal: Sysmon EventCode 11: FileCreate with TargetFilename=C:\Windows\System32\inetsrv\df00tech-test.dll, Image=powershell.exe.

  3. Test 3Check applicationHost.config for Module Registrations

    Expected signal: Sysmon EventCode 11: Read access to applicationHost.config (if configured for read monitoring). Sysmon EventCode 1: powershell.exe process.

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

Related Detections