T1505 Sumo Logic CSE · Sumo

Detect Server Software Component in Sumo Logic CSE

Adversaries may abuse legitimate extensible development features of servers to establish persistent access to systems. Enterprise server applications include features that allow developers to write and install software or scripts to extend the main application's functionality. Adversaries exploit this by installing malicious server software components such as web shells (ASP/ASPX/PHP/JSP files granting remote command execution), SQL stored procedures (particularly xp_cmdshell for OS command execution), IIS native modules or ISAPI filters, Microsoft Exchange transport agents, terminal services DLLs, and vSphere Installation Bundles (VIBs). These components persist across reboots, blend into legitimate server traffic, and provide direct OS-level access under the context of the server process account — making them difficult to detect without proper process lineage monitoring and web root integrity controls.

MITRE ATT&CK

Tactic
Persistence
Technique
T1505 Server Software Component
Canonical reference
https://attack.mitre.org/techniques/T1505/

Sumo Detection Query

Sumo Logic CSE (Sumo)
sql
(_sourceCategory="windows/sysmon" OR _sourceCategory="sysmon" OR _sourceCategory="endpoint/sysmon")
| parse "<EventID>*</EventID>" as event_id nodrop
| parse "<Data Name='Image'>*</Data>" as image nodrop
| parse "<Data Name='ParentImage'>*</Data>" as parent_image nodrop
| parse "<Data Name='CommandLine'>*</Data>" as command_line nodrop
| parse "<Data Name='ParentCommandLine'>*</Data>" as parent_command_line nodrop
| parse "<Data Name='TargetFilename'>*</Data>" as target_filename nodrop
| parse "<Data Name='TargetObject'>*</Data>" as target_object nodrop
| parse "<Data Name='Details'>*</Data>" as registry_details nodrop
| parse "<Data Name='User'>*</Data>" as event_user nodrop
| parse "<Data Name='Computer'>*</Data>" as computer nodrop
| where event_id in ("1","11","13")
| where
  // Signal 1: Web server spawning suspicious child process
  (
    event_id = "1"
    and (
      parent_image matches "*w3wp.exe" or parent_image matches "*httpd.exe"
      or parent_image matches "*nginx.exe" or parent_image matches "*tomcat*"
      or parent_image matches "*java.exe" or parent_image matches "*php-cgi.exe"
      or parent_image matches "*perl.exe" or parent_image matches "*python.exe"
      or parent_image matches "*ruby.exe" or parent_image matches "*node.exe"
    )
    and (
      image matches "*cmd.exe" or image matches "*powershell.exe"
      or image matches "*pwsh.exe" or image matches "*wscript.exe"
      or image matches "*cscript.exe" or image matches "*mshta.exe"
      or image matches "*rundll32.exe" or image matches "*regsvr32.exe"
      or image matches "*certutil.exe" or image matches "*net.exe"
      or image matches "*net1.exe" or image matches "*whoami.exe"
      or image matches "*systeminfo.exe" or image matches "*nltest.exe"
      or image matches "*curl.exe" or image matches "*wget.exe"
      or image matches "*hostname.exe" or image matches "*ipconfig.exe"
    )
  )
  or
  // Signal 2: Suspicious web file written to web root directories
  (
    event_id = "11"
    and (
      target_filename matches "*\\inetpub\\*" or target_filename matches "*\\wwwroot\\*"
      or target_filename matches "*\\htdocs\\*" or target_filename matches "*\\webapps\\*"
      or target_filename matches "*\\public_html\\*" or target_filename matches "*/var/www/*"
      or target_filename matches "*/srv/www/*" or target_filename matches "*/usr/share/nginx/*"
    )
    and (
      target_filename matches "*.aspx" or target_filename matches "*.asp"
      or target_filename matches "*.php" or target_filename matches "*.jsp"
      or target_filename matches "*.jspx" or target_filename matches "*.cfm"
      or target_filename matches "*.ashx" or target_filename matches "*.asmx"
      or target_filename matches "*.phtml" or target_filename matches "*.shtml"
    )
    and not (
      image matches "*msiexec.exe" or image matches "*setup.exe"
      or image matches "*devenv.exe" or image matches "*code.exe"
      or image matches "*explorer.exe" or image matches "*robocopy.exe"
      or image matches "*xcopy.exe" or image matches "*w3wp.exe"
    )
  )
  or
  // Signal 3: IIS native module / ISAPI filter DLL registered via registry
  (
    event_id = "13"
    and (
      target_object matches "*\\CurrentControlSet\\Services\\W3SVC*"
      or target_object matches "*\\SOFTWARE\\Microsoft\\InetStp*"
      or target_object matches "*\\CurrentControlSet\\Services\\WAS*"
    )
    and registry_details matches "*.dll"
    and not (
      image matches "*msiexec.exe" or image matches "*TrustedInstaller.exe"
      or image matches "*wusa.exe"
    )
  )
| eval detection_type = if(event_id = "1", "WebShell_ChildProcess",
    if(event_id = "11", "SuspiciousWebFile_Written",
    if(event_id = "13", "IIS_Module_Registered", "Unknown")))
| eval severity_rating = if(
    event_id = "1" and (image matches "*cmd.exe" or image matches "*powershell.exe"
      or image matches "*pwsh.exe" or image matches "*wscript.exe"
      or image matches "*cscript.exe" or image matches "*mshta.exe"), "Critical",
    if(event_id in ("1","11","13"), "High", "Medium"))
| fields _messageTime, computer, event_user, image, command_line, parent_image, parent_command_line, target_filename, target_object, registry_details, detection_type, severity_rating
| sort by _messageTime desc
high severity high confidence

Sumo Logic query detecting T1505 server software component persistence across three Sysmon event types: process creation (EventID 1) for web shell child process execution, file creation (EventID 11) for web shell files dropped in web roots, and registry modification (EventID 13) for unauthorized IIS module DLL registration. Includes detection type classification and severity scoring.

Data Sources

Sysmon logs via Sumo Logic Installed CollectorWindows Event Forwarding

Required Tables

Sumo Logic Continuous Intelligence (CIP) — Sysmon source category

False Positives & Tuning

  • Software deployment automation (Ansible, Chef, Puppet) writing configuration files with web-compatible extensions (.php, .asp) to web directories as part of scheduled maintenance — add known deployment tool process names to the exclusion list
  • Node.js or Python development environments running on workstations with web server processes (node.exe, python.exe) spawning cmd.exe for build tasks or test runners — scope detection to servers only using computer name patterns or asset group filters
  • Legitimate IIS tuning or performance optimization tooling that modifies W3SVC registry keys during benchmarking or configuration hardening — cross-reference with change management records during investigations
Download portable Sigma rule (.yml)

Other platforms for T1505


Testing Methodology

Validate this detection against 5 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 1Deploy ASPX Web Shell to IIS Default Web Root

    Expected signal: Sysmon Event ID 11: File creation of argus_test_shell.aspx in C:\inetpub\wwwroot\ with Image=powershell.exe. Sysmon Event ID 1: Process Create with ParentImage=w3wp.exe, Image=cmd.exe, CommandLine='/c whoami' when the HTTP request is processed. IIS access log entry: GET request to /argus_test_shell.aspx?cmd=whoami from 127.0.0.1 with status 200. Security Event ID 4688 (if command line auditing enabled) showing cmd.exe with ParentProcessName=w3wp.exe.

  2. Test 2SQL Server xp_cmdshell OS Command Execution via Stored Procedure

    Expected signal: Sysmon Event ID 1: Process Create with ParentImage=sqlservr.exe, Image=cmd.exe, CommandLine='/c whoami /all' and a second instance for 'ipconfig /all'. Security Event ID 4688 (if command line auditing): cmd.exe process creation with parent sqlservr.exe. SQL Server Audit (if enabled): sp_configure modification events and xp_cmdshell execution in the SQL audit log at the configured audit destination. Windows Application Event Log: SQL Server events indicating configuration changes.

  3. Test 3IIS Native Module Registration via AppCmd

    Expected signal: Sysmon Event ID 13 (Registry Value Set): TargetObject containing HKLM\SYSTEM\CurrentControlSet\Services\W3SVC or IIS applicationHost.config path, with Details containing the version.dll path. Sysmon Event ID 1: Process Create for %SystemRoot%\System32\inetsrv\appcmd.exe with CommandLine 'install module /name:ArgusTestModule /image:...'. File Modification: %SystemRoot%\System32\inetsrv\config\applicationHost.config updated to include the new module entry. IIS Event Log: module registration event in Microsoft-Windows-IIS-W3SVC-WP/Operational.

  4. Test 4PHP Web Shell Deployment on Linux Apache/Nginx

    Expected signal: Linux auditd: open/creat syscall creating /var/www/html/argus_test.php. Process creation event: apache2 or php-fpm worker spawning /bin/sh with argument '-c id' (via shell_exec). Apache access log: GET /argus_test.php?cmd=id from 127.0.0.1 with HTTP 200 response. Syslog: process creation by www-data or apache user. If using EDR with Linux support: process creation event with parent=apache2|php-fpm and child=/bin/sh.

  5. Test 5Simulate Exchange Transport Agent Installation

    Expected signal: Sysmon Event ID 1: Process Create for powershell.exe with CommandLine containing 'Install-TransportAgent'. Windows Registry: modification to HKLM\SYSTEM\CurrentControlSet\Services\MSExchangeTransport with new agent entry. Exchange Application Event Log: transport agent registration events in the MSExchangeTransport source. Sysmon Event ID 11: if the DLL is written to disk first. PowerShell ScriptBlock Logging Event ID 4104: full Install-TransportAgent command with assembly path.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections