When I look at the masses of spam we receive on a daily basis, I often wonder who is behind it all. What systems do they have in place, and who are the people behind such madness? We have often discussed some of the big spamming botnets, like Cutwail, or Grum on this very blog. But at the same time as the big boys carry out their business, there is also a lot of smaller scale spamming and scamming going on.
Today I was examining a phishing message, and I realized it may offer a clue as to how it was sent and by who.
Pretty standard phish. The link led to a fake CommonWealth Bank phishing page illegitimately hosted on some little hotel’s web site.
Looking closer at the message header revealed some interesting information, namely an X-PHP-Script: header field. This is a feature from PHP 5.3 onwards that allows administrators to track mail (i.e. spam) sent from scripts on a web server. In this case, this little line told me the host and the path to the script which generated the message, i.e. /tmp/a7a.php.
So naturally I went to a browser and loaded that URL. It turns out to be a simple spam mailing application, again hosted illegitimately, where you can create your spam message, dump an address list, and away you go. Free spamming from a (presumably) honorable IP address.
Pretty simple stuff, but also low tech, low volume as well. Even still, suitable for a low tech phisher, with a small targeted address list. This PHP app also had a curious little moniker at the bottom:
“DOla Habibi SpaM Was Here”
I figured that there had to be other web sites hosting this spamming script as well. A bit of Googling uncovered five other sites hosting the same script. Not only that, the source code was readily available on Pastebin. Easy peasy, all you need is a poorly protected website running PHP.
The other piece of information in the X-PHP-Script field was an IP address, 126.96.36.199. This indicates the IP address of the person who used the script to upload the spam. I wonder where that IP address is located? Yup, you guessed it:
A bit more Googling uncovered several complaints of Nigerian scammers with links to that IP address, including a very recent “Romance Scammer” within the last few days. Is this the face of our spammer? “Mr Mobolaji Adegboye” whom, if you are feeling romantic, you can reach at firstname.lastname@example.org. Maybe you can ask him if his mother knows he scams people for a living?
Perhaps. But on a more serious note, this little analysis highlights a few problems, mostly to do with insecure web servers. More and more email scams like this rely on otherwise legitimate web servers to do their work, and especially to piggy back on that server’s IP reputation. Administrators, keep an eye on those web servers and have a system in place to regularly check for oddities. Also consider blocking outbound SMTP from any web servers that have no need to send email.