It has been a while since I’ve written my last post, so I decided to do some basic malware analysis on the Angler Exploit Kit. For those who are not familiar with Angler (not to be confused with the angler fish ): Angler is a kit that is used by cyber criminals to distribute their malware.
The actors behind Angler regularly hack/hijack popular websites -often by making use of vulnerabilities in content management systems such as WordPress- and inject malicious code into them. The code is then served to an innocent visitor of that website, which tries to exploit some known security vulnerabilities in the browser (addons) of the visitor (e.g. Internet
Explorer, Adobe flash, Microsoft Silverlight, …). By exploiting those vulnerabilities, malicious software is installed in the background, without the permission of the user.
Below I’ll be discussing some interesting facts about Angler.
Fact 1: Angler manages to infect more than one million workstations a year
There is a common misconception that a user explicitly needs to download a malicious file in order to get his PC infected. Exploit kits use a technique called drive-by-downloads. With this technique, malicious software can be ran just by opening a website in your browser. Angler is by far the most effective exploit kit that makes use of drive-by-downloads. It manages to give millions of users a headache after visiting an infected website. Below is an example of a Belgian website that is infected with Angler. The HTML code of the website is replaced by obfuscated angler code. After a few milliseconds the code redirects the user to the original website.
The obfuscated angler code serves a flash file that causes a buffer overflow. The buffer overflow causes the PC of the victim to download malware. In my test case ransomware was downloaded. The ransomware encrypted all the documents on my test machine. After a while a blacklist letter was shown. In order to get my files back, I had to pay a ransom. Luckily no ransom had to be paid, given the fact that the infected machine was my malware analysis test virtual machine . Better luck next time cyber criminals!
Fact 2: Angler uses some advanced anti-analysis techniques
The actors behind Angler love to implement measures to slow down analysis of their techniques. Below I will discuss a few anti-analysis techniques I have come across while I was analyzing Angler.
Code obfuscation & sandbox detection
The site that is infected with the Angler exploit kit, only servers the kit once in a while. After the kit has been served to a victim, the subsequent web site visitors do not get the exploit kit.
For my analysis purposes, I use an emulated Angler server. I emulate the Angler server by intercepting the network traffic of an infected machine, and replying it using a python script in a sandboxed Kali Linux environment.
Another interesting thing I noticed while analyzing Angler is that the IP addresses of machines that are suspected to be used by analysts are banned . If you visit a few Angler infected websites in a short time frame, your IP gets banned. For reverse engineering purposes, this is a bad thing. In respect to defense purposes this is a great thing: this may be a way to get rid of getting Angler code pushed to your machine
Below is a screenshot of a packet capture of an Angler infection. The requests to the server are marked in red. The responses of the server are marked in green. You can clearly see that the first response gives me a valid page (marked in black). All subsequent responses give me malformed packets, indicating my IP address no longer got the honor to receive Angler code.
It is also interesting to see that Angler tries to emulate legitimate traffic patterns of messaging boards. Angler uses keywords in their URLs such as “viewforum”, “search” and “viewtopic”. Those keywords can also be found in the URLs of messaging boards.
Fact 3: Not everything goes according to plan
I’ll end this post on a funny note . During my analysis, I stumbled on some Angler fails. One of them was that the Angler actors messed up while trying to add their malicious code to a legitimate website. For some reason, the code injection process messed up the webpage terribly. The end result was a webpage full of weird characters. Better luck next time, cyber criminals!