Pen testing a VPN is straightforward, and there are some common tools for the job. It's not much different from the rest of your pen testing routine and should be part of it.
- Scout the terrain and plan the attack.
- Exploit known vulnerabilities -- then close or patch them.
- Test for default user accounts -- then shut them down.
The exploit phase of the test must go in one of two directions. Testing an IPSec VPN is very different from testing an SSL VPN. The IPSec VPN is network-based, while the SSL VPN is Web-based. In fact, the SSL VPN is essentially a Web application and should be tested as such.
For IPSec VPNs, NTA Monitor has a tool called IKE-scan, which can fingerprint many VPN vendors and models. With that information, a hacker can search the Web for details of attacks against specific vendors. Exploits have been found and posted for Cisco, Nortel, Check Point and Watchguard devices. The tool can't fingerprint every VPN model, but it can reveal the type of authentication used in the VPN – useful information for a prowling cracker. Other tools, like IKEProbe and IKECrack, take advantage of weaknesses in the pre-shared key (PSK) authentication used in IPSec VPNs. The hashes captured by these tools can then be run through ordinary password crackers, such as Cain and Abel, to steal passwords for malicious access to the VPN and, of course, the corporate network.
For SSL VPNs, the same tools for scanning a Web application can be used. Tools, such as WebInspect and Watchfire, can check for Web threats like cross-site scripting (XSS), SQL injection, buffer overflows, weak authentication and old-fashioned parameter manipulation. The scan results can be followed by either automatic or manual tests to verify the vulnerabilities. Again, an SSL VPN is just a Web application. Test it like one.
Finally, IPSec VPNs, like any firewall or network device, have default user accounts. These accounts are used for initial installation and aren't needed after that. Either remove them or change their names, where possible. The same goes for any administrative accounts used for routine maintenance. Change default passwords.
A VPN isn't sacred. It's a network device like any other with flaws, blemishes and vulnerabilities. But, with proper pen testing, it can be hardened and secured, and effectively protect your network gateway.
About the author
Joel Dubin, CISSP, is an independent computer security consultant in Chicago. He is a Microsoft MVP in security, and his expertise is in Web and application security. He is also the author of The Little Black Book of Computer Security available from Amazon.
This was first published in April 2006