Researchers at ESET have discovered a sophisticated data-stealing USB Trojan that leaves no trace on the compromised system and includes a self-protection mechanism that makes it difficult to detect, copy and analyze.
The threat, dubbed by the security firm “USB Thief,” has been spotted on USB devices in the wild. One aspect that makes it stand out from other USB malware families is that each copy is bound to a single USB drive.
Unlike other USB threats that leverage autorun and shortcut files to get executed, USB Thief relies on the fact that users often store portable versions of Firefox, NotePad++, TrueCrypt and other popular applications on USB sticks.
According to ESET, the malware injects itself into the execution chain of such applications by posing as a plugin or a DLL file. When a victim launches the targeted app from an infected USB drive, the Trojan is also executed in the background.
The malware has six different component files – four executables and two configuration files. In order to ensure that it cannot be copied from a USB drive and reverse engineered, some USB Thief files are encrypted using an AES encryption key generated based on the USB device’s unique ID and certain disk properties. The names of the files executed during every stage of the infection routine are different for each instance as they are generated based on file content and creation time.
This mechanism ensures that the malware doesn’t work on devices other than the USB drive on which it was planted by the attacker, preventing researchers from analyzing the threat.
The first stage loader is responsible for executing the Trojan via portable applications and checking if the USB device from which it’s run is writeable so that the stolen information can be stored there.
The second stage loader verifies the name of the parent process to ensure that it’s not being executed in an analysis environment, while the third stage loader checks for the presence of antivirus software.
The final payload, which is injected into a newly created process, is designed to steal information from the infected device, including images, documents, the Windows registry tree, file lists from all available drives, and data collected by a Windows inventory utility called WinAudit. The stolen information is encrypted using elliptic curve cryptography and stored on the USB drive from which the infection started.
Since the malware is being executed from a USB device, the infection doesn’t leave any trace on the targeted machine. ESET experts believe the threat is ideal for targeted attacks against air-gapped systems.
“This malware is unique because of some particular features but the defense against it still falls within the capabilities of general cybersecurity measures,” explained ESET malware analyst Tomáš Gardoň. “Most importantly, USB ports should be disabled wherever possible and, if that’s not possible, strict policies should be in place to enforce care in their use. It’s highly desirable for staff at all levels to undergo cybersecurity training – including real-life testing – if possible.”
USB Thief is not the only USB malware analyzed by ESET. The company has also investigated one of the tools used by the notorious Pawn Storm/APT28/Sednit group to steal data from air-gapped networks.