VeriKQL by Kaushik Saha

T1505.003 Web Shell

Persistenceon attack.mitre.org

ATT&CK Enterprise 20.0 · 20.1 released, update in review

How MITRE detects it

DET0394 Web Shell Detection via Server Behavior and File Execution Chains

AN1108 Windows

Unexpected file creation in web directories followed by web server processes (e.g., w3wp.exe) spawning command shells or script interpreters (e.g., cmd.exe, powershell.exe)

MITRE log sourceIn Microsoft Sentinel
WinEventLog:SysmonEventCode=11
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where Source == "Microsoft-Windows-Sysmon" | where EventID in (11)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Provider == "Microsoft-Windows-Sysmon" | where EventID in (11)

Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent.

WinEventLog:SysmonEventCode=1
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where Source == "Microsoft-Windows-Sysmon" | where EventID in (1)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Provider == "Microsoft-Windows-Sysmon" | where EventID in (1)

Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent.

WinEventLog:SecurityEventCode=4624, 4648
  • Windows Security Events via AMA → SecurityEvent
    SecurityEvent | where EventID in (4624, 4648)
  • Security Events via Legacy Agent → SecurityEvent
    SecurityEvent | where EventID in (4624, 4648)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Channel == "Security" | where EventID in (4624, 4648)

The same events land in SecurityEvent (Windows Security Events connectors) or WindowsEvent (Windows Event Forwarding); many built-in rules read SecurityEvent only.

NSM:FlowInbound HTTP POST with suspicious payload size or user-agentNot mapped to Sentinel yet.

AN1109 Linux

File creation of unauthorized script (e.g., .php, .sh) in /var/www/html followed by execution of unexpected system utilities (e.g., curl, bash, nc) by apache/nginx

MITRE log sourceIn Microsoft Sentinel
auditd:SYSCALLnew file created in /var/www/html, /srv/http, or similar web rootNot mapped to Sentinel yet.
auditd:SYSCALLapache2 or nginx spawning sh, bash, or python interpreterNot mapped to Sentinel yet.
NSM:FlowPOST requests to .php, .jsp, .aspx files with high entropy bodyNot mapped to Sentinel yet.

AN1110 macOS

Web servers (e.g., httpd) spawning abnormal processes post file upload into /Library/WebServer/Documents or /usr/local/var/www

MITRE log sourceIn Microsoft Sentinel
macos:unifiedloghttpd spawning bash, zsh, python, or osascriptNot mapped to Sentinel yet.
auditd:SYSCALLfile write operations in /Library/WebServer/DocumentsNot mapped to Sentinel yet.

Content Hub rules tagged with it (5)

Rules tagged with this technique (or a sub-technique) in their metadata. Whether one fits your connectors is the coverage view (M2).

How the Content Hub rules for T1505.003 are built: their tables, filters, joins, schedules and windows.

In Sigma rules

35 SigmaHQ community rules name it in their tags.

Showing 25 of 35: stable rules first, then by level.

Community rules, not Microsoft's, and not checked by VeriKQL (Sigma is not KQL). From SigmaHQ/sigma at f083329, under the Detection Rule License (DRL) 1.1; each rule is credited to its author.

Mitigations

MITRE ATT&CK® is a registered trademark of The MITRE Corporation. VeriKQL is not affiliated with or endorsed by MITRE. ATT&CK data © The MITRE Corporation, used under its terms of use.