Tools to prevent drive-by attacks

Upgrading the Gateway

The defense framework should not focus solely on the client. Another important component in your anti-malware strategy is the border to the Internet.

The first and most important measure should be to enable a web filter on your Internet gateway or – if the type of firewall you use doesn't support this – to install an additional web proxy with appropriate URL filtering. If you use Squid, SquidGuard is a useful URL redirector that is available for free; also, free blacklists are available for SquidGuard [26]. However, the free blacklists are often maintained as amateur projects; current malware domains are therefore more likely not to be found on these lists. Commercial providers have a clear lead in this area.

Graphical Firewalls

The term "graphical firewall" often refers to a security system consisting of a UTM firewall and a terminal server. The terminal server is connected to a separate network interface on the firewall, and it is thus isolated from the LAN in a demilitarized zone (DMZ; Figure 5). For the users on the LAN, all Internet-facing network connections are now blocked on the firewall and are only accessible through a graphical protocol (hence the name) on the terminal server in the DMZ. Methods for terminal server access include protocols such as VNC, RDP, PC-over-IP, SPICE, NX, and ICA, but also X11 tunneling.

Figure 5: The principles of a graphical firewall: the browser runs on a terminal server in the DMZ.

The user then launches the browser and possibly other Internet software on the terminal server, for which Internet access is enabled on the firewall. Ideally, as a further protective measure, the firewall will additionally run a web proxy with URL filtering and virus scanning enabled. The user on the terminal server should be created according to the principle of least possible privileges. Now, if the browser or one of the plugins is attacked by drive-by download, damage to the session on the terminal server is limited – the attacker first has to compromise the terminal server and the firewall to gain access to the actual client on the LAN.

You'll find instructions for building a graphical firewall in Building Internet Firewalls on the O'Reilly site [27]. The German Federal Office for Information Security (BSI) introduced the concept of the Remote-Controlled Browser System (ReCoBS) [28] a few years ago to describe the principle of outsourcing the browser to a terminal server using a graphical firewall.

Professional graphical firewalls include the TightGate Pro product and secureVD. According to the manufacturer, TightGate Pro [29] is suitable for user groups with at least 10 seats, particularly in regulated environments such as government offices. SecureVD [30] (Figure 6) is based on a UTM firewall; its hardened operating system was extended to include a KVM hypervisor, which means you can launch virtual machines running Windows or Linux directly on the firewall using the web-based administration interface. The virtual network adapters of the virtual machines are connected to the physical DMZ interface of the firewall through a bridge so that the virtual machines are also isolated in the DMZ. SecureVD can, in principle, virtualize both servers (e.g., web, FTP, and mail servers) as well as desktops.

Figure 6: SecureVD provides the user with virtual machines in a hardened environment.

Because secureVD supports desktop virtualization for both Linux and Windows, users can work with familiar software. If the virtual Windows desktop also has an RDP server (e.g., the XP/VS Terminal Server for Windows by Thinstuff [31]), multiple users can easily share a single virtual desktop.

Starting with the standard version, the Thinstuff XP/VS Terminal Server also supports TSX RemoteApp (seamless windows), which means that the browser or any other application can be started via an RDP connection from the virtual machine and then displayed directly at the workplace. This removes the need to use two desktops, which many users find confusing.


Drive-by downloads are already the method of choice for spreading malware. A complete solution to this problem is currently not in sight, so admins need to deal with this issue urgently. However, the situation is far from hopeless; armed with a suitable mix of tools and techniques, administrators can counter the threat.


  1. ENISA Threat Landscape:
  2. Java attacks:
  3. Websense 2012 Threat Report:
  4. BackTrack:
  5. Kali Linux:
  6. Common Exploit Kits:
  7. ExploitPackTable 2013:
  8. CVE:
  9. BSI catalog of measures: (in German)
  10. Fortify:
  11. IBM Security AppScan:
  12. Skipfish:
  13. What is Safe Browsing?
  14. Safe Browsing API:
  15. Malware domain list:
  16. InitiativeS:
  17. Wepawet:
  18. ModSecurity:
  19. Mozilla plugin check:
  20. Qualys BrowserCheck:
  21. Qualys Business Edition:
  22. F-Secure:
  23. Protection Service for Business, Workstation
  24. BLADE:
  25. Sirrix AG:
  26. SquidGuard:
  27. Building Internet Firewalls:
  28. ReCoBS:
  29. TightGate Pro: (in German)
  30. secureVD:
  31. XP/VS terminal server:

The Author

Thomas Zeller is an IT consultant who has been involved with IT security and open source for 15 years. He is the author/co-author of the books OpenVPN Compact and Mind Mapping with Freemind. In real life, he is the managing director of a medium-sized IT system integrator, where he is also responsible for the IT security division.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Kaspersky Analysis: Black Market in Botnets

    Virus analyst Yury Namestnikov investigated the structure, functionality and business model of botnets for antivirus firm Kaspersky Lab with some surprising results.

  • Of Money Mules and Cyber Criminals

    A new article by Roel Schouwenberg, Senior Antivirus Researcher at the Kaspersky Lab, has drawn attention to the increased use of malware in cyber attacks on financial institutions.

  • USENIX Security 2008

    The 17th Security Symposium met in San Jose, California, USA, during the week of July 28, with a refereed paper track and Invited Talks.

  • Security Lessons

    Sometimes, even ING, YouTube, The New York Times, and Google get it wrong.

  • Backdoors

    Backdoors give attackers unrestricted access to a zombie system. If you plan to stop the bad guys from settling in, you’ll be interested in this analysis of the tools they might use for building a private entrance.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More