PWS-Zbot Is a Trojan Threat Designed to Steal Data from Victim’S System
Total Page:16
File Type:pdf, Size:1020Kb
McAfee Labs Threat Advisory PWS Zbot June 6, 2014 Summary PWS-Zbot is a trojan threat designed to steal data from victim’s system. It is most widely known for stealing financial account information. For example, online banking login details and account data. PWS-Zbot spreads mostly via email but can also utilize autorun capabilities of removable media, or install via a drive-by infection when the user visits a compromised or malicious webpage. Once the infected binary file is installed to a machine it connects to a command and control server, and also monitors for internet activity and uploads stolen data. PWS-Zbot- http://vil.nai.com/vil/content/v_143802.htm PWS-Zbot.gen.ab- http://vil.nai.com/vil/content/v_249805.htm PWS-Zbot.gen.cu- http://vil.nai.com/vil/content/v_365620.htm W32/Zbot - http://vil.nai.com/vil/content/v_255218.htm Zbot+Necurs variant - http://blogs.mcafee.com/mcafee-labs/necurs-zbot-droppers-use-obfuscated-windows- xp-detection-bypass-automated-analysis Aliases: • Zeus • Trojan-Spy:W32/Zbot • Trojan.Zbot • Trojan-Spy.Win32.Zbot [Kaspersky] • Win32/Zbot [Microsoft] Detailed information about the trojan, its propagation, and mitigation are in the following sections: • Infection and Propagation Vectors • Characteristics and Symptoms • HTML injection on SSL-secured backing transactions • Botnet Command and Control • Peer 2 Peer Command and Control • Zbot as a file infector • Intercepting mouse clicks and capturing virtual keyboard screenshots • Zbot infecting Mobile devices Infection and Propagation Vectors An original infection may occur as a result of a download made by: • Exploiting a vulnerabilities like lnk files(CVE-2010-2568) • Using web attack toolkits as infection vector • Social engineering • Infecting Symbian mobile devices through harvested phone numbers • Attachments in email spam Mitigation Users are requested to exercise caution while opening unsolicited email and unknown links. Users are advised to update windows patches and virus definitions on a regular basis Characteristics and Symptoms There are multiple variants of Zbot variants in the wild. Multiple variants exhibit different behavior. The following are some well-known characteristics of PWS-Zbot. The trojan is capable of performing the following activities: • Injects its code through CreateRemoteThead and/or WriteProcessMemory to Winlogon.exe, svchost.exe or Explorer.exe. Recent variants have been observed to be injecting threads into other processes also. • Performs keylogging and screen snapshots • Hooks certain API calls from the following to intercept information coming in and out of the network including, WININET.DLL, WS2_32.DLL and USER32.DLL • Downloads configuration file from remote site • Attempts to retrieve a newer version of itself remotely • Posts stolen information to a remote site • Targets sensitive information such as online banking transactions • Opens a backdoor Upon execution of the file Zbot drops itself to: • %SysDir% folder as sdra64.exe • %SysDir% folder as [random hex number] .exe • %SysDir%\lowsec\local.ds – config file • %SysDir%\lowsec\user.ds – log file • %AppData%\[Random generated folder name]\[Randomly generated binary filename] • %AppData%\[Random generated folder name]\[Randomly generated data filename] • %AppData%\[[random hex number] .exe Creates autostart registry entry as a restart mechanism: • HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run o {RandomUID} = %AppData%\[Random Named Folder]\[Random FileName] • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\ o "Userinit" = "%System%\userinit.exe, %System%\sdra64.exe" • HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run o { random hex number } = %AppData[random hex number] .exe • HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\policies\explorer\run o adobe = %AppData[random hex number] .exe The following non-malicious file is created(s): • %User Profile%\Application Data\Microsoft\Address Book\{user name}.wab The following registry entry is added : • HKEY_CURRENT_USER\Software\Microsoft\WAB\WAB4\Wab File Name (Default) = "%User Profile%\Application Data\Microsoft\Address Book\{user name}.wab" The following registry ensures that the Trojan disables firewall notifications. • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolic y\StandardProfile\GloballyOpenPorts\List {port}:TCP = "{port}:TCP:Enabled:TCP {port}" • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolic y\StandardProfile\GloballyOpenPorts\List {port}:UDP = "{port}:UDP:Enabled:UDP {port}" The following registry ensures that the Trojan create a firewall rule to bypass the normal authentication. • HKEY_USERS\S-1-5-[VARIES]\Software\Microsoft\Internet Account Manager • HKEY_USERS\S-1-5-[VARIES]\Software\Microsoft\Internet Account Manager\Accounts • HKEY_USERS\S-1-5-[VARIES]\Software\Microsoft\Internet Account Manager\Accounts\Active Directory GC • HKEY_USERS\S-1-5-[VARIES]\Software\Microsoft\Internet Account Manager\Accounts\Bigfoot • HKEY_USERS\S-1-5-[VARIES]\Software\Microsoft\Internet Account Manager\Accounts\VeriSign • HKEY_USERS\S-1-5-[VARIES]\Software\Microsoft\Internet Account Manager\Accounts\WhoWhere • HKEY_USERS\S-1-5-[VARIES]\Software\Microsoft\WAB • HKEY_USERS\S-1-5-[VARIES]\Software\Microsoft\WAB\WAB4 • HKEY_USERS\S-1-5-[VARIES]\Software\Microsoft\WAB\WAB4\Wab File Name The following are the registry key values have been added to the system • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolic y\StandardProfile\DisableNotifications: 0x00000000 Recent variants of this family have been observed to be creating two sub folders, an executable file and a data file with random name inside %APPDATA% folder. The subfolder names begin with an uppercase letter. It first retrieves address of APIs, checks if it is running under WOW64, obtains volume GUID path, generates a CLSID from the GUID, which is further encrypted, and collect OS information. It then decrypts 0x32c bytes from the code section which includes the URL information from where to download the configuration file as shown below: The malware can be executed with or without command line arguments (expected arguments are “f”, “i”, “n”, and “v”). It checks if the malware has been executed with any command line argument, when “-i” is passed as an argument it displays version information as shown below: It then checks if the file is a dropper or a dropped file. If it is a dropper then it drops its copy and terminates. Otherwise, it decrypts the appended data which contains dropped file information and checks if the file was dropped on the victim machine or on some other system by comparing the CLSID which was generated from the Volume Path GUID and if it is being run from the appropriate location as shown below: This also means that the dropped file wouldn’t execute on any other system even if we try executing it from the same folder location because the CLSID generated from the Volume Path GUID would be different. It then modifies its own code in memory and transfers control to the modified code. This modified code collects some system information like computer name, running operating system, installation date, DigitalProductId (generated using Product Key and hardware information during installation) and formats them in %s_%08X%08X format as shown below: [Computer name]_OSVersionInfo_InstallDate It can easily evade hash based detection because the appended data contains dropped file location information (which is randomly generated) before it drops its copy. It also changes the Creation, Access and Modified time of the dropped executable, the data file and executes the dropped executable file. After dropping executable file, the parent process is terminated and the file is deleted. The dropped file is responsible for injecting threads into remote processes. Remote Thread: • Injected code creates more malicious local threads if the process name matches any of the below mentioned list: dwm.exe, taskhost.exe, taskeng.exe, wscntfy.exe, ctfmon.exe, rdpclip.exe, explorer.exe • Scan logged in user’s Cookies and “Cookies\Low” folders for files which match the “*@*.txt” pattern. • Open the cookie file for read, search for separators (NewLine and Carriage Return characters) and formats the data “Path: %s”, “%s=%s” as shown below: • Steal certificate, associated private keys, encrypt and save them in the data file. Later certificates are deleted from the store. • Steal FTP Client information: • FlashFXP retrieve data associated with the value "datafolder" from “HKLM\ SOFTWARE\FlashFXP\3” subkey. It also search folders containing “*flashfxp*” pattern in their name inside %APPDATA% and %PROGRAMFILES% for these three files "sites.dat", "quick.dat", and ”history.dat” • Total Commander Retrieve data associated with the values "ftpininame", and "installdir" from “HKCU\SOFTWARE\Ghisler\Total Commander” and "SOFTWARE\Ghisler" subkeys. It also search folders containing any of the three strings “*totalcmd*”, “*total*commander*”, and “*ghisler*” in their name inside, %SYSTEMROOT%, %APPDATA% and %PROGRAMFILES% for "wcx_ftp.ini". • WS_FTP Retrieve data associated with the value "datadir" from "SOFTWARE\ipswitch\ws_ftp" subkey. It also search folders containing string “*ipswitch*” in their name inside, “COMMON_APPDATA”, %APPDATA% and %PROGRAMFILES% for "ws_ftp.ini ". • FileZilla Search %PROGRAMFILES% folder for “*.xml” file. • Far Manager FTP Retrieve “hostname”, “username”,