This detection targets adversaries utilizing custom Java Archive (JAR) packaging to obfuscate malicious payloads and evade standard signature-based defenses within Azure Sentinel environments. Proactive hunting for this behavior is essential because JAR files are frequently used in enterprise applications, making them an ideal vector for stealthy lateral movement and initial foothold establishment that may not trigger high-severity alerts on their own.
rule Adwind_JAR_PACKA : binary RAT Frutas Unrecom AlienSpy
{
meta:
author = "Vitaly Kamluk, Vitaly.Kamluk@kaspersky.com"
reference = "https://securelist.com/securelist/files/2016/02/KL_AdwindPublicReport_2016.pdf"
last_modified = "2015-11-30"
strings:
$b1 = ".class" ascii
$b2 = "c/a/a/" ascii
$b3 = "b/a/" ascii
$b4 = "a.dat" ascii
$b5 = "META-INF/MANIFEST.MF" ascii
condition:
int16(0) == 0x4B50 and ($b1 and $b2 and $b3 and $b4 and $b5)
}
This YARA rule can be deployed in the following contexts:
This rule contains 5 string patterns in its detection logic.
Here are 4 specific false positive scenarios for the Adwind JAR_PACKA detection rule, tailored for a legitimate enterprise environment:
Java Development Build Pipelines
Maven or Gradle builds frequently unpack and repackage Java Archive (JAR) files to resolve dependencies, compile code, or generate distribution artifacts. This activity generates high-volume file I/O on JAR structures that mimics the packing behavior of malicious payloads.svc-jenkins, gitlab-runner) and restrict detection to paths outside standard build working directories (e.g., exclude C:\Builds\* or /var/jenkins_home/workspace/*).Enterprise Application Server Maintenance
C:\Program Files\Apache Software Foundation\Tomcat 9\bin\tomcat.exe) and exclude events occurring during predefined maintenance windows (e.g., Sundays between 02:00–04:00 UTC).Endpoint Security Scanning Agents