This detection targets adversaries who deploy a malicious web shell named tool.asp to establish persistent access and execute commands on compromised web servers. Proactively hunting for this specific artifact in Azure Sentinel is critical because web shells often serve as an initial foothold for lateral movement and data exfiltration, requiring immediate investigation before the adversary can expand their presence within the environment.
rule webshell_ASP_tool {
meta:
description = "Web Shell - file tool.asp"
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 = "4ab68d38527d5834e9c1ff64407b34fb"
id = "393e738a-b4c2-5630-a55f-c3caee4ff75e"
strings:
$s0 = "Response.Write \"<FORM action=\"\"\" & Request.ServerVariables(\"URL\") & \"\"\""
$s3 = "Response.Write \"<tr><td><font face='arial' size='2'><b><DIR> <a href='\" "
$s9 = "Response.Write \"<font face='arial' size='1'><a href=\"\"#\"\" onclick=\"\"javas"
condition:
2 of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 3 string patterns in its detection logic.
Here are 4 specific false positive scenarios for the Web Shell - file tool.asp detection rule, including suggested filters and exclusions:
Scenario: Automated Backup or Migration Scripts
tool.asp to temporary directories during nightly maintenance windows. These scripts may perform file I/O operations that mimic web shell behavior.DOMAIN\BackupSvc, SYSTEM) within known backup directories (e.g., C:\ProgramData\Veeam\Tools or D:\Migrations). Additionally, filter out events occurring during defined maintenance windows (e.g., 02:00–04:00 local time).Scenario: CMS Plugin Updates and Deployments
tool.asp file as part of their deployment pipeline. When an administrator deploys a new plugin or patches the IIS application, the deployment engine (e.g., Octopus Deploy, Azure DevOps) may instantiate this file to verify connectivity or run post-deployment checks.C:\inetpub\wwwroot\SharePoint\_layouts or D:\WebApps\Portal). Filter based on the parent process being a known deployment agent, such as msbuild.exe, wcmproc.exe, or Octopus.Client.exe.Scenario: Scheduled Health Check and Monitoring Agents