T1056.003 Splunk · SPL

Detect Web Portal Capture in Splunk

Adversaries may install code on externally facing portals, such as a VPN login page, to capture and transmit credentials of users who attempt to log into the service. A compromised login page may log provided user credentials before logging the user in to the service. This variation on input capture may be conducted post-compromise using legitimate administrative access as a backup measure to maintain network access through External Remote Services and Valid Accounts, or as part of the initial compromise by exploitation of the externally facing web service. Notable examples include IceApple's OWA credential logger, WARPWIRE targeting Ivanti VPN portals, and Winter Vivern mimicking government email logon sites.

MITRE ATT&CK

Tactic
Collection Credential Access
Technique
T1056 Input Capture
Sub-technique
T1056.003 Web Portal Capture
Canonical reference
https://attack.mitre.org/techniques/T1056/003/

SPL Detection Query

Splunk (SPL)
spl
index=wineventlog (sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" OR sourcetype="WinEventLog:Security")
(
  (EventCode=11 (TargetFilename="*\\inetpub\\*" OR TargetFilename="*\\wwwroot\\*" OR TargetFilename="*\\owa\\*" OR TargetFilename="*\\ecp\\*" OR TargetFilename="*\\vpn\\*" OR TargetFilename="*\\sslvpn\\*")
   (TargetFilename="*.aspx" OR TargetFilename="*.asp" OR TargetFilename="*.php" OR TargetFilename="*.js" OR TargetFilename="*.config" OR TargetFilename="*.jsp")
   (Image="*\\w3wp.exe" OR Image="*\\iisexpress.exe" OR Image="*\\httpd.exe" OR Image="*\\nginx.exe"))
  OR
  (EventCode=1 (ParentImage="*\\w3wp.exe" OR ParentImage="*\\iisexpress.exe" OR ParentImage="*\\httpd.exe")
   (Image="*\\cmd.exe" OR Image="*\\powershell.exe" OR Image="*\\sh.exe" OR Image="*\\bash.exe" OR Image="*\\net.exe" OR Image="*\\whoami.exe"))
  OR
  (EventCode=1 (Image="*\\w3wp.exe" OR Image="*\\iisexpress.exe")
   (CommandLine="*password*" OR CommandLine="*credential*" OR CommandLine="*username*" OR CommandLine="*passwd*"))
)
| eval EventType=case(
    EventCode=11, "WebFileCreation",
    EventCode=1 AND match(ParentImage, "(w3wp|iisexpress|httpd|nginx)"), "WebShellSpawn",
    EventCode=1 AND match(Image, "(w3wp|iisexpress)"), "WebProcessExec",
    true(), "Unknown")
| eval WebPortalIndicator=if(match(TargetFilename, "(inetpub|wwwroot|owa|ecp|vpn|sslvpn|exchange)"), 1, 0)
| eval CredentialKeyword=if(match(lower(CommandLine), "(password|passwd|credential|username|login|auth|token|session)"), 1, 0)
| eval SpawnedShell=if(match(Image, "(cmd\.exe|powershell\.exe|sh\.exe|bash\.exe)") AND match(ParentImage, "(w3wp|iisexpress|httpd|nginx)"), 1, 0)
| eval SuspicionScore=WebPortalIndicator + CredentialKeyword + SpawnedShell
| table _time, host, EventCode, EventType, Image, CommandLine, ParentImage, ParentCommandLine, TargetFilename, User, SuspicionScore
| sort - _time
high severity medium confidence

Detects web portal credential capture using Sysmon events. Monitors for file creation events (EventCode 11) in IIS/web portal directories by web server processes, and web server processes (w3wp.exe, iisexpress.exe, httpd.exe) spawning command shells (EventCode 1). Assigns a suspicion score based on multiple indicators: web portal path presence, credential-related keywords in command lines, and shell processes spawned by web servers.

Data Sources

File: File CreationProcess: Process CreationSysmon Event ID 1Sysmon Event ID 11

Required Sourcetypes

XmlWinEventLog:Microsoft-Windows-Sysmon/OperationalWinEventLog:Security

False Positives & Tuning

  • Legitimate web application deployments via deployment pipelines that use w3wp.exe to create or modify web files
  • IIS application pool management scripts that legitimately spawn cmd.exe or powershell.exe for configuration
  • Web application frameworks generating compiled or cached files (e.g., ASP.NET temporary files) in web directories
  • Automated certificate renewal scripts modifying web.config or application configuration files
Download portable Sigma rule (.yml)

Other platforms for T1056.003


Testing Methodology

Validate this detection against 4 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 1Simulate Credential Capture File Creation in IIS Web Root

    Expected signal: Sysmon Event ID 11 (FileCreate): TargetFilename=C:\inetpub\wwwroot\login_helper.php, Image=cmd.exe. DeviceFileEvents: ActionType=FileCreated, FolderPath contains \inetpub\wwwroot\, FileName=login_helper.php. Security Event 4663 if SACL auditing is enabled on the wwwroot directory.

  2. Test 2Web Server Process Spawning Command Shell (WebShell Simulation)

    Expected signal: Sysmon Event ID 1 (Process Create): Image=cmd.exe, ParentImage=powershell.exe, CommandLine containing 'whoami'. Sysmon Event ID 11: TargetFilename=C:\Windows\Temp\webshell_test.txt. Security Event 4688 with NewProcessName=cmd.exe if process creation auditing is enabled.

  3. Test 3Inject Credential Capture Code into Existing ASPX Login Page

    Expected signal: Sysmon Event ID 11 (FileCreate/Modify): TargetFilename=C:\inetpub\wwwroot\testportal\login.aspx, Image=powershell.exe. DeviceFileEvents: ActionType=FileModified, FileName=login.aspx, FolderPath contains \inetpub\wwwroot\. Security Event 4663 if SACL file auditing is configured on the web root.

  4. Test 4Simulate Credential Exfiltration via Web Server Outbound HTTP

    Expected signal: Sysmon Event ID 3 (Network Connection): Image=powershell.exe, DestinationIp=127.0.0.1, DestinationPort=9001, Protocol=tcp. DeviceNetworkEvents: InitiatingProcessFileName=powershell.exe, RemotePort=9001. PowerShell ScriptBlock Log Event ID 4104 showing the HTTP POST with credential parameters.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections