LoFP LoFP / legitimate os functions called by vendor applications, baseline the environment and filter before enabling. recommend throttle by dest/process_name

Techniques

Sample rules

Windows Suspicious Child Process Spawned From WebServer

Description

The following analytic identifies the execution of suspicious processes typically associated with WebShell activity on web servers. It detects when processes like cmd.exe, powershell.exe, or bash.exe are spawned by web server processes such as w3wp.exe or nginx.exe. This behavior is significant as it may indicate an adversary exploiting a web application vulnerability to install a WebShell, providing persistent access and command execution capabilities. If confirmed malicious, this activity could allow attackers to maintain control over the compromised server, execute arbitrary commands, and potentially escalate privileges or exfiltrate sensitive data.

Detection logic


| tstats `security_content_summariesonly`
  count max(_time) as lastTime
        min(_time) as firstTime

FROM datamodel=Endpoint.Processes WHERE

Processes.parent_process_name IN (
        "apache*.exe",
        "caddy.exe",
        "frankenphp.exe",
        "http*.exe",
        "iisexpress.exe",
        "java.exe",
        "lighttpd.exe",
        "nginx*.exe",
        "php*.exe",
        "roadrunner.exe",
        "tomcat*.exe",
        "UMWorkerProcess.exe",
        "w3wp.exe",
        "ws_TomcatService.exe"
    )

Processes.process_name IN (
    "arp.exe",
    "at.exe",
    "bitsadmin.exe",
    "certutil.exe",
    "cscript.exe",
    "dsget.exe",
    "dsquery.exe",
    "find.exe",
    "findstr.exe",
    "fsutil.exe",
    "hostname.exe",
    "ipconfig.exe",
    "ksh.exe",
    "nbstat.exe",
    "net.exe",
    "net1.exe",
    "netdom.exe",
    "netsh.exe",
    "netstat.exe",
    "nltest.exe",
    "nslookup.exe",
    "ntdsutil.exe",
    "pathping.exe",
    "perl.exe",
    "ping.exe",
    "python.exe",
    "qprocess.exe",
    "query.exe",
    "qwinsta.exe",
    "reg.exe",
    "rundll32.exe",
    "sc.exe",
    "schtasks.exe",
    "scrcons.exe",
    "systeminfo.exe",
    "tasklist.exe",
    "tracert.exe",
    "ver.exe",
    "vssadmin.exe",
    "wevtutil.exe",
    "whoami.exe",
    "wmic.exe",
    "wscript.exe",
    "wusa.exe",
    "zsh.exe"
)

BY Processes.action Processes.dest Processes.original_file_name
   Processes.parent_process Processes.parent_process_exec Processes.parent_process_guid
   Processes.parent_process_id Processes.parent_process_name Processes.parent_process_path
   Processes.process Processes.process_exec Processes.process_guid
   Processes.process_hash Processes.process_id Processes.process_integrity_level
   Processes.process_name Processes.process_path Processes.user
   Processes.user_id Processes.vendor_product


| `drop_dm_object_name("Processes")`

| `security_content_ctime(firstTime)`

| `security_content_ctime(lastTime)`

| `windows_suspicious_child_process_spawned_from_webserver_filter`