Yet Another Reason To Hate Online Ads

Through the magic of JavaScript and ad networks, research presented at Black Hat by Jeremiah Grossman and Matt Johansen shows how to build a huge botnet quickly -- and then the fun begins

Mike Rothman, Analyst & President, Securosis

September 8, 2013

4 Min Read
Dark Reading logo in a gray background | Dark Reading

I'll readily admit I'm numb to advertising -- at least when I'm online. Ads are everywhere, taking up every visual inch of screen real estate, with the exception of the text I'm looking at. But I just focus on the text I'm looking for, so the rest of the stuff is noise. It's a bit different with TV since the magic of the DVR allows me to skip pretty much all of the ads. When I'm on the road and not using a DVR, I realize the true annoyance of these TV ads. In fact, I don't really watch TV without a DVR, with the exception of live sports. And in that case, the commercials annoy me.

But that's just annoyance, right? You can tune out the ads. Or check your Twitter or Facebook for two or three minutes while you learn about the latest magic pills to cure insomnia, frequent urination, or erectile dysfunction. (As an aside, if anyone has a good way to describe erectile dysfunction to a 10-year-old, I'm all ears. It's just a matter of time before I'm watching a football game with my kids and one of those ads show up.)

Yet at Black Hat, my friends Jeremiah Grossman and Matt Johansen showed that online advertising networks can be manipulated and gamed by attackers using pretty simple tactics to launch an attack (typically DDoS) against a specific site without any effort from the user. All they have to do is render a Web page with the attack ad embedded. We've spent years talking about not clicking on strange links or not going to those sites. But that's about not being in a bad neighborhood. What if the bad neighborhood comes to you?

That's right: If an advertising network accepts a compromised ad, likely paid for with a stolen credit card, it will display the ad almost anywhere on legitimate sites. There isn't much the website can do -- it has outsourced the ads to the ad network. The ad networks should have better controls, but well, you know. It's basically a drive-by attack that you can't really block. Render the legitimate page and get owned. That's awesome, right?

As Jeremiah and Matt described during their session, "Networks that serve up advertisements on ad-supported sites across the Internet frequently allow their advertisers to run arbitrary JavaScript on browsers displaying their ads." This JavaScript (if the browser is set to run JavaScript, which is the default mode) can have the browser make a request to the target, start a drive-by malware download, or lots of other diabolical stuff.

Even better, the pair of researchers got around an ad network's typical need to approve every change to an ad (for instance, changing the target) by referring to an external site to download the target URL or any other instructions in real time. JavaScript for the win. This gives an attacker the ability to dynamically change anything pertaining to the attack at will.

I know this is the "vulnerabilities and threats" section, and I don't necessarily need to suggest some ways to deal with this kind of attack. But that's not how I roll. So here are a few not-so-simple things you can do to protect the devices from this kind of activity. First, you can implement advanced malware protection on the endpoint devices, as I described in "Controlling the Big 7." This doesn't really help if the ad just gets the device to render a website (for DDoS purposes), but it can stop other compromises targeting the endpoint device.

Next is to address the traffic by blocking it on the network. Maybe you tighten the egress filtering policies on your egress NGFW, IPS, or Web filter looking for traffic bursts to a specific site. Or perhaps you implement a pretty tight device firewall policy to block outbound Web traffic unless it's approved. I use a tool called Little Snitch, which does this. It's a great tool, but it's a pain. The user would need to be sophisticated enough to realize an outbound connection request is no bueno and to deny it.

Or you can do what most folks will do -- ignore the problem. I mean, maybe it consumes a little Internet bandwidth with some of your devices pounding an unsuspecting website. But, ultimately, that isn't really going to impact much of anything from the standpoint of the success factors of either security or operations. There's the rub. These folks have no incentive to deal with this issue, so they won't.

And the attackers will run to the bank. Again.

Mike Rothman is President of Securosis and author of the Pragmatic CSO

About the Author

Mike Rothman

Analyst & President, Securosis

Mike's bold perspectives and irreverent style are invaluable as companies determine effective strategies to grapple with the dynamic security threatscape. Mike specializes in the sexy aspects of security, like protecting networks and endpoints, security management, and compliance. Mike is one of the most sought after speakers and commentators in the security business and brings a deep background in information security. After 20 years in and around security, he's one of the guys who "knows where the bodies are buried" in the space.

Starting his career as a programmer and a networking consultant, Mike joined META Group in 1993 and spearheaded META's initial foray into information security research. Mike left META in 1998 to found SHYM Technology, a pioneer in the PKI software market, and then held VP Marketing roles at CipherTrust and TruSecure - providing experience in marketing, business development, and channel operations for both product and services companies.

After getting fed up with vendor life, he started Security Incite in 2006 to provide the voice of reason in an over-hyped yet underwhelming security industry. After taking a short detour as Senior VP, Strategy and CMO at eIQnetworks to chase shiny objects in security and compliance management, Mike joins Securosis with a rejuvenated cynicism about the state of security and what it takes to survive as a security professional.Mike published "The Pragmatic CSO" in 2007 to introduce technically oriented security professionals to the nuances of what is required to be a senior security professional. He also possesses a very expensive engineering degree in Operations Research and Industrial Engineering from Cornell University. His folks are overjoyed that he uses literally zero percent of his education on a daily basis.

He can be reached at [email protected]. Follow him on Twitter @securityincite

Keep up with the latest cybersecurity threats, newly discovered vulnerabilities, data breach information, and emerging trends. Delivered daily or weekly right to your email inbox.

You May Also Like


More Insights