This detection identifies the creation of a suspicious ASP web shell named “up.asp,” which adversaries often deploy to establish persistent command-and-control channels or execute arbitrary commands on compromised web servers. Proactively hunting for this specific artifact in Azure Sentinel is critical because web shells serve as a primary foothold for attackers, enabling them to maintain stealthy access and pivot deeper into the environment before traditional alerts trigger.
rule webshell_asp_up {
meta:
description = "Web Shell - file up.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 = "f775e721cfe85019fe41c34f47c0d67c"
id = "393e738a-b4c2-5630-a55f-c3caee4ff75e"
strings:
$s0 = "Pos = InstrB(BoundaryPos,RequestBin,getByteString(\"Content-Dispositio"
$s1 = "ContentType = getString(MidB(RequestBin,PosBeg,PosEnd-PosBeg))" 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.
Scenario 1: Automated Backup and Archiving by System Administrator
up.asp in the \wwwroot\temp folder before processing and deleting it.DOMAIN\AdminBackup) within known non-critical directories like \wwwroot\temp or \wwwroot\archive. Additionally, filter out events where the file size exceeds a threshold typical for web shells (e.g., >50KB) if the backup script generates larger files.Scenario 2: Scheduled Deployment via CI/CD Pipeline
up.asp to the production IIS server during nightly maintenance windows. This file is part of a legitimate application update package, not an injected shell.10.20.30.5) and restrict alerts to occur only outside of defined maintenance windows (e.g., 02:00–04:00). Alternatively, whitelist the specific file hash if the deployment package is immutable.Scenario 3: Third-Party CRM or ERP Integration Sync
up.asp to the