Saltar al contenido

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_WEBSHELL_JSP_Nov21_1

Detects JSP webshells

WebshellSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compila con YARA-X
Autor
Florian Roth (Nextron Systems)
Fecha
2021-11-23
Modificada
2023-12-05
Puntuación / Calidad
70 / 85

Qué detecta esta regla

Detects JSP webshells

Define 4 patrones (4 de texto, 0 hex, 0 regex).

Resumen generado a partir de los metadatos y la condición de la regla.

Código de la regla

webshell-jsp-nov21-1.yarDetection Rule License 1.1
rule SIGNATURE_BASE_WEBSHELL_JSP_Nov21_1 : FILE
{
	meta:
		description = "Detects JSP webshells"
		author = "Florian Roth (Nextron Systems)"
		id = "117eed28-c44e-5983-b4c7-b555fc06d923"
		date = "2021-11-23"
		modified = "2023-12-05"
		reference = "https://www.ic3.gov/Media/News/2021/211117-2.pdf"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/expl_spring4shell.yar#L2-L17"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		logic_hash = "1dac7706421961c71ba6f8d7a223b80e4b77bf206bfb64ee18c7cc894b062a3c"
		score = 70
		quality = 85
		tags = "FILE"

	strings:
		$x1 = "request.getParameter(\"pwd\")" ascii
		$x2 = "excuteCmd(request.getParameter(" ascii
		$x3 = "getRuntime().exec (request.getParameter(" ascii
		$x4 = "private static final String PW = \"whoami\"" ascii

	condition:
		filesize < 400KB and 1 of them
}

Cadenas (4 patrones)

IdentificadorTipoValorModificadores
$x1texto"request.getParameter(\"pwd\")"ascii
$x2texto"excuteCmd(request.getParameter("ascii
$x3texto"getRuntime().exec (request.getParameter("ascii
$x4texto"private static final String PW = \"whoami\""ascii

Condición

filesize < 400KB and 1 of them

En palabras sencillas (Heurística)

  • El archivo debe ocupar menos de 400KB (un límite barato que descarta archivos grandes).
  • Deben coincidir al menos 1 patrones de la regla.

Prueba esta regla en tu navegador

Arrastra un archivo para escanearlo con esta regla usando YARA-X compilado a WebAssembly. No se sube nada.

Arrastra un archivo aquí o haz clic para elegirSe escanea en local con YARA-X. Archivos de hasta 200 MB.

Abrir en el editor

Referencias

Licencia y atribución

Autor: Florian Roth (Nextron Systems)

Repositorio de origen: Signature Base (Florian Roth / Nextron) @ 94a1c48d7a

Licencia: Detection Rule License 1.1 (licencia del repositorio)

Regla original

Obtenida a través de YARA Forge 20260927, que añade a los nombres el prefijo de la fuente y campos meta normalizados.

Id de la regla: 117eed28-c44e-5983-b4c7-b555fc06d923

Etiquetas:FILE