Home > Security Tips > Network Security Tactics > Nmap: Firewall configuration testing
Security Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

NETWORK SECURITY TACTICS

Nmap: Firewall configuration testing


Michael Cobb
07.24.2006
Rating: -4.67- (out of 5)


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


This is the sixth in a series of tips on how to use Nmap in an enterprise network environment.

So far in this series, we've looked at how Nmap can be used for network mapping and port scanning. In this tip we'll look at how Nmap can also be used to test the effectiveness of your firewall configuration.

One of the best ways to understand how your firewall handles uninvited traffic is to verify that its filters and rules are working as you anticipated. For example, one mistake many administrators make when creating rules for allowing traffic through their firewall is to trust traffic based simply on its source port number, such as DNS replies from port 53 or FTP from port 20. To test whether your firewall allows all traffic through on a particular port you can use most of Nmap's TCP scans, including the SYN scan, with the spoof source port number option (--source-port or abbreviated just to –g). Simply provide a port number, and Nmap will send packets from that port where possible. For example, the following command will run a FIN scan using a spoofed source port number of 25 (SMTP) saving the output to file firewallreport.txt.

nmap -sF -g 25 -oN firewallreport.txt www.yourorg.com

It's also worthwhile to test your firewall's ability to cope with fragmented traffic. Attackers often split up the TCP header over several packets to make it harder for packet filters and intrusion detection systems to detect an attack. While fragmented packets won't get past packet filters and firewalls that queue all IP fragments, many devices have queuing disabled by default to avoid a drop in performance. Just
More about Nmap

Read our previous tip on using Nmap to scan ports and services.

Learn how to install Nmap on Linux or Windows.

Learn why Nmap is a valuable tool.

add the -f option to set a scan to send fragmented IP packets.

When auditing your firewall, I recommend that you scan ports in numerical order (option -r) to make it easier to follow the traffic flow when analyzing the Nmap output files. However, when testing the effectiveness of firewalls and intrusion detection systems, use the default, which is a randomized port order, in addition to randomizing the order in which hosts are scanned by using the randomize-hosts option, which can be abbreviated to –rH. This, combined with slow timing options, which we will look at next week, will make any network monitoring devices you have work hard to detect the scan. An example command to test your network defences could be:

nmap -sS --scan-delay 500 -f -rH firewallreport.txt www.yourorg.com.

Once you have identified any unfiltered ports or other issues, you should review your firewall rules to ensure that access to all services is controlled, and that filters and rules are performing as intended. After changes are implemented, run Nmap again to check that your changes achieve the desired effect. Nmap offers many features for circumventing poorly implemented firewalls, so play the role of an attacker and find out whether your network defences can cope with FTP bounce scans, idle scans or fragmentation attacks.


NMAP TECHNICAL MANUAL

  Introduction
  Nmap: A valuable open source tool for network security
  How to install and configure Nmap for Windows
  How to install and configure Nmap on Linux
  How to scan ports and services
  More port scanning techniques
 Firewall configuration testing
  Techniques for improving Nmap scan times
  Interpreting and acting on Nmap scan results
  Nmap parsers and interfaces
  Nmap and the open source debate

Rate this Tip
To rate tips, you must be a member of SearchSecurity.com.
Register now to start rating these tips. Log in if you are already a member.




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


RELATED CONTENT
Network Security Tactics
Using Nessus Attack Scripting Language (NASL) to find application vulnerabilities
Screencast: Recovering lost data with WinHex
How to build security into a virtualized server environment
How to install and configure Nessus
How to run a Nessus system scan
Nessus: Vulnerability scanning in the enterprise
Screencast: An introduction to the Open Source Security Testing Methodology Manual (OSSTMM)
Understanding multifactor authentication features in IAM suites
Network intrusion prevention systems: Should enterprises deploy now?
Webmail security: Best practices for data protection

Network Firewalls
Is it possible to allow select access to IP addresses using Windows Server 2003?
Sophos finds patching issues through endpoint NAC tool
Fortinet acquires database vulnerability scanner from IPLocks
Is an IPsec VPN necessary when connecting remote servers that process financial transactions?
Embedding security has drawbacks says TippingPoint chief architect
Is security improved when the number of Internet gateways is reduced?
Nipper audits routers, reveals insecure settings
Product review: Netgear's Netgear FVS336G ProSafe Dual WAN Gigabit Firewall
Product review: Tufin's Tufin SecureTrack 4.1
Product review: SonicWALL's SonicWALL NSA E5500

Open Source Security Tools
Using Nessus Attack Scripting Language (NASL) to find application vulnerabilities
What are best practices for creating an IDS and maintaining a signature database?
How to install and configure Nessus
How to run a Nessus system scan
Nessus: Vulnerability scanning in the enterprise
Nessus 3 Tutorial
Screencasts: On-screen demonstrations of today's IT tools
Screencast: An introduction to the Open Source Security Testing Methodology Manual (OSSTMM)
Ophcrack: Password cracking made easy
Will Cisco's plan to open access to the IOS improve network security?

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
bastion host  (SearchSecurity.com)
firewall  (SearchSecurity.com)
Firewall Builder  (SearchSecurity.com)
personal firewall  (SearchSecurity.com)
screened subnet  (SearchSecurity.com)
virus  (SearchSecurity.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

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

TechTarget Security Media
Information Security View this month\\'s issue and subscribe today.
Information Security Decisions Apply online for free conference admission.
SearchSecurity.com
HomeNewsMagazineWebcastsWhite PapersLearningAdviceTopicsEventsAbout Us

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
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 2003 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts