This detection targets adversaries who deploy a malicious web shell named k1.jsp to establish persistence and execute commands on compromised web servers within the Azure Sentinel environment. Proactive hunting for this specific artifact is critical because web shells often serve as an initial foothold for attackers, enabling them to move laterally across the network and exfiltrate sensitive data before traditional alerts are triggered.
rule webshell_jsp_k81 {
meta:
description = "Web Shell - file k81.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 = "41efc5c71b6885add9c1d516371bd6af"
id = "393e738a-b4c2-5630-a55f-c3caee4ff75e"
strings:
$s1 = "byte[] binary = BASE64Decoder.class.newInstance().decodeBuffer(cmd);" fullword
$s9 = "if(cmd.equals(\"Szh0ZWFt\")){out.print(\"[S]\"+dir+\"[E]\");}" fullword
condition:
1 of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 2 string patterns in its detection logic.
Here are 5 specific false positive scenarios for the Web Shell - file k81.jsp detection rule, tailored for an enterprise environment:
Scheduled Backup Script Execution
k81.jsp as part of its reporting module on the Tomcat server to generate daily health dashboards. This file is created, executed, and then archived by the backup agent, mimicking the behavior of a web shell upload.10.50.20.0/24) or where the user account is the service principal svc_backup_agent during the scheduled maintenance window (e.g., 02:00–04:00 UTC).CI/CD Pipeline Deployment
k81.jsp as a known component of the new release package to the staging environment’s Tomcat instance before promoting it to production.192.168.50.10) where the action is triggered by the service account ci-deploy-bot, specifically when the deployment status in the pipeline logs indicates “Success.”Third-Party Monitoring Agent Installation