Apply Your Knowledge
Exercises
3.1: Configuring Windows 2000 Server IP Filtering
This exercise demonstrates how to configure IP filtering on a Windows 2000 Server using the Local Security Settings MMC console. Windows 2000 has built-in security controls that can help restrict certain traffic from entering the server or the network segment it is servicing. This should not be used as an alternative to hardware firewalls, but the idea is similar.
The following assumptions are made in this exercise: The server is a member or a standalone box, there is a DMZ segment, the server was built to host the company Web site, and HTTP is not being used.
Estimated Time: 7 minutes
Select Start, Programs, Administrative Tools, Local Security Settings.
In the navigation tree, right-click IP Security Policies on Local Machine, and then select Manage IP Filter Lists and Filter Actions. The configuration applet appears.
Before you can define IP filter lists, you need to create a new filter action. Click the Manage Filter Action tab.
On the Manage Filter Action page, click Add. A wizard dialog box pops up. Click Next.
In the Name text box, type Block and click Next.
From the Filter Action list, select Block and click Next. Click Finish. The filter action for rejecting unwanted traffic is created. Now you can use it to define access lists.
Switch back to the Manage IP Filter Lists tab, and click Add. On the IP Filter List page, click Add again to define a new IP filter.
A wizard dialog box appears; click Next. In the source address drop-down box, select Any IP Address. Click Next.
In the Destination IP Address drop-down box select My IP Address. Click Next.
In Protocol Type, select TCP and click Next.
On the IP Protocol Port page, leave the From This Port option unchanged. Click To This Port, and type 80 for the Web server port; then click Next.
Click Finish. The IP filter for Web traffic has been created.
Repeat steps 712 one more time to add definitions for port 3389 to allow terminal server connections for remote server management.
When you're finished, type the name for your list and click Close. Click Close again to go back to the Local Security Settings MMC console.
Now that you have IP filter lists and filter actions defined, you can create an IP security policy. Right-click IP Security Policies on Local Machine and select Create IP Security Policy.
A wizard appears. Click Next. Type the name for your policy and click Next.
Uncheck the Activate the Default Response Rule check box and click Next. Click Finish to create the new policy, and the policy properties window will appear.
Uncheck the Use Wizard check box at the bottom of the page and click Add.
On the following page, select the All ICMP Traffic rule and click the Filter Action tab. Select Block Action and click OK. Notice that the policy has been updated with the new rule.
Repeat steps 18 and 19 for all IP traffic (assign a block action) and your custom IP filter list (assign a Permit action). Click Close to finish and go back to the MMC. Note that a new policy has been created in the right pane.
To activate the policy, right-click the policy and select Assign. The policy takes effect immediately. Now test that the only traffic allowed to the box is Web and Terminal Services traffic.
This exercise shows how to protect a Web server from receiving unwanted traffic. If planned carefully, all servers of significance, at least in the DMZ, should have a similar security control implemented as a second line of defense in addition to the firewall. This ensures that the servers are still hard to crack on an individual basis even if the firewall is compromised.
You can use the import/export feature of the IP Filtering snap-in to define policies once per each server type and then distribute them to other boxes that have the same functions to save time. Please note that this type of security does restrict unwanted traffic to the box, but that is all it does. Web server security should be carefully considered and implemented, including the Web server software and the Web applications the server is running. For IP filtering to work, you must have the IPSEC Agent service running.
3.2: Configuring an IP Access List on a Cisco Router
This exercise is an extension of the previous exercise, and it demonstrates how to create a similar IP access list on a Cisco router.
This exercise assumes that a router running IOS software has a minimum of two network interfaces, one of which is connected to the Web server segment of the DMZ. The DMZ interface has an IP of 10.1.1.3/24, and the Web segment interface has an IP of 10.1.20.1/24.
Estimated Time: 5 minutes
-
Start a Telnet session and connect to the router's IP address (10.1.1.3/24). Log in and switch to the privileged mode by typing enable.
-
Enter configuration mode by typing config t.
-
Define an access list by issuing the following command:
access-list 110 permit tcp any 10.1.20.0 0.0.0.255 eq www
-
This command creates access list 110 (if no access lists were previously defined as number 110) and adds a permit rule to allow Web traffic from any host to pass into the Web segment.
-
For detailed access-list usage syntax, type access-list ?.
-
You might want to add more traffic rules to allow Terminal Services management traffic in. For example, type the following:
access-list 110 permit tcp any 10.1.20.0 0.0.0.255 eq 3389
-
Don't forget that an implicit access-list 110 deny ip any any exists at the end of any IP list. To make troubleshooting easier later in the process, you might want to add this command, too.
-
Enter DMZ interface configuration mode (assuming it is the first Ethernet interface on the box, type int e0).
-
To assign access list 110 to interface e0 to screen all incoming traffic out (and prevent it from being forwarded to the Web segment interface), type ip access-group 110 in.
-
To save the configuration changes, exit the interface and terminal configuration modes and type write mem to copy running configuration into startup configuration. Test your setup.
Review Questions
What is the purpose of a firewall and what are the three main architectures of firewalls?
What are the three basic security topologies created using firewalls?
What is the purpose of an IDS? How is it different from a firewall?
What are the main architectures of IDSs?
What is the purpose of access lists employed on routing devices?
Explain NAT functionality and the reasons for using NAT.
Describe the protocols used in network monitoring and management.
What are the basic physical access security controls? Explain each.
Exam Questions
-
Your company is in the process of setting up a DMZ segment. You have to allow file sharing and Windows management console traffic from internal systems to enter the DMZ segment. Which TCP ports do you have to open? (Choose two.)
-
110
-
139
-
135
-
161
-
131
-
23
-
-
Your company is in the process of setting up a DMZ segment. You have to allow FTP and Web browser requests from internal systems to enter the DMZ segment. Which TCP ports do you have to open? (Choose three.)
-
20
-
21
-
25
-
80
-
110
-
135
-
-
During regular security audits and log checking, you suspect that the organization is under attack and someone is using or is attempting to use resources on the internal network. You are confused because the IP addresses in the log files belong to trusted partner companies. Which of the following is likely to be happening?
-
Hijacking
-
Replaying
-
Spoofing
-
Social engineering
-
-
During regular security audits and log checking, you notice that one of your users is accessing files after midnight, when she is normally never active on the network outside normal business hours. When you ask her whether she has been working late at night, she denies having done so. Which of the following is most likely to explain what's occurring?
-
Hijacking
-
Replaying
-
Spoofing
-
Social engineering
-
-
You are securing the network with firewall technologies. You want to prevent certain types of traffic from certain IP addresses and subnets from entering your secured segment of the network. Which technology should be used to achieve this?
-
NAT
-
VLAN
-
Static packet filter
-
IDS
-
-
What type of firewall technique monitors the connection throughout the communication session, checking the validity of IP packet streams?
-
Static inspection
-
Stateful inspection
-
Dynamic inspection
-
Non-stateful inspection
-
-
Your company has a firewall that talks exclusively to an intermediary host that verifies the validity of requests at the Application level, authenticates and hides user identity, and serves as a communications portal. In addition to the firewall, what else is used in this setup?
-
Switch
-
Router
-
Subnet screener
-
Application gateway
-
Answers to Review Questions
-
A firewall is a hardware device or a software application installed on the border of secured networks with the purpose of examining and controlling incoming and outgoing network communications. Firewalls are the first line of network defense. The three basic architectures of the firewalls are packet filtering, circuit level, and application level. One more architecture type includes all three of the basic types: stateful inspection.
- A bastion host is a dual-homed device (a device with two network interfaces).
Any routing between the interfaces on that device is disabled, and specialized
software (IP Security policies in Win2K, Cisco IOS, and so on) is configured
to allow certain types of traffic in while keeping the rest out of the network.
A screened host gateway is a packet-filtering device, usually also a router, which communicates only with a designated application gateway inside the secured network. No other traffic is allowed in or out of the screened host gateway. Basic functionality is the same as a bastion host. If a data stream is deemed safe (based on the configuration), it is forwarded to the application gateway. The application gateway then determines how to handle the stream.
A screened subnet gateway includes two screened host gateway devices that isolate the LAN from the Internet, creating what is known as a screened subnet or demilitarized zone (DMZ) between them. The architecture also includes a proxy server (bastion host). This architecture is essentially a combination of the bastion host architecture and screened host gateway architecture.
-
An IDS is an intrusion detection system. Its purpose is to detect known attack patterns in communication streams. An IDS is designed to detect more sophisticated attacks than those that firewalls can handle on-the-fly. Firewalls are designed to prevent attacks before they happen by keeping offending traffic offsite. If attackers are smart enough to get through a tightly locked down firewall, this is where the IDS comes into play: It detects attacks in progress that were able to penetrate the first line of defense. Usually, IDS does not prevent attacks but generates alarms about attacks in progress, acting as a safety net for firewalls.
-
Active or passive analysis, host or network analysis, and anomaly or misuse analysis are three main IDS architectures.
-
Access lists can be configured on routing devices to effectively act like packet-filtering firewalls. This should not be used as the first line of defense, but it certainly can be used to create security fallback mechanisms in the network in case of a firewall compromise.
-
NAT is used to enable address translation between private, nonroutable addresses and external public address for communication in the public network. This is achieved using mappings that the NAT device creates and maintains. Each outgoing request dynamically creates a mapping on the NAT device, and NAT proceeds with the outgoing request, acting as a proxy. When it gets the reply, the NAT device looks up the mapping and forwards the information back to the original requester. In the same fashion, static mappings can be created to instruct NAT to forward certain requests to certain hosts on the inside network. By using NAT, you can preserve scarce public routable IP addresses and provide an additional layer of security because internal systems are not directly accessible using public addresses. Also, in the event of a service provider change, you do not have to reassign new IP addresses to your internal networks.
-
The Simple Network Management Protocol (SNMP) was developed as a temporary solution to network management requirements arising from growing network infrastructures. The purpose of SNMP is to enable the flow or exchange of management information between network nodes and to enable a network management environment. Three versions of SNMP are available. The most recent version, SNMPv3, provides authentication and data integrity safeguards that the first two versions do not have. The Remote Monitoring (RMON) specification can be considered an extension to the SNMP standard. It is based on similar standards to SNMP and relies on Management Information Base (MIB) structures and SMI. The purpose of RMON is to deliver network information grouped into nine major monitoring elements. Availability of RMON statistics and information can prove pivotal in designing and assessing network security.
-
To secure infrastructure equipment from potential theft and unauthorized physical access, all vital equipment (servers, routers and switches, cable patch panels, modems, backup devices and removable media, and so on) must be stored in an isolated location with controlled and restricted access. This location must be humidified and ventilated and should be monitored by video surveillance systems.
Answers to Exam Questions
B, C. To enable file transfer using Windows sharing, traffic for port 139 needs to be allowed to pass through the firewall. You might want to consider opening ports 137 and 138 to allow NetBIOS traffic for name resolution to work, but port 139 is sufficient for sharing if you are planning to reference DMZ servers by IP addresses or use manual WINS entries or lmhosts files in the internal segment. Port 135 must be open to allow RPC traffic (remote procedure calls are used extensively by Windows management tools).
A, B, D. Ports 20 and 21 are associated with FTP, where 20 is used for file transfer data and 21 for command and control data. Port 80 is associated with HTTP, the protocol Web browsers use to request service and receive responses. Port 25 (answer C) is associated with the Simple Mail Transfer Protocol and is not mentioned in the requirements. Port 110 (answer E) is associated with POP3, the protocol many email clients use to download email from a server to a local machine.
C. Spoofing is the most likely reason for this confusion. Spoofing allows attackers to misrepresent the source of the requests and masquerade as valid sources. Hijacking (answer A) involves taking over an existing session by seeking to anticipate next-packet sequence values and "jumping into" a traffic stream before the legitimate user can respond. Replaying (answer B) involves capturing and reusing historical (previously legitimate) traffic to try to compromise security and gain unauthorized access. Social engineering (answer D) involves an attempt to talk human users into divulging access information (accounts, passwords, and so forth) to enable unauthorized users to compromise security and use legitimate credentials to gain access.
D. Social engineering involves an attempt to talk human users into divulging access information (accounts, passwords, and so forth) to enable unauthorized users to compromise security and use legitimate credentials to gain access. Somebody has obtained this user's account and password information and is using it to access resources to which she's entitled. At the bare minimum, disabling this account and providing her with a new account/password combination is warranted (and it might make sense to monitor the old account to try to locate or identify the malefactor). Hijacking (answer A) involves breaking into active sessions, which does not match the pattern you've observed. Replaying (answer B) involves capturing and replaying previous legitimate network activity to compromise system security; this doesn't match the pattern, either. Spoofing (answer C) involves reporting a network address that doesn't actually match the intruder's real address; it doesn't match the pattern, either.
C. Static packet filtering is the simplest solution available to implement basic filtering of network traffic based on source, destination addresses, and protocol types.
B. Stateful inspection monitors the connection throughout the communication session, checking the validity of the IP packet stream.
D. An application gateway is used in some security topologies to act as the intermediary between users and services. Application gateways communicate and service all requests through the firewall.
Suggested Readings and Resources
Online Material
HOW TO: Harden the TCP/IP Stack Against Denial of Service Attacks in Windows 2000 (http://support.microsoft.com/default.aspx?scid=kb;en-us;q315669).
Keeping Your Site Comfortably Secure: An Introduction to Internet Firewalls (http://csrc.nist.gov/publications/nistpubs/800-10/node1.html).
Local Area Detection of Incoming War Dial Activity (http://www.att.com/isc/docs/war_dial_detection.pdf).
White Paper: Internet Security for Small Businesses (http://www.cisco.com/warp/public/cc/pd/rt/800/prodlit/fire_wp.htm).
White Paper: The Science of Intrusion Detection System Attack Identification (http://www.cisco.com/warp/public/cc/pd/sqsw/sqidsz/prodlit/idssa_wp.htm).
Publications
Chappell, Laura. Advanced Cisco Router Configuration. Indianapolis, IN: Cisco Press, 1998.
Microsoft Corporation. Windows 2000 Server TCP/IP Core Networking Guide. Redmond, WA: Microsoft Press, 2002.