IIS
W3WP.EXE
ASPX DROPS
T1505.003
DetectionBlue TeamSOCOctober 12, 2026•9 min read

Detecting IIS Web Shells: w3wp.exe Children and New ASPX Files

A web shell turns a web server into a remote console. On IIS, the console always has to run as a child of the worker process — and that parent-child edge is your most reliable tripwire.

Scroll

IIS hosts a large share of the internet-facing Windows estate, which makes its worker process, w3wp.exe, a favourite foothold. Once an attacker lands a script in a web-served directory, every command they run is a child of the application pool. Normal IIS applications rarely launch command interpreters, so process lineage, file creation and request shape combine into a strong, low-noise detection set.

Signals at a Glance

SignalWhereATT&CK
w3wp.exe spawning cmd.exe, powershell.exe, whoami.exe, net.exe or certutil.exeSysmon 1, EDR, Event 4688T1059.003
New .aspx, .ashx, .asmx or .config file in a web root by w3wp.exe or a remote-admin processSysmon 11, EDR file eventsT1505.003
Rarely requested URI that receives mostly POST traffic from few clientsIIS W3C logsT1505.003
Application pool identity running discovery commandsSysmon 1, EDRT1033
Timestamp on a script file older than its creation eventMFT, EDRT1070.006

Process Lineage from the Worker Process

The core detection is simple: w3wp.exe should not launch interpreters or discovery tools in most environments. Start with a broad rule, then add exclusions for the handful of applications you know shell out on purpose.

title: IIS Worker Process Spawning Shell or Discovery Tool
logsource:
  category: process_creation
  product: windows
detection:
  parent:
    ParentImage|endswith: '\w3wp.exe'
  child:
    Image|endswith:
      - '\cmd.exe'
      - '\powershell.exe'
      - '\pwsh.exe'
      - '\whoami.exe'
      - '\net.exe'
      - '\net1.exe'
      - '\certutil.exe'
      - '\bitsadmin.exe'
  filter_known_apps:
    ParentCommandLine|contains: 'ReplaceWithYourKnownAppPool'  # tune/validate
  condition: parent and child and not filter_known_apps
level: high
# Tune/validate: record which app pools legitimately shell out before enabling.

Pair the process rule with a file-creation hunt. New script files in a web root that were not written by your deployment account are the second half of the story:

// Defender / Sentinel (KQL) - script files created in IIS content paths
DeviceFileEvents
| where ActionType == "FileCreated"
| where FolderPath has_any (@"\inetpub\wwwroot", @"\inetpub\", @"\aspnet_client")
| where FileName endswith_cs ".aspx" or FileName endswith_cs ".ashx"
      or FileName endswith_cs ".asmx" or FileName endswith_cs ".config"
| where InitiatingProcessAccountName !in~ ("deploy-svc")  // tune/validate: your CI account
| project Timestamp, DeviceName, FolderPath, FileName, SHA256,
          InitiatingProcessFileName, InitiatingProcessAccountName

IIS Log Patterns

IIS W3C logs rarely prove a web shell on their own, but they are the best way to scope one after the fact and to find shells that run inside the worker process without spawning children. Enable the cs-method, cs-uri-stem, cs(User-Agent) and c-ip fields, and ship them to your SIEM.

Vetted sources

Start from the SigmaHQ w3wp.exe child-process and web-root file-creation rules, the Elastic detection rules for IIS worker process behaviour, and CISA advisories on web shell hunting. Baseline your own environment first — legitimate line-of-business apps sometimes launch helper executables, and that is the main source of false positives.

Build Detections That Fire

Mjolnir Security helps blue teams turn threat intelligence into high-fidelity detections across endpoint, network, identity and cloud telemetry.

Detection EngineeringManaged Detection & ResponseThreat HuntingIncident ResponsePurple Teaming
  • Detection Engineering We build and tune detections mapped to ATT&CK from your own telemetry.
  • Threat Hunting as a Service Hypothesis-driven hunts for the behaviours on this page.
  • 24/7 Incident Response Containment when a detection fires. Call +1 833 403 5875.
Written by: Mjolnir Threat Research (MTAC)  |  Published: October 12, 2026  |  Last reviewed: October 12, 2026