Home > Hacking for Dummies: Test your firewall rules
Book Excerpt:
EMAIL THIS LICENSING & REPRINTS

Hacking for Dummies: Test your firewall rules

27 Jun 2007 | Kevin Beaver; published by Wiley Publishing

Advice for securing Windows
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google

This excerpt is from Chapter 9 - Network Infrastructure in "Hacking for Dummies, 2nd edition" written by Kevin Beaver and published by Wiley Publishing.

As part of your ethical hacking, you can test your firewall rules to make sure they're working like they're supposed to. A few tests can verify that your firewall actually does what it says it's doing. You can connect through it on the ports you believe are open, but what about all the other ports that can be open and shouldn't be?

Some security-assessment tools can not only test for open ports, but also determine whether traffic is actually allowed to pass through the firewall.

All-in-one tools

All-in-one tools aren't perfect, but their broad testing capabilities make the network scanning process a lot less painful and can save you tons of time! Their reporting is really nice, too, especially if you will show your test results to upper management.

Nessus, QualysGuard, and GFI LANguard Network Security Scanner provide similar results. Figure 9-11 shows partial output from LANguard. It identifies open ports on the test network and presents information on SNMP, operating system information, and special alerts to look for.

Figure 9-11:

Information gathered from a network scan using LANguard Network Security Scanner.

You can use LANguard Network Security Scanner and QualysGuard to find operating system vulnerabilities and patches that need to be applied. Pretty slick! I'll show you more on this in Chapter 11 when I talk about hacking Windows.

Netcat

Netcat can test certain firewall rules without having to test a production system directly. For example, you can check whether the firewall allows port 23 (telnet) through. Follow these steps to see whether a connection can be made through port 23:

  1. Load Netcat on a client machine inside the network.
    This allows you to test from the inside out.
  2. Load Netcat on a testing computer outside the firewall.
    This allows you to test from the outside in.
  3. Enter the Netcat listener command on the client (internal) machine with the port number you're testing.
    For example, if you're testing port 23, enter this command:
    nc –l –p 23 cmd.exe

  4. Enter the Netcat command to initiate an inbound session on the testing (external) machine. You must include the following information:
    • The IP address of the internal machine you're testing
    • The port number you're testing

    For example, if the IP address of the internal (client) machine is 10.11.12.2 and the port is 23, enter this command:
    nc –v 10.11.12.2 23

If Netcat presents you with a new command prompt (that's what the cmd.exe is for in Step 3) on the external machine, it means that you connected and are now executing commands on the internal machine! This can serve several purposes, including testing firewall rules and — well, uhhhmmm -- executing commands on a remote system!

Microsoft Windows Firewall
Configure Vista Firewall to support outbound packet filtering

Tuning Windows Vista security: The firewall

A neat commercial tool that specializes in evaluating the performance of packet filtering devices, such as firewalls, is Traffic IQ Pro by Karalon (www.karalon.com). With this tool, shown in Figure 9-12, you can connect one NIC on your testing machine to your firewall's internal segment and a second NIC to your firewall's external segment or DMZ and generate generic and/or malicious traffic see if your firewall is doing what it says it's doing. Such a test is great for those annual firewall "rulebase audits" mandated in many organizations.

An alternative firewall rulebase testing tool for the UNIX platform is Firewalk (www.packetfactory.net/firewalk).

Countermeasures against firewall attacks

The following countermeasures can prevent a hacker from testing your firewall:

  • Limit traffic to what's needed.

  • Set rules on your firewall (and router, if needed) to pass only traffic that absolutely must pass. For example, have rules in place that allow HTTP inbound to an internal Web server and outbound for external Web access. This is the best defense against someone poking at your firewall.

  • Block ICMP to help prevent abuse from some automated tools, such as Firewalk.
  • Enable stateful packet inspection on the firewall, if you can. It can block unsolicited requests.

Figure 9-12:

Traffic IQ Pro for generating packets and analyzing a firewall's capabilities.



Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
Network Firewalls
Network security assessment for network infrastructure
Hacking for Dummies, 2nd edition: Chapter 9
How can I disable file transfer in MSN Messenger?
Setting up IPsec bypass
Automatic exceptions: IPsec bypass
The hacker handbook: Eleven tips in eleven minutes
Wireless network security testing
Cisco patches flaws in multiple products
Rootkits: Managing the threat with prevention measures
Windows Hardening Expert Advice

Micorsoft Windows Firewall
Down the chimney, through the firewall: Holiday quiz
Password cracking, network rights and Windows Firewall expert advice
Solving Windows networking security issues: Security expert roundup
Adding new applications in Windows Firewall
Microsoft Windows Firewall security
Scan IP ports without Windows Firewall restrictions
How do I bypass Windows Firewall to scan IP addresses?
Managing Microsoft's Windows Firewall
Configure Vista Firewall to support outbound packet filtering
Setting up IPsec bypass

Hacking for Dummies, 2nd edition
Using port scanning tools to test network security
Use a network analyzer to sniff the network

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
ISA Server  (SearchWindowsSecurity.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT DownloadsBlogs
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2004 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts