This rule detects adversaries deploying a malicious JSP web shell (file 12302.jsp) to establish persistent access and execute commands on compromised web servers. Proactive hunting for this artifact in Azure Sentinel is critical because web shells often serve as the initial foothold for attackers, enabling them to pivot laterally or exfiltrate sensitive data before triggering broader alerts.
rule webshell_jsp_12302 {
meta:
description = "Web Shell - file 12302.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 = "a3930518ea57d899457a62f372205f7f"
id = "393e738a-b4c2-5630-a55f-c3caee4ff75e"
strings:
$s0 = "</font><%out.print(request.getRealPath(request.getServletPath())); %>" fullword
$s1 = "<%@page import=\"java.io.*,java.util.*,java.net.*\"%>" fullword
$s4 = "String path=new String(request.getParameter(\"path\").getBytes(\"ISO-8859-1\""
condition:
all of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 3 string patterns in its detection logic.
Here are specific false positive scenarios for the Web Shell - file 12302.jsp detection rule, including actionable filters and exclusions:
Scheduled Backup of Legacy JSP Artifacts
12302.jsp within the deployment folder to verify checksum integrity before archiving.192.168.10.5) and the process name is vbrservice.exe or rubrik-agent. Additionally, filter out events occurring during the defined maintenance window (e.g., 02:00–04:00 UTC).CI/CD Pipeline Deployment of Microservices
12302.jsp is automatically generated and written to the container’s filesystem by the Helm Chart controller during the “staging” phase before traffic routing begins.10.20.30.0/24) where the user context is svc-jenkins-deployer. The filter should also check if the file size remains constant across multiple deployments of this specific artifact name.Automated Health Check by Load Balancer