FastPOS Updates in Time for the Retail Sale Season
Most point-of-sale (PoS) threats follow a common process: dump, scrape, store, exfiltrate. FastPOS (initially detected by Trend Micro as TSPY_FASTPOS.SMZTDA) was different with the way it removed a middleman and went straight from stealing credit card data to directly exfiltrating them to its command and control (C&C) servers.
FastPOS was true to its moniker—pilfer data as fast as possible, as much as it can, even at the expense of stealth. The malware is a reflection of how PoS threats, though no longer novel, are increasingly used against businesses and their customers. As such, FastPOS’s update does not come as a surprise—in time for the oncoming retail season to boot.
The samples we analyzed were compiled during the second week of September, and feedback from our Smart Protection Network confirmed that they are already deployed against small-medium businesses. FastPOS’s developer also seemed to have wasted no time validating his code by confirming its functionality in a full infection. It only took about a month from when its C&C domain was registered (mid-August) to the launch of its new campaign, making it faster than their previous operation in 2015.
Modular and Architecture-Aware
We were able to detect FastPOS’s update (TSPY_FASTPOS.A) when we monitored an unusual network connection in one of the endpoints of a company based in North America. The format and keywords, ‘cdosys’ and ‘comdlg64,’ as well as the use of HTTP GET instead of HTTP POST, and the use of a simple HTTP User Agent string (Firefox) for data exfiltration were the initial giveaways.
Figure 1. FastPOS using HTTP GET to exfiltrate data
FastPOS’s first incarnation was multithreaded, having one process for each functionality—keylogging, RAM scraping, and self-updating. In its latest iteration, the malware makes use of different components hidden in its resource instead of writing everything in one file.
The components FastPOS’s new version is sporting are:
- Serv32.exe – creates and monitors a mailslot and sends its contents to the C&C server
- Kl32.exe – keylogger component (32-bit)
- Kl64.exe – keylogger component (64-bit)
- Proc32.exe – RAM scraper (32-bit)
- Proc64.exe – RAM scraper (64-bit)
Of note are separate components for 32-bit and 64-bit systems. While both are stored in its resource, only the appropriate component will be copied to the Windows folder and executed. Kl32.exe/Kl64.exe are renamed to kbd.exe, and proc32.exe/proc64.exe to servproc.exe, possibly to make it easier to reference the files without needing to constantly check the affected system’s architecture.
A Well-Oiled Machine?
How do the components make the entire system work? The main file extracts all components and passes control to the main service (serv32.exe). The main service creates and monitors a central communication medium and directly sends all received information to the C&C server. The keylogger components (Kl32.exe/Kl64.exe) hook the keyboard then communicate with the main service to send logged keystrokes to the C&C server. The RAM scraper modules monitor processes and scan for credit card track data, which are then sent to the main service.
Figure 2. How FastPOS’s components work
Stolen information is now stowed in mailslots, a mechanism for applications to store and retrieve messages. The use of mailslots to evade AV detection isn’t new. LogPOS (TSPY_POSMAIL.A), which emerged last March 2015, was one of the first POS malware to utilize this technique. Since mailslots are memory-residing temporary files, it enables attackers to save information about the infected system without leaving traces of a physical file.
Modules that Steal Together, Stay Together
The developer’s approach to updating his malware is significant. Modular malware such as FastPOS can be harder to detect as some of the components can be programmed not to work without another. Others such as FastPOS’s do not depend on other components and can be self-executed, but only if the arguments for them are known.
Uncovering a component doesn’t guarantee others can be found either. For instance, FastPOS’s main service and RAM scraper can be seen running as a service, making them easier to remove. However, the keylogger component can be harder to notice as its code is injected into explorer.exe’s process memory.
Figure 3. FastPOS’s keylogger component (left) seen running, but only the main service and RAM scraper component are visible (right)
Figure 4. FastPOS’s keylogger component injected to explorer.exe
The use of mailslots can also be seen as a necessary improvement. With FastPOS’s first version, it was easier to just keep the data logs in memory since there is only a single process running. By going modular, it needed a central repository where all components can write logged data without using a physical file.
‘Tis the Season
FastPOS’s update shows that its developer is active and isn’t shying away from trying new tactics—from switching memory to mailslots for data storage to using different versions of the same platform to create the malware. Binary analysis of FastPOS’s first versions indicates that the new iterations were made around the same timeframe—the earlier versions were developed around September last year. The deployment is also quite suspect, as the malware’s development cycle seems to keep pace with the retail sale season.
Trend Micro Solutions
Given FastPOS’s emphasis on speed, it is mainly designed to target businesses whose primary network gateways have a relatively lesser footprint. Trend Micro’s advanced endpoint solutions such as Trend Micro™ Smart Protection Suites, and Trend Micro™ Worry-Free™ Business Security provide both detection and blocking of all the relevant files and C&C traffic. Also, specific to point-of-sale devices, implementation of application control greatly mitigates attacks by ensuring that only whitelisted applications are allowed to execute.
FastPOS’s C&C traffic is already blocked by Trend Micro™ Web Reputation Services, and is detected by Deep Discovery Inspector™. TippingPoint customers are protected from this threat with the following MainlineDV filters:
- 24338: HTTP: TSPY_FASTPOS.SMDRP (FastPOS) Checkin
- 25042: HTTP: FastPOS Sending Status Logs
8e7761e123026d9ce6a108e77dd677ee5d6245e4 – TSPY_FASTPOS.A
Other detections include: