Recently discovered variants of the Ursnif banking Trojan include anti-sandboxing features based on a combination of mouse position and file timestamps, while also attempting to steal data from the Thunderbird email client, Forcepoint security researchers reveal.
The Ursnif malware family has been around since at least 2013, mainly focused on stealing sensitive information from infected users, including passwords. Recent variants were observed testing various sandbox evasion techniques.
A newly observed Ursnif variant is being delivered through malicious emails that contain an encrypted Word document as attachment, with the plaintext password included in the email body. The malicious document contains several obfuscated VBS files designed to load malicious DLLs through Windows Management Instrumentation (WMI).
As soon as the attached document is decrypted, it shows three OLE document icons with the extension “docx” and lures users into double clicking them directly. These are, in fact, three identical VBS scripts that pack highly obfuscated code padded with a great deal of garbage scripts to cover up normal logic, the security researchers explain.
During the infection process, a DLL is dropped that was designed to self-check on integrity and then perform anti-sandboxing and anti-VM checks, implement persistence through an autorun registry key, and inject itself into the ‘explorer.exe’ process.
The anti-sandboxing algorithm in the new malware variant “uses the difference between the current and previous recorded mouse coordinates to detect mouse movement,” because mouse isn’t moved in sandbox environments. The generated value is then used to ‘brute force’ its own decryption key, Forcepoint explained.
The decryption key is a global constant used to decode APIs, a hidden PE file, synchronous objects, Registry data, URLs, and more, the security researchers explain. An additional embedded PE file (a 3rd DLL file) is extracted from the data section of the second DLL file, released to a temporary buffer, and injected into the ‘explorer.exe’ process.
The decoding operations are implemented at run time, meaning that memory analyzers won’t be able to dump the whole plaintext string stream of malware memory.