This detection identifies adversaries deploying a JSP-based web shell named spjspshell.jsp to establish persistent remote access and execute commands on compromised web servers. Proactive hunting for this artifact in Azure Sentinel is critical because web shells often serve as an initial foothold for lateral movement, allowing attackers to maintain stealthy control over the environment before broader detection occurs.
rule webshell_spjspshell {
meta:
description = "Web Shell - file spjspshell.jsp"
license = "Detection Rule License 1.1 https://github.com/Neo23x0/signature-base/blob/master/LICENSE"
author = "Florian Roth (Nextron Systems)"
date = "2014/01/28"
score = 70
hash = "d39d51154aaad4ba89947c459a729971"
id = "393e738a-b4c2-5630-a55f-c3caee4ff75e"
strings:
$s7 = "Unix:/bin/sh -c tar vxf xxx.tar Windows:c:\\winnt\\system32\\cmd.exe /c type c:"
condition:
all of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 1 string patterns in its detection logic.
Here are 5 specific false positive scenarios for the Web Shell - file spjspshell.jsp detection rule, including suggested filters and exclusions:
Scenario: Automated Backup or Migration Scripts by DevOps Tools
spjspshell.jsp) in the web root directory as part of a staging process before finalizing the build.svc-jenkins, gitlab-runner) and the parent process is the automation tool executable (e.g., java.exe running as a Jenkins agent or ansible-playbook).Scenario: Scheduled Health Check by Monitoring Agents
spjspshell.jsp during a scheduled maintenance window (e.g., every 15 minutes).dd-agent.exe, nrdc.exe).Scenario: Administrator Manual Configuration via Integrated Development Environments