informa
Commentary

Virtual Machines For Fun, Profit, And Pwnage

Virtualization has turned the IT world upside down. It is used everywhere these days, from desktops to servers and data centers to the "cloud." It has also presented itself as a double-edged sword to security professionals.
Virtualization has turned the IT world upside down. It is used everywhere these days, from desktops to servers and data centers to the "cloud." It has also presented itself as a double-edged sword to security professionals.On one hand, it makes building a lab and testing things easier; on the other, it's letting sysadmins deploy many servers of varying security silos on one hardware platform, exposing a secure server to more risk. But while it's easy to go on and on about the security issues surrounding virtualization, I'd rather focus on something more positive that I'm working on right now -- custom virtual machines for penetration testing.

I've extolled the virtues of using virtual machines for creating test labs in the past. It makes it easy to have different operating systems with snapshots at differing patch levels to test exploits and ensure they work as expected. If the virtual machine gets trashed during the test, then it's easy to roll back to a previous snapshot as if nothing happened. The same practice can be applied to penetration testing. There are several reasons, but ultimately it comes down to the fact that not all of the best tools run on only Linux or on only Windows.

Because of that fact, I now keep five virtual machines updated for penetration testing. Three are Linux-based and two run Windows. The Linux systems are Samurai Web Testing Framework, Backtrack 4, and the latest version of Ubuntu. For Windows, I now have a Windows 7 virtual machine along with my trusty Windows XP system.

A small amount of maintenance is required with having so many virtual machines, but it doesn't take long provided you keep an inventory of what tools are installed on each one, patch them regularly, and take regular snapshots. One thing I can't stress enough is the importance of the snapshot feature of virtualization software. It definitely saved me several hours today when I locked myself out of my Windows 7 system.

I had just updated some of the system patches and was proceeding with the upgrade of a few of the penetration testing tools that were installed. When I rebooted, I couldn't log into the system. Kon-boot didn't work and kept causing my system to blue screen when Windows loaded.

I ended up reverting to a snapshot where I was already logged in, created a new admin user, and used the new admin account to reset my primary account. Sure, I had to reinstall the most recent patches and some tool updates, but it saved me a couple hours of having to start from scratch.

It doesn't matter what base operating system you use -- pretty much everyone has some type of virtualization software available for it. On my desktop, I use VMware Fusion under Mac OS X, and my MacBook Pro running Linux has Virtual Box. It doesn't matter too much which you choose, just be sure to provide a little care and feeding to them so they stay current and ready for your next penetration test.

John H. Sawyer is a senior security engineer on the IT Security Team at the University of Florida. The views and opinions expressed in this blog are his own and do not represent the views and opinions of the UF IT Security Team or the University of Florida. When John's not fighting flaming, malware-infested machines or performing autopsies on blitzed boxes, he can usually be found hanging with his family, bouncing a baby on one knee and balancing a laptop on the other. Special to Dark Reading.

Recommended Reading: