Netskope Threat Research Labs has observed a new wave of attacks on small- and medium-scale businesses in the Middle East and European regions using the Java-based Adwind RAT. In this new attack, the major targets include shipping and export industries where spam emails are sent containing Windows executable Pif file format as the weaponization file, which drops the Adwind payload. Netskope detects the attachment Pif file as Trojan.GenericKD.5562809 and the dropped Adwind Jar as Trojan.GenericKD.5561478.
We released an earlier blog where Adwind was used to target the hospitality industry to exfiltrate sensitive data. The spam based delivery mechanism is same in both the variants but the major difference is in the obfuscation techniques implemented in the new variant. The email sent to one of the targets is shown in Figure 1.
Figure 1 : Snapshot of a spam email containing Pif file attachment
It contained an attachment whose preview image looked like a PDF file but it was a Windows executable Pif file format.This file acts as the dropper for the main Adwind’s jar payload.
Brief Analysis of the Jar
Sample hash: 41c6aae5e303e7f3118af6a3ca2566a8
This new variant of Adwind has more obfuscation compared to the one we analyzed in our earlier blog, but the end functionality remains pretty much the same. The new variant uses multi-level obfuscation of class files by hiding the elements within TIFF files and by using AES encryption to thwart reverse engineering attempts.
The decompiled .jar file had very little information that could be deduced about the functionality since the code was heavily obfuscated. The Manifest file of the jar contained the entry point to execution: Main-Class: com.tool.Main
The main class then deduces string objects from multiple static classes defined in the form of :
static class N7034_ { static void N7034_() throws Throwable { Main.N5600_.N5577_[Integer.decode(((String)Main.N5600_.N5577_[0]).substring(1675, 1678)).intValue()] = ……
A snippet of the decompiled code of the dropped jar is shown in Figure 2,
Figure 2: File structure of Adwind’s first level Jar file
Figure 2 shows the structure of decompiled jar file which contains various .tiff files that are bundled in the archive. The main class object refers to the bytes of these tiff files to construct a new jar as shown in figure 3 and 4.
Figure 3: getResource function accessing the .tiff files