Shifu is a Windows banking trojan first discovered in August 2015. It derives from the Shiz/iBank codebase and incorporates techniques associated with earlier banking malware, including Zeus. It targets online banking credentials and financial transactions, with campaigns affecting banking customers and organizations in Japan, the United Kingdom, Italy, and Russia. TA505 distributed Shifu in high-volume malicious email campaigns, including Japanese- and English-language order-confirmation lures carrying macro-enabled Microsoft Office documents. Its distribution infrastructure overlapped with Dridex campaigns, and it has also been delivered through the Angler exploit kit.
Shifu uses a multistage loader and injector architecture with support for 32-bit and 64-bit Windows systems. Observed versions exploit CVE-2015-0003 or CVE-2016-0167 for local privilege escalation. The malware injects payloads into Windows processes, hooks networking and input-related APIs, and communicates between injected instances through named pipes. Later versions establish persistence through a startup script that launches a copied loader. Defense-evasion mechanisms include encrypted strings and communications, API obfuscation, sandbox and virtualization checks, process-enumeration concealment, and detection of HTTPS interception. Some versions use Namecoin-based command-and-control infrastructure.
Its theft capabilities include keylogging, clipboard capture, screenshots triggered by mouse clicks to capture virtual-keyboard input, certificate and private-key interception, FTP and email credential theft, VPN and VNC configuration theft, and Bitcoin and Litecoin wallet theft. Shifu collects host and security-product information and exfiltrates stolen data to its operators. Banking web injections use a silently installed local Apache server, redirected browser traffic, and hooks that bypass certificate verification. It can disable selected browser protections, download and execute additional modules, and update itself. It also identifies potential financial applications on compromised systems and includes a destructive self-removal routine capable of deleting files from removable drives and corrupting filesystem boot sectors.
2 CVEs Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
1 distinct threat actor Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
Group activities since 2014, incl. distribution of high-volume malicious email campaigns, including the distribution of the “Dridex” and “Shifu” banking trojans.
40 distinct techniques documented for this family, organized by ATT&CK tactic.
That Trojan was discovered in August 2015 and was distributed through spam via the same botnets as Dridex.
We continue to see invoice and transaction email lures used widely... Most of the emailed malicious document attachments are empty or used a generic 'Enable macros to view this document' lure.
Shifu tries to steal VPN and VNC login credentials by checking the command line of running executables.
The file contains the following code which runs the initial loader after the system was rebooted: var yqvltidpue = new ActiveXObject ( "WScript.Shell" ) ; yqvltidpue . Run ( "C:\\PROGRA~3\\930d4a6d.exe" )
The attachments are Microsoft Office documents containing malicious macros which download Shifu banking Trojan... Australian-targeted emails containing randomly named attachments that used malicious macros to download Ursnif. | Most of the emailed malicious document attachments are empty or used a generic 'Enable macros to view this document' lure.
Afterwards, a named pipe will be created in order to allow communication between the payloads in different processes.
Like in the previous version, the malware hooks some API functions to redirect URLs, capture network traffic, the clipboard and to log keystrokes. It uses a technique known as inline function hooking where the first 5 bytes of a function get patched with a jump to the malware's hook handlers.
All third-party browser plug-ins will be disabled immediately via a single registry value, ‘Enable Browser Extensions’... In addition to disabling third-party IE plug-ins, it also disables the pop-up blocker in IE through a registry key
Shifu’s author implements an additional routine which will create or spawn a random Windows process found in C:\Windows\system32, or in C:\Windows\syswow64 if it is a 64-bit platform. In order to circumvent this behaviour, Shifu first creates a suspended Windows process and then injects an infinite sleep, Sleep(-1), routine
As persistence method, the main payload copies the initial loader to the AppData folder and creates a Jscript file inside the Startup folder which points to it | the resulting encrypted data are written to registry for persistence purposes under the key "HKCU\software\microsoft\windows" with a random CRC32 hash name
Shifu will first try injecting the payload code into explorer.exe... Once the targeted process has been determined, Shifu will carry out another code injection routine to execute the payload via CreateRemoteThread or RtlCreateUserThread.
At the entry point, we can immediately tell that Shifu attempts to exploit a local privilege escalation vulnerability. The vulnerability was assigned the CVE number CVE-2015-0003 in February 2015 and can be used to elevate the privilege of a process to system privilege on Windows 7 and above.
Shifu’s author implements an additional routine which will create or spawn a random Windows process found in C:\Windows\system32, or in C:\Windows\syswow64 if it is a 64-bit platform. In order to circumvent this behaviour, Shifu first creates a suspended Windows process and then injects an infinite sleep, Sleep(-1), routine
As persistence method, the main payload copies the initial loader to the AppData folder and creates a Jscript file inside the Startup folder which points to it | the resulting encrypted data are written to registry for persistence purposes under the key "HKCU\software\microsoft\windows" with a random CRC32 hash name
Use of “push-calc-ret” API obfuscation to hide function calls from malware analysts
Shifu will first try injecting the payload code into explorer.exe... Once the targeted process has been determined, Shifu will carry out another code injection routine to execute the payload via CreateRemoteThread or RtlCreateUserThread.
This module allows the botherder to make the botnet clean up Flash cookies found in the %APPDATA%\Macromedia folder to cover the presence of the exploited Flash files.
At last, a batch file is created and executed in the %TEMP% folder. It overwrites the original executed initial loader with a random number of bytes to cover the tracks.
we observed that the dropper code is not heavily obfuscated, although most of the strings are encoded; it turns out that the strings can easily be decoded using a simple XOR operation.
There are many anti-sandbox and anti-VM detection techniques in the dropper... Shifu checks a list of active processes running on the machine, as well as the sample’s file name, against hard-coded CRC32 hashes in order to avoid the malware being analysed by a sandbox or by virtual machines
it no longer connects to the C&C server on machines that are found to have Man-in-the-Middle (MitM) interception for HTTPS connections. It makes this check by comparing the certificate’s MD5 fingerprint with those of some well-known websites
The malware conceals its presence from the running processes by hijacking the Windows ntdll!ZwQuerySystemInformation API, which is called whenever a user-mode program attempts to enumerate a list of active processes
Like in the previous version, the malware hooks some API functions to redirect URLs, capture network traffic, the clipboard and to log keystrokes. It uses a technique known as inline function hooking where the first 5 bytes of a function get patched with a jump to the malware's hook handlers.
It checks if it’s being debugged by calling IsDebuggerPresent(). Also, it calls ZwQueryInformationSystem() with ProcessDebugPort and ProcessDebugObjectHandle to check for a debugger presence. If a debugger is detected it runs an infinite Sleep() loop.
All third-party browser plug-ins will be disabled immediately via a single registry value, ‘Enable Browser Extensions’... In addition to disabling third-party IE plug-ins, it also disables the pop-up blocker in IE through a registry key
it also hijacks the SSL verification API used by the browser process so that the verification is always successful regardless of whether the presented SSL certificates are valid.
Like in the previous version, the malware hooks some API functions to redirect URLs, capture network traffic, the clipboard and to log keystrokes.
Shifu also tries to capture virtual keyboards, which are commonly used in Internet banking, by taking screenshots of the infected machine whenever the malware detects a mouse click.
Redirect all the HTTP/HTTPS traffic to a local HTTP server to carry out man-in-the-middle operation
Shifu manipulates Windows API hooks in order to intercept the certificate password when a certificate is being imported to the certificate store. All the certificate blob data and passwords found in the Crypt32!PFXImportCertStore API will be intercepted
There are many anti-sandbox and anti-VM detection techniques in the dropper... Shifu checks a list of active processes running on the machine, as well as the sample’s file name, against hard-coded CRC32 hashes in order to avoid the malware being analysed by a sandbox or by virtual machines
it no longer connects to the C&C server on machines that are found to have Man-in-the-Middle (MitM) interception for HTTPS connections. It makes this check by comparing the certificate’s MD5 fingerprint with those of some well-known websites
It checks if it’s being debugged by calling IsDebuggerPresent(). Also, it calls ZwQueryInformationSystem() with ProcessDebugPort and ProcessDebugObjectHandle to check for a debugger presence. If a debugger is detected it runs an infinite Sleep() loop.
Shifu also targets Bitcoin and Litecoin wallet files found on the victim’s machine. Shifu tries to steal VPN and VNC login credentials by checking the command line of running executables... Shifu attempts to save a copy of the configuration file.
Like in the previous version, the malware hooks some API functions to redirect URLs, capture network traffic, the clipboard and to log keystrokes.
Shifu also tries to capture virtual keyboards, which are commonly used in Internet banking, by taking screenshots of the infected machine whenever the malware detects a mouse click.
Shifu also tries to capture virtual keyboards... by taking screenshots of the infected machine whenever the malware detects a mouse click.
User32!GetClipboardData Captures the ASCII and UNICODE text currently saved in the clipboard window
Webinjection to the targeted Internet banking sites is carried out through a local Apache server installed silently by Shifu.
Redirect all the HTTP/HTTPS traffic to a local HTTP server to carry out man-in-the-middle operation
All the data sent and received is obfuscated to prevent direct exposure by a packet sniffer program. The data is encoded and decoded using the RC4 algorithm
Over the last six years there has been an increased shift by malware authors to secure their C&C communications using the SSL/TLS protocol to stymie detection and blend in with normal traffic.
The main payload uses .bit top-level domains to contact its C&C server.
ws2_32!connect ws2_32!connectEx Redirect all the HTTP/HTTPS traffic to a local HTTP server to carry out man-in-the-middle operation
the malware will first modify and make sure the Apache server is properly configured by setting the server’s address to localhost (127.0.0.1) using a random port for both HTTP and HTTPS.
the campaign employed a Neutrino Bot as the initial payload, which then downloaded Shifu as a second payload.
The main payload will download the Apache httpd.exe server file from one of the C&C servers to store it on disk for web injection purposes.
The main payload of Shifu uses .bit top-level domains which is a decentralized DNS system based on the Namecoin infrastructure.
When there is a need to generate a random domain name via a domain generation algorithm (DGA), the malware contacts the master C&C server first to retrieve some configuration data
The self-destruction routine... Remove all the files attached to removable drives... Corrupt the filesystem (e.g. NTFS/FAT) by overwriting its boot sector.
Shut down the machine. In case the shutdown operation is not successful, it terminates itself.
23 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
13 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.