A couple of weeks ago we were looking at some exploit kits in one of our lab environments and noticed a decline in the number of Neutrino instances we're seeing. This sent us on yet another journey to investigate Neutrino and understand some weird behaviours we were observing. This blog post will tell the story of Neutrino, confused researchers, and OS fingerprinting.
A researcher's first thought when an exploit kit suddenly behaves strange is that the exploit kit developer made some changes or added some features to reduce the exploit kit's exposure to security researchers. In a moment of pride we even considered the possibility that perhaps our recent blog post about Neutrino may have prompted the EK developers to make these changes. Unfortunately for our egos, we proceeded to test the issue and saw the following:
We took several instances of Neutrino and tried accessing them from a vulnerable windows-based machine, all of these attempts got the machine infected and in general, Neutrino seemed to be behaving as expected.
Realizing that the issue is limited to only the lab environment, our next obvious thought was that something was wrong with the environment itself and so we began examining it; we accessed the same Neutrino instances, but were getting absolutely no responses from the server, we couldn't even establish a connection:
… The problem was that every other website (and even exploit kit) was working as intended, the environment seemed completely fine except for when accessing Neutrino.
We tried the obvious solutions of trying to change IP addresses, browsers, pretty much anything we know that exploit kits commonly use to evade security researchers, but to no avail.
We suspected that there might be a configuration issue and began comparing traffic between a machine where Neutrino was working and our problematic environment. After some fiddling with the TCP packet, specifically with the packet's MTU, we managed to get a response from the Neutrino server:
Now all we had left to do was figure out why. Was there a bug on Neutrino's servers? Was our environment issuing packets with non-standard MTU?
As it turns out this is not a bug, it's a feature! Neutrino has begun using an iptables module called "OSF", which provides passive OS fingerprinting for iptables, in order to filter out certain types of machines they don't want accessing their servers.
As far as we can tell, Neutrino is filtering out Linux machines and our fiddling with the MTU caused our lab machine to be detected as "Unknown OS" instead of "Linux", which is why we were then able to get a response. It makes sense for an exploit kit to filter Linux machines out altogether, since these machines are often security products, servers, or other machines that aren't really potential victims. This approach generally reduces their exposure to anything from automated scans to unwanted security researchers.
Exploit kits often employ measures to keep security researchers and other unwanted visitors away from their servers, but most of the time these measures are handled on the HTTP level- with web servers redirecting you away or returning fake error codes; implementing this logic on a TCP level as Neutrino did is a fairly smart move on their part: generally speaking when a server doesn't respond to you at all you tend to assume that it's down. With exploit kits changing their location as rapidly as they sometimes do, it is very likely that this behavior would simply be written off as a dead server and Neutrino would achieve its goal of being left alone by anyone who isn't a potential victim.
To add some amusement, this concept of passive OS fingerprinting (or "p0f") was actually developed by a security researcher called Michal Zalewski (lcamtuf).
This blog post was co-authored by Daniel Chechik and Anat Davidi.
Trustwave Secure Web Gateway customers are protected against the Neutrino Exploit Kit.