Sunday, April 28, 2013

VSkimmer Botnet Targets Point-Of-Sale Devices : Be Cautious When You Swipe Your Credit Cards Next Time For Shopping !!..


I was monitoring one of the Russian underground forums a while back, and came across a discussion thread  where the author was offering the malware for sale which had the capability to steal the credit card information from the Windows machines attached the Credit / Debit card payment devices.This malware, vSkimmer, can detect the card readers, grab all the information from the Windows machines attached to these readers, and send that data to a control server. These kind of equipments are typically known as Point-Of-Sale devices used for processing the Credit / Debit card financial transactions and are used in shops , hotels and other industries . The author of the thread also discusses other capabilities of this malware, which appears to be a successor of Dexter discovered last year , but with additional functions.











Later in the thread , author of this malware discusses about the payment methods and the sale policies.




We already know about botnets such as Zeus , SpyEye , Citadel  ( variant of Zeus ) which performs financial fraud using extremely sophisticated techniques including  intercepting the victims’ banking transactions. VSkimmer is another example of how financial fraud is actively evolving and how financial Trojans are developed and passed around in the underground community. This botnet is particularly interesting because it directly targets card-payment terminals running Windows.

I analyzed  samples of this malware and figured out how it steals the credit card information and its additional control functionalities as well. While performing the API tracing , we found it uses fairly standard antidebugging techniques .














The malware collects the following information from the infected machine and sends it to the control server:
  • Machine GUID from the Registry :
  • Locale info
  • Username
  • Hostname
  • OS version












This malware uses a standard installation mechanism and copies itself as svchost.exe into %APPDATA% , modifies the registry key to add itself under the authorized list of apps, and runs ShellExecute to launch the process. One function of vSkimmer if the Internet is not available is to wait for a USB device with the volume name KARTOXA007  to be connected to the infected machine and to copy all the logs with the file name dumz.log and the card info collected from the victim to the USB drive.










As you can notice in the above code , it tries to resolve the C&C server www.posterminalworld.la and if it does not resolve , it will call another subroutine to wait for the USB drive to be connected and copies the collected logs.
















I checked by disconnecting from the Internet. The malware enumerated all the drives and created the file dumz.log in the drive with the preceding name.












Extracting Credit Card numbers from the memory

VSkimmer maintains the whitelisted process, which it skips while enumerating the running processes on the infected machine.






















Once vSkimmer finds any running process not in the whitelist, it executes  OpenProcess and ReadProcessMemory to read the memory pages of the process and invokes the pattern-matching algorithm to match the regular expression “?[3-9]{1}[0-9]{12,19}[D=\\u0061][0-9]{10,30}\\??”)” and extract the card info read by the payment devices. This is done recursively for every process running in the infected machine and not on the whitelist and continues doing it as long as the malware runs inside the system.


















Vskimmer Network Communications

Before communicating with the command and control server, the malware B64-encodes all the machine information collected and appends it to the URI. The encoded string follows this format:

machine guid|build_id|bot_version|Windows_version|Host_name|User_Name





















While this malware ran, we saw the following response. Note that the commands are within the tag.









Once vSkimmer receives a response from the server, it executes the following routine to parse the command:
















Because the response from the server during execution was null, the malware extracts the 3-byte command and tries to match it with the other commands implemented by vSkimmer. First it checks if the command from the server is “dlx.”






If not, then vSkimmer checks for the “upd” command. These commands implement the HTTP download and execute (“dlx”) and update of the bot (“upd”), respectively.

As we saw earlier in this post, vSkimmer can also grab the Track 2 data stored on the magnetic strip of the credit cards. This track stores all the card information including the card number. (You can read more about the Track 2 data format on Wikipedia. In summary , the data stored is : 
  • Primary Account Number : The number printed on the front of the card
  • Expiration Date
  • Service Code: the three-digit number

Vskimmer botnet Control Panel




















No comments:

Post a Comment