Advances in spam detection meant that spam operators had to find ways to circumvent new technologies. For instance, Asprox made significant improvements in their spam and module architecture whereas Pushdo made use of decoy network traffic.
Recently, we have discovered a new simple method used by a spam botnet we named StealRat. It consists of 3 essential things:
- Compromised website for sending spam
- Compromised systems for harvesting and delivering the spam data
- Compromised website for delivering the payload
Figure 1. StealRat method
In this set up, the actual spam server is hiding behind three layers of unsuspecting victims: two compromised websites and an infected machine. The infected machine acts as a liaison between the spam server and the compromised website. As there is no interaction between the spam and server, it will appear the email have originated from the infected machine. The spam mail itself does not spread the malware, so there is no visible link between the two as well. In essence, they have separated the core functions and minimized interactions among them to cut-off any threads that could link them to each other. A compromised website has the payload link and a spamming script. The payload is typically porn or an online pharmacy webpage. The spamming script is coded in PHP and waits for data from an infected machine (malware victim). The infected machine connects to the malicious spam server to collect the spam data which includes the following:- backup mail server
- "sender" name
- recipient address
- email template
Figure 2. Sample of a compromised website
Another interesting behavior is that it uses the compromised website’s domain as its email service domain. For instance, if xyz.com is hosting the spamming script, the email will appear to have come from [sender name]@xyz.com. In a compromised system (infected machine), the malware component also exhibits some conspicuous traits. For instance, some variants attempt to cloak its network traffic by modifying the host name to google.com while receiving its instructions from its C&C server. If the C&C is example.com, instead of directly connecting to it, it queries for the domain’s mail server (eg. mx1.example.com) and connects there instead. The network traffic won’t show an established connection to either example.com or mx1.example.com, the hostname would appear to be google.com instead.Figure 3. Connection to google.com
During the course of our investigation, we have identified the following:- about 85,000 unique IPs/domains that sent out spam emails in 1 month
- each IP/domain contains an average of two spamming scripts
- each infected machine sends at least 8,640 spam data to compromised websites per day
- they are currently rotating around seven million email addresses to send spam to
Tags