Cisco Implementing Secure Converged
Cisco Implementing Secure Converged
Implementing Secure
Converged Wide
Area Networks
Volume 2
Version 1.0
Student Guide
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Corporate Headquarters European Headquarters Americas Headquarters Asia Pacific Headquarters
Cisco Systems, Inc. Cisco Systems International BV Cisco Systems, Inc. Cisco Systems, Inc.
170 West Tasman Drive Haarlerbergpark 170 West Tasman Drive 168 Robinson Road
San Jose, CA 95134-1706 Haarlerbergweg 13-19 San Jose, CA 95134-1706 #28-01 Capital Tower
USA 1101 CH Amsterdam USA Singapore 068912
www.cisco.com The Netherlands www.cisco.com www.cisco.com
Tel: 408 526-4000 www-europe.cisco.com Tel: 408 526-7660 Tel: +65 6317 7777
800 553-NETS (6387) Tel: 31 0 20 357 1000 Fax: 408 527-0883 Fax: +65 6317 7799
Fax: 408 526-4100 Fax: 31 0 20 357 1100
Cisco Systems has more than 200 offices in the following countries and regions. Addresses, phone numbers, and fax numbers are listed on the
Cisco.comWebsiteatwww.cisco.com/go/offices.
Argentina • Australia • Austria • Belgium • Brazil • Bulgaria • Canada • Chile • China PRC • Colombia • Costa Rica • Croatia • Cyprus • Czech Republic •
Denmark • Dubai, UAE • Finland • France • Germany • Greece • Hong Kong SAR • Hungary • India • Indonesia • Ireland
Israel • Italy • Japan • Korea • Luxembourg • Malaysia • Mexico • The Netherlands • New Zealand • Norway • Peru • Philippines
Poland • Portugal • Puerto Rico • Romania • Russia • Saudi Arabia • Scotland • Singapore • Slovakia • Slovenia • South Africa
Spain • Sweden • Switzerland • Taiwan • Thailand • Turkey • Ukraine • United Kingdom • United States • Venezuela • Vietnam • Zimbabwe
© 2006 Cisco Systems, Inc. All rights reserved. CCSP, CCVP, the Cisco Square Bridge logo, Follow Me Browsing, and StackWise are trademarks of
Cisco Systems, Inc.; Changing the Way We Work, Live, Play, and Learn, and iQuick Study are service marks of Cisco Systems, Inc.; and Access
Registrar, Aironet, BPX, Catalyst, CCDA, CCDP, CCIE, CCIP, CCNA, CCNP, Cisco, the Cisco Certified Internetwork Expert logo, Cisco IOS, Cisco Press,
Cisco Systems, Cisco Systems Capital, the Cisco Systems logo, Cisco Unity, Enterprise/Solver, EtherChannel, EtherFast, EtherSwitch, Fast Step, FormShare,
GigaDrive, GigaStack, HomeLink, Internet Quotient, IOS, IP/TV, iQ Expertise, the iQ logo, iQ Net Readiness Scorecard, LightStream, Linksys, MeetingPlace,
MGX, the Networkers logo, Networking Academy, Network Registrar, Packet, PIX, Post-Routing, Pre-Routing, ProConnect, RateMUX, ScriptShare,
SlideCast, SMARTnet, The Fastest Way to Increase Your Internet Quotient, and TransPath are registered trademarks of Cisco Systems, Inc. and/or its affiliates
in the United States and certain other countries.
All other trademarks mentioned in this document or Website are the property of their respective owners. The use of the word partner does not imply a
partnership relationship between Cisco and any other company. (0601R)
DISCLAIMER WARRANTY: THIS CONTENT IS BEING PROVIDED “AS IS.” CISCO MAKES AND YOU RECEIVE NO WARRANTIES IN
CONNECTION WITH THE CONTENT PROVIDED HEREUNDER, EXPRESS, IMPLIED, STATUTORY OR IN ANY OTHER PROVISION OF
THIS CONTENT OR COMMUNICATION BETWEEN CISCO AND YOU. CISCO SPECIFICALLY DISCLAIMS ALL IMPLIED
WARRANTIES, INCLUDING WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR
PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. This learning product may contain early release
content, and while Cisco believes it to be accurate, it falls subject to the disclaimer above.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Table of Contents
Volume 2
Cisco Device Hardening 5-1
Overview 5-1
Module Objectives 5-1
Mitigating Network Attacks 5-3
Overview 5-3
Objectives 5-3
Cisco Self-Defending Network 5-4
Evolution of Cisco Self-Defending Network 5-5
Types of Network Attacks 5-7
Reconnaissance Attacks and Mitigation 5-9
Packet Sniffers 5-10
Packet Sniffer Mitigation 5-11
Port Scans and Ping Sweeps 5-13
Port Scan and Ping Sweep Mitigation 5-14
Internet Information Queries 5-15
Access Attacks and Mitigation 5-16
Password Attacks 5-17
Password Attack Example 5-18
Password Attack Mitigation 5-19
Trust Exploitation 5-20
Trust Exploitation Attack Mitigation 5-21
Port Redirection 5-22
Man-in-the-Middle Attacks 5-23
DoS Attacks and Mitigation 5-24
Distributed DoS Attacks 5-25
Distributed DoS Example 5-26
DoS and Distributed DoS Attack Mitigation 5-27
IP Spoofing in DoS and DDoS 5-28
IP Spoofing Attack Mitigation 5-30
Worm, Virus, and Trojan Horse Attacks and Mitigation 5-32
Virus and Trojan Horse Attack Mitigation 5-33
The Anatomy of a Worm Attack 5-34
Mitigating Worm Attacks 5-35
Application Layer Attacks and Mitigation 5-36
Netcat 5-37
Netcat Example 5-38
Mitigation of Application Layer Attacks 5-39
Management Protocols and Vulnerabilities 5-40
Configuration Management Recommendations 5-41
Management Protocols 5-42
Management Protocol Best Practices 5-44
Determining Vulnerabilities and Threats 5-45
Blue’s Port Scanner and Ethereal 5-47
Microsoft Baseline Security Analyzer 5-48
Summary 5-49
Disabling Unused Cisco Router Network Services and Interfaces 5-51
Overview 5-51
Objectives 5-51
Vulnerable Router Services and Interfaces 5-52
Vulnerable Router Services 5-53
Router Hardening Considerations 5-56
Locking Down Routers with AutoSecure 5-57
AutoSecure Operation Modes 5-58
AutoSecure Functions 5-59
AutoSecure Failure Scenarios 5-60
AutoSecure Process Overview 5-61
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Start and Interface Selection 5-63
Securing Management Plane Services 5-64
Creating Security Banner 5-66
Passwords and AAA 5-67
SSH and Interface-Specific Services 5-68
Forwarding Plane, Verification, and Deployment 5-69
Locking Down Routers with the SDM 5-73
SDM Security Audit Overview 5-74
SDM Security Audit: Main Window 5-75
SDM Security Audit Wizard 5-76
SDM Security Audit Interface Configuration 5-77
SDM Security Audit 5-78
SDM Security Audit: Fix the Security Problems 5-79
SDM Security Audit: Summary 5-80
SDM One-Step Lockdown: Main Window 5-81
SDM One-Step Lockdown Wizard 5-82
Summary 5-84
Securing Cisco Router Installations and Administrative Access 5-85
Overview 5-85
Objectives 5-85
Configuring Router Passwords 5-86
Password Creation Rules 5-87
Initial Configuration Dialog 5-88
Configure the Line-Level Password 5-90
Password Minimum Length Enforcement 5-93
Encrypting Passwords 5-94
Enhanced Username Password Security 5-95
Securing ROMMON 5-97
Setting a Login Failure Rate 5-99
Setting a Login Failure Blocking Period 5-100
Excluding Addresses from Login Blocking 5-102
Setting a Login Delay 5-103
Verifying Login 5-104
Setting Timeouts 5-106
Setting Multiple Privilege Levels 5-107
Configuring Banner Messages 5-110
Configuring Role-Based CLI 5-112
Role-Based CLI Details 5-113
Getting Started with Role-Based CLI 5-114
Configuring CLI Views 5-115
Configuring Superviews 5-117
Role-Based CLI Monitoring 5-118
Role-Based CLI Configuration Example 5-119
Role-Based CLI Verification 5-120
Secure Configuration Files 5-122
Securing Configuration Files 5-124
Cisco IOS Resilient Configuration Feature Verification 5-125
Secure Configuration Files Recovery 5-126
Summary 5-127
Mitigating Threats and Attacks with Access Lists 5-129
Overview 5-129
Objectives 5-129
Cisco ACLs 5-130
Identifying ACLs 5-132
Guidelines for Developing ACLs 5-134
Applying ACLs to Router Interfaces 5-136
Using Traffic Filtering with ACLs 5-137
Filtering Network Traffic to Mitigate Threats 5-139
IP Address Spoofing Mitigation: Outbound 5-140
© 2006 Cisco Systems, Inc. Implementing Secure Converged Wide Area Networks (ISCW) v1.0 ii
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
DoS TCP SYN Attack Mitigation: Blocking External Access 5-141
DoS TCP SYN Attack Mitigation: Using TCP Intercept 5-142
DoS Smurf Attack Mitigation 5-143
Filtering Inbound ICMP Messages 5-144
Filtering Outbound ICMP Messages 5-145
Filtering UDP Traceroute Messages 5-146
Mitigating Distributed DoS with ACLs 5-147
Mitigate Distributed DoS Using Martian Filters 5-149
Distributed DoS Attack Mitigation: TRIN00 5-150
Distributed DoS Attack Mitigation: Stacheldraht 5-151
Distributed DoS Attack Mitigation: Trinity v3 5-152
Distributed DoS Attack Mitigation: SubSeven 5-153
Combining Access Functions 5-154
Caveats 5-158
Summary 5-160
Securing Management and Reporting Features 5-161
Overview 5-161
Objectives 5-161
Secure Management and Reporting Planning Considerations 5-162
Secure Management and Reporting Architecture 5-164
Information Paths 5-166
In-Band Management Considerations 5-167
Secure Management and Reporting Guidelines 5-168
Configuring an SSH Server for Secure Management and Reporting 5-170
Using Syslog Logging for Network Security 5-172
Syslog Systems 5-173
Cisco Log Severity Levels 5-174
Log Message Format 5-175
Configuring Syslog Logging 5-176
Example: Syslog Implementation 5-179
SNMP Version 3 5-180
Community Strings 5-181
SNMP Security Models and Levels 5-182
SNMPv3 Architecture 5-183
SNMPv3 Operational Model 5-184
SNMPv3 Features and Benefits 5-185
Configuring an SNMP Managed Node 5-186
Configuring the SNMP-Server Engine ID 5-187
Configuring the SNMP-Server Group Names 5-189
Configuring the SNMP-Server Users 5-191
Configuring the SNMP-Server Hosts 5-193
SNMPv3 Configuration Example 5-196
Configuring NTP Client 5-197
Configuring NTP Authentication 5-199
Configuring NTP Associations 5-200
Configuring Additional NTP Options 5-202
Configuring NTP Server 5-204
Configuring NTP Server 5-205
NTP Configuration Example 5-207
Summary 5-208
Configuring AAA on Cisco Routers 5-209
Overview 5-209
Objectives 5-209
Introduction to AAA 5-210
Implementing AAA 5-212
Router Access Modes 5-213
AAA Protocols: RADIUS and TACACS+ 5-214
RADIUS Authentication and Authorization 5-215
RADIUS Messages 5-216
Copyright © 2005, Cisco Systems, Inc. Cisco IP Telephony Troubleshooting (IPTT) v4.0 iii
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
RADIUS Attributes 5-217
RADIUS Features 5-218
TACACS+ Authentication 5-219
TACACS+ Network Authorization 5-221
TACACS+ Command Authorization 5-223
TACACS+ Attributes and Features 5-224
Configuring the AAA Server 5-226
Configure AAA Login Authentication on Cisco Routers Using CLI 5-228
Character Mode Login Example 5-230
Configure AAA Login Authentication on Cisco Routers Using SDM 5-231
Confirming the AAA Activation 5-232
Defining AAA Servers 5-233
Creating a Login Authentication Policy 5-235
Configuring a Login Authentication Policy 5-236
Creating an EXEC Authorization Policy 5-237
Configuring an EXEC Authorization Policy 5-238
Creating Local User Accounts 5-239
Configuring VTY Line Parameters 5-240
Applying Authentication Policy to VTY Lines 5-241
Applying Authorization Policy to VTY Lines 5-242
Verifying AAA Login Authentication Commands 5-243
Troubleshoot AAA Login Authentication on Cisco Routers 5-244
Troubleshoot AAA Authentication Example 5-245
AAA Authorization Commands 5-246
Authorization Example 5-247
Troubleshooting Authorization 5-248
AAA Accounting Commands 5-251
AAA Accounting Example 5-253
Troubleshooting Accounting 5-255
Summary 5-256
References 5-256
Module Summary 5-257
Module Self-Check 5-258
Module Self-Check Answer Key 5-261
Cisco IOS Threat Defense Features 6-1
Overview 6-1
Module Objectives 6-1
Introducing the Cisco IOS Firewall 6-3
Overview 6-3
Objectives 6-3
Layered Defense Strategy 6-4
Layered Defense Features 6-5
Multiple DMZs 6-6
Modern DMZ Design 6-7
Firewall Technologies 6-8
Packet Filtering 6-10
Packet Filtering Example 6-11
Application Layer Gateway 6-12
ALG Firewall Device 6-13
Stateful Packet Filtering 6-14
Stateful Firewall Operation 6-16
Stateful Packet FilterHandling of Different Protocols 6-17
Introducing the Cisco IOS Firewall Feature Set 6-19
Cisco IOS Firewall 6-21
Cisco IOS Firewall Authentication Proxy 6-22
Cisco IOS Firewall IPS 6-23
Cisco IOS Firewall Functions 6-25
Cisco IOS Firewall TCP Handling 6-26
© 2006 Cisco Systems, Inc. Implementing Secure Converged Wide Area Networks (ISCW) v1.0 iv
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Cisco IOS Firewall UDP Handling 6-27
Cisco IOS Firewall Process 6-28
Supported Protocols 6-30
Alerts and Audit Trails 6-35
Summary 6-36
Implementing Cisco IOS Firewalls 6-37
Overview 6-37
Objectives 6-37
Configuring Cisco IOS Firewall from the CLI 6-38
Set Audit Trails and Alerts 6-40
Inspection Rules for Application Protocols 6-41
Apply an Inspection Rule to an Interface 6-43
Guidelines for Applying Inspection Rules and ACLs to Interfaces 6-44
Example: Two-Interface Firewall 6-45
Example: Three-Interface Firewall 6-46
Verifying Cisco IOS Firewall 6-47
Troubleshooting Cisco IOS Firewall 6-48
Basic and Advanced Firewall Wizards 6-49
Configuring a Basic Firewall 6-50
Basic Firewall Interface Configuration 6-51
Basic Firewall Configuration Summary and Deployment 6-52
Reviewing the Basic Firewall for the Originating Traffic 6-53
Reviewing the Basic Firewall for the Returning Traffic 6-54
Resulting Basic Firewall Inspection Rule Configuration 6-55
Resulting Basic Firewall ACL Configuration 6-56
Resulting Basic Firewall Interface Configuration 6-57
Configuring Interfaces on an Advanced Firewall 6-58
Advanced Firewall Interface Configuration 6-59
Configuring a DMZ on an Advanced Firewall 6-60
Advanced Firewall DMZ Service Configuration: TCP 6-61
Advanced Firewall DMZ Service Configuration: UDP 6-62
Advanced Firewall Security Configuration 6-64
Advanced Firewall Protocols and Applications 6-65
Advanced Firewall Inspection Parameters 6-68
Advanced Firewall Security Policy Selection 6-69
Complete the Configuration 6-70
Resulting Advanced Firewall Inspection Rule Configuration 6-71
Resulting Advanced Firewall ACL Configuration 6-72
Resulting Advanced Firewall Interface Configuration 6-73
Viewing Firewall Activity 6-74
Viewing Firewall Log 6-75
Summary 6-76
References 6-76
Introducing Cisco IOS IPS 6-77
Overview 6-77
Objectives 6-77
Introducing Cisco IOS IDS and IPS 6-78
Intrusion Detection System 6-78
Intrusion Protection System 6-79
Combining IDS and IPS 6-80
Types of IDS and IPS Systems 6-81
Signature-Based IDS and IPS 6-83
Policy-Based IDS and IPS 6-84
Anomaly-Based IDS and IPS 6-85
Honeypot 6-86
Network-Based and Host-Based IPS 6-87
Network-Based Versus Host-Based IPS 6-88
NIPS Features 6-89
NIDS and NIPS Deployment 6-90
Copyright © 2005, Cisco Systems, Inc. Cisco IP Telephony Troubleshooting (IPTT) v4.0 v
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
IDS and IPS Signatures 6-91
Exploit Signatures 6-93
Signature Examples 6-95
Cisco IOS IPS Signature Definition Files 6-96
Cisco IOS IPS Alarms 6-97
Cisco IOS IPS Alarm Considerations 6-98
Summary 6-99
Configuring Cisco IOS IPS 6-101
Overview 6-101
Objectives 6-101
Configuring Cisco IOS IPS 6-102
Cisco IOS IPS Configuration Steps 6-102
Basic IOS IPS Configuration 6-103
Enhanced Cisco IOS IPS Configuration 6-104
Verifying IOS IPS Configuration 6-105
Cisco IOS IPS SDM Tasks 6-106
Selecting Interfaces and Configuring SDF Locations 6-107
IPS Policies Wizard Overview 6-108
Identifying Interfaces and Flow Direction 6-109
Selecting SDF Location 6-110
Viewing the IPS Policy Summary and Delivering the Configuration to the Router 6-113
Verifying IPS Deployment 6-114
Configuring IPS Policies and Global Settings 6-115
Global Settings 6-116
Viewing SDEE Messages 6-117
Viewing SDEE Status Messages 6-118
Viewing SDEE Alerts 6-119
Tuning Signatures 6-120
Editing a Signature 6-121
Disabling a Signature Group 6-122
Verifying the Tuned Signatures 6-123
Summary 6-124
Module Summary 6-125
Module Self-Check 6-126
Module Self-Check Answer Key 6-128
© 2006 Cisco Systems, Inc. Implementing Secure Converged Wide Area Networks (ISCW) v1.0 vi
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Module 5
Overview
Cisco IOS software has a full set of security features that you can implement to provide
security for the network. This module describes the best practices for securing router
administrative access using mechanisms such as password security features, failed login
attempt handling, and role-based CLI. You will learn how to mitigate attacks using access lists.
The module describes how to design and implement a secure management system including
secure protocols such as Secure Shell (SSH), Simple Network Management Protocol version 3
(SNMPv3), and authenticated Network Time Protocol (NTP). The module discusses the most
ubiquitous AAA protocols RADIUS and TACACS+, and explains the differences between
them.
Module Objectives
Upon completing this module, you will be able to describe and configure Cisco device
hardening. This ability includes being able to meet these objectives:
Explain the strategies used to mitigate network attacks
Describe the techniques used to harden a Cisco router
Secure Cisco router installations and administrative access using passwords
Mitigate threats and attacks to Cisco perimeter routers by configuring and applying ACLs
to filter traffic
Explain the procedures to securely implement management and reporting features of
syslog, SSH, SNMPv3, and NTP
Explain the procedures to configure AAA implementation on a Cisco router using both
SDM and CLI
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
5-2 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Lesson 1
Objectives
Upon completing this lesson, you will be able to explain the strategies that are used to mitigate
network attacks. This ability includes being able to meet these objectives:
Describe the Cisco Self-Defending Network strategy
List the types of attacks that enterprise networks must defend against
Describe how to mitigate reconnaissance attacks including packet sniffers, port scans, ping
sweeps, and Internet information queries
Describe how to mitigate access attacks including password attacks, trust exploitation,
buffer overflow, port redirection, and man-in-the-middle attacks
Describe how to mitigate DoS attacks including IP spoofing and DDoS
Describe how to mitigate worm, virus, and Trojan horse attacks
Describe how to mitigate application layer attacks
Describe vulnerabilities in configuration management protocols, and recommendations for
mitigating these vulnerabilities
Describe how to use open source tools to discover network vulnerabilities and threats
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Cisco Self-Defending Network
This topic describes the Cisco Self-Defending Network strategy.
The Cisco Self-Defending Network strategy describes the Cisco vision for security systems,
and helps customers more effectively manage and mitigate risks posed to their networked
business systems and applications.
Cisco Self-Defending Network is the Cisco response to the increasing challenge of new threats
and vulnerabilities that result from constantly evolving technologies and system developments.
It provides a comprehensive approach to secure enterprise networks.
The Cisco Self-Defending Network strategy consists of three systems, or pillars, each with a
specific purpose. By using Cisco integrated security solutions, customers can leverage their
existing infrastructure to address potential threats to their network. While security risks are
inherent in any network, customers can reduce their exposure and minimize these risks by
deploying three categories of overlapping and complementary security solutions:
Secure connectivity: Provides secure and scalable network connectivity, incorporating
multiple types of traffic.
Threat defense: Prevents and responds to network attacks and threats using network
services.
Trust and identity: Allows the network to intelligently protect endpoints using
technologies such as authentication, authorization, and accounting (AAA), Cisco Secure
Access Control Server (ACS), Network Admission Control (NAC), identity services, and
802.1x.
The Cisco Self-Defending Network is based on a foundation of security integrated throughout
the network, with constant innovations in products and technologies and crafted into system-
level solutions. Such solutions incorporate all aspects of the network as well as the
sophisticated services needed to make it work. In addition, Cisco is working with major
industry partners to ensure the completeness of the strategy.
5-4 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Evolution of Cisco Self-Defending Network
Most customers will not adopt all of the components of the Cisco Self-Defending Network at
one time, because it may be difficult to overhaul all of the required subsystems at once without
disrupting the integrity of the IT services. Some customers may hesitate to turn over security
controls to an automated system until they are confident that the system will operate
dependably.
The figure illustrates the evolution of the Cisco Self-Defending Network strategy. While
individual security products serve as good incubators for deploying advanced security
technologies, they are not by themselves integrated throughout the network fabric. Building
network security based solely on single-purpose appliances is no longer practical.
The self-defending network is developed in three phases:
Phase 1—Integrated security: The first phase of the Cisco Self-Defending Network
security strategy focuses on the need for integrated security, blending IP and security
technologies. This phase aims to distribute security technologies throughout every segment
of the network to enable every network element as a point of defense.
Phase 2—Collaborative security systems: The next phase introduces the NAC industry
initiative. NAC is a set of technologies and solutions built on an industry initiative led by
Cisco. NAC uses the network infrastructure to enforce security policy compliance on all
devices seeking to access network computing resources, thereby limiting damage from
emerging security threats such as viruses, worms, and spyware. Customers using NAC can
allow network access only to compliant and trusted endpoint devices (PCs, servers, and
PDAs, for example) and can restrict the access of noncompliant devices. This initiative is
the first industry-wide effort that increases the network ability to identify, prevent, and
adapt to security threats. This phase aims to enable the security technologies integrated
throughout the network to operate as a coordinated system. Network-wide collaboration
among the services and devices throughout the network is used to defeat attacks.
5-6 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Types of Network Attacks
This topic describes the types of attacks that enterprise networks must defend against.
An attack against an enterprise network occurs in several stages. In the initial stages, the
attacker may have only limited information about the target. One of the primary attacker
objectives is to gather intelligence about the target vulnerabilities. The process of unauthorized
collection of information about the network weaknesses is called a reconnaissance attack.
Other attacks that typically do not require in-depth knowledge about the target include access
attacks, as well as denial of service (DoS) and distributed DoS attacks.
Access attacks exploit known vulnerabilities in authentication services, FTP services, and web
services to gain entry to web accounts, confidential databases, and other sensitive information.
DoS attacks are one of the most publicized forms of attack, and are also among the most
difficult to completely eliminate. They can employ various techniques, such as overwhelming
network resources, to render systems unavailable or reduce their functionality.
A DoS attack on a server sends extremely large volumes of requests over a network or the
Internet. These large volumes of requests cause the attacked server to dramatically slow down,
resulting in the attacked server becoming unavailable for legitimate access and use.
Distributed DoS attacks are the “next generation” of DoS attacks on the Internet. Victims of
distributed DoS attacks experience packet flooding from many different sources (possibly
spoofed IP source addresses) that overwhelm the network connectivity. In the past, the typical
DoS attack involved a single attempt to flood a target host with packets. With distributed DoS
tools, an attacker can conduct the same attack using thousands of systems.
Once the attacker has gathered information about the target network or even has direct access to
the resources as an inside user, a range of other attack types can be launched against the
enterprise systems.
Worms, viruses, and Trojan horses are examples of malicious code that can be used to
compromise the hosts in the enterprise network. They can either be injected by an inside user or
they can be used to exploit a vulnerability in the defense to compromise a protected system.
Application layer attacks are performed on the highest OSI layer in the information flow. The
attacker attempts to compromise the protected system by manipulating the application layer
data.
Management protocols are needed for system management. Like most other components,
management protocols have vulnerabilities that can be exploited by an attacker to gain access
to network resources.
5-8 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Reconnaissance Attacks and Mitigation
This topic describes how to mitigate reconnaissance attacks, including packet sniffers, port
scans, ping sweeps, and Internet information queries.
Packet Sniffers
A packet sniffer is a software application that uses a network adapter card in promiscuous mode
to capture all network packets that are sent across a LAN. Packet sniffers can only work in the
same collision domain. Promiscuous mode is a mode in which the network adapter card sends
all packets received on the physical network wire to an application for processing.
Plaintext is information sent across the network that is not encrypted. Some network
applications distribute network packets in plaintext. Because the network packets are not
encrypted, they can be processed and understood by any application that can pick them off the
network and process them.
A network protocol specifies the protocol operations and packet format. Because the
specifications for network protocols, such as TCP/IP, are widely published, a third party can
easily interpret the network packets and develop a packet sniffer. Numerous freeware and
shareware packet sniffers are available that do not require the user to understand anything about
the underlying protocols.
Note In an Ethernet LAN, promiscuous mode is a mode of operation in which every data frame
transmitted can be received and read by a network adapter. Promiscuous mode is the
opposite of nonpromiscuous mode.
5-10 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Packet Sniffer Mitigation
This section describes packet sniffer mitigation.
The techniques and tools that can be used to mitigate packet sniffer attacks include:
Authentication
Switched infrastructure
Antisniffer tools
Cryptography
Authentication
Using strong authentication is a first option for defense against packet sniffers. Strong
authentication can be broadly defined as a method of authenticating users that cannot easily be
circumvented. An example of common strong authentication is One Time Password (OTP).
OTP is a type of two-factor authentication. Two-factor authentication involves using something
you have combined with something you know. Automated teller machines (ATMs) use two-
factor authentication. A customer needs both an ATM card and a PIN to make transactions.
With OTPs, you need a PIN and your token card to authenticate to a device or software
application. A token card is a hardware or software device that generates new, seemingly
random, passwords at specified intervals, usually 60 seconds. A user combines that password
with a PIN to create a unique password that works only for one instance of authentication. If a
hacker learns that password by using a packet sniffer, the information is useless because the
password has already expired. This mitigation technique is effective only against a sniffer
implementation that is designed to grab passwords. Sniffers deployed to learn sensitive
information (such as e-mail messages) will still be effective.
Antisniffer Tools
You can use software and hardware designed to detect the use of sniffers on a network. Such
software and hardware does not completely eliminate the threat, but like many network security
tools, they are part of the overall mitigation system. Antisniffer tools detect changes in the
response time of hosts to determine whether the hosts are processing more traffic than their
own traffic loads would indicate. One such network security software tool, called AntiSniff, is
available from Security Software Technologies.
Switched Infrastructure
This technology, very common today, counters the use of packet sniffers in the network
environment. If an entire organization deploys switched Ethernet, hackers can gain access only
to the traffic that flows on the specific port to which they connect. A switched infrastructure
obviously does not eliminate the threat of packet sniffers, but it can greatly reduce their
effectiveness.
5-12 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Port Scans and Ping Sweeps
This section describes the reconnaissance attacks using port scans and ping sweeps.
As legitimate tools, port scan and ping sweep applications run a series of tests against hosts and
devices to identify vulnerable services. The information is gathered by examining IP addressing
and port or banner data from both TCP and User Datagram Protocol (UDP) ports.
In an illegitimate situation, a port scan can be a series of messages sent by someone attempting
to break into a computer to learn which computer network services the computer provides.
Each service is associated with a “well-known” port number. Port scanning can be an
automated scan of a range of TCP or UDP port numbers on a host to detect listening services.
Port scanning, a favorite computer hacker approach, provides information to the assailant as to
where to probe for weaknesses. Essentially, a port scan consists of sending a message to each
port, one at a time. The kind of response received indicates whether the port is used and can
therefore be probed for weakness.
A ping sweep, or Internet Control Message Protocol (ICMP) sweep, is a basic network
scanning technique used to determine which range of IP addresses map to live hosts
(computers). Whereas a single ping will tell you whether one specified host computer exists on
the network, a ping sweep consists of ICMP echo requests sent to multiple hosts. If a given
address is live, it will return an ICMP echo reply. Ping sweeps are among the older and slower
methods used to scan a network. As an attack tool, a ping sweep sends ICMP (RFC 792) echo
requests, or “pings,” to a range of IP addresses, with the goal of finding hosts that can be
probed for vulnerabilities.
Ping sweeps can be stopped if ICMP echo and echo-reply are turned off on edge routers.
However, network diagnostic data is lost. Port scans can easily be run without full ping sweeps;
they simply take longer because they need to scan IP addresses that might not be live.
Network-based IPS and host-based IPS (HIPS) can usually notify you when a reconnaissance
attack is under way. This warning allows you to better prepare for the coming attack or to
notify the Internet service provider (ISP) that is hosting the system launching the
reconnaissance probe. ISPs compare incoming traffic to the intrusion detection system (IDS) or
the IPS signatures in their database. Signatures are characteristics of particular traffic patterns.
A signature, such as “several packets to different destination ports from the same source
address within a short period of time,” can be used to detect port scans. Another such signature
could be “SYN to a non-listening port.”
A stealth scan is more difficult to detect, and many intrusion detection and prevention systems
allow it to go unnoticed. Discovering stealth scans requires kernel-level work.
5-14 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Internet Information Queries
The figure shows how existing Internet tools can be used for network reconnaissance.
Domain Name System (DNS) queries can reveal information such as who owns a particular
domain and what addresses have been assigned to that domain. Ping sweeps of addresses
revealed by DNS queries can present a picture of the live hosts in a particular environment.
After such a list is generated, port scanning tools can cycle through all well-known ports to
provide a complete list of all services running on the hosts discovered by the ping sweep.
Hackers can examine the characteristics of the applications that are running on the hosts, which
can lead to specific information that is useful when the hacker attempts to compromise that
service.
IP address queries can reveal information such as who owns a particular IP address or range of
addresses, and which domain is associated with the addresses.
Access Attacks
Access attacks exploit known vulnerabilities in authentication services, FTP services, and web
services to gain entry to web accounts, confidential databases, and other sensitive information.
Access attacks can be performed in different ways. These are the most typical categories of
access attacks:
Password attacks: An attacker attempts to guess system passwords. A common example is
a dictionary attack.
Trust exploitation: An attacker uses privileges granted to a system in an unauthorized
way, possibly leading to compromise of the target.
Port redirection: A compromised system is used as a jump-off point for attacks against
other targets. An intrusion tool is installed on the compromised system for session
redirection.
Man-in-the-middle attacks: Attackers place themselves in the middle of communications
between two legitimate entities, to read or even modify data exchanged between the two
parties.
Buffer overflow: A program writes data beyond the allocated end of a buffer in memory.
Buffer overflows usually arise as a consequence of a bug and the improper use of
languages such as C or C++ that are not “memory-safe.” One consequence of the overflow
is that valid data can be overwritten. Buffer overflows are also a commonly exploited
computer security risk—program control data often sits in memory areas adjacent to data
buffers, and by means of a buffer overflow condition, the computer can be made to execute
arbitrary and potentially malicious code.
5-16 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Password Attacks
Password attacks can be implemented using several methods, including brute-force attacks,
Trojan horse programs, IP spoofing, and packet sniffers. Although packet sniffers and IP
spoofing can yield user accounts and passwords, password attacks usually refer to repeated
attempts to identify a user account, password, or both. These repeated attempts are called brute-
force attacks.
Password Attacks
Hackers implement
password attacks using
the following:
• Brute-force attacks
• Trojan horse programs
• IP spoofing
• Packet sniffers
A brute-force attack is often performed using a program that runs across the network and
attempts to log in to a shared resource, such as a server. When an attacker gains access to a
resource, the attacker has the same access rights as the user whose account has been
compromised. If this account has sufficient privileges, the attacker can create a back door for
future access, without concern for any status and password changes to the compromised user
account.
• L0phtCrack takes
the hashes of
passwords and
generates the
plaintext
passwords from
them.
• Passwords are
compromised
using one of two
methods:
– Dictionary
cracking
– Brute-force
computation
A big security risk is the fact that passwords are stored as plaintext. To overcome this risk,
passwords should be encrypted. On most systems, passwords are run through an encryption
algorithm to generate a one-way hash. A one-way hash is a string of characters that cannot be
reversed into its original text. The hash is not the encrypted password, but rather a result of the
algorithm. The strength of the hash lies in the fact that the hash value can only be recreated
using the original user and password information, and that it is impossible to retrieve the
original information from the hash. This strength makes hashes perfect for encoding passwords
for storage. In granting authorization, the hashes are calculated and compared, rather than the
plain password.
During the login process, you supply an account and password, and the algorithm generates a
one-way hash. This hash is compared to the hash stored on the system. If they are the same, it is
assumed that the proper password was supplied.
L0phtCrack is a Windows NT password-auditing tool used to compute Windows NT user
passwords from the cryptographic hashes that are stored in the system registry. L0phtCrack
computes the password from a variety of sources using a variety of methods. The end result is a
state of the art tool for recovering passwords.
5-18 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Password Attack Mitigation
This section describes the mitigation of password attacks.
Trust Exploitation
An example of when a trust exploitation can take place is when a perimeter network is
connected to a corporate network. These network segments often house DNS, Simple Mail
Transfer Protocol (SMTP), and HTTP servers. Because these servers all reside on the same
segment, a compromise of one system can lead to the compromise of other systems if those
other systems in turn trust systems attached to the same network.
Another example of trust exploitation is a Demilitarized Zone (DMZ) host that has a trust
relationship with an inside host connected to the inside firewall interface. The inside host trusts
the DMZ host. When the DMZ host is compromised, the attacker can leverage that trust
relationship to attack the inside host.
Note A DMZ is a dedicated part of a network designed to secure communications between the
inside and outside network.
5-20 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Trust Exploitation Attack Mitigation
You can mitigate trust exploitation-based attacks through tight constraints on trust levels within
a network.
Systems on the inside of a firewall should never absolutely trust systems on the outside of a
firewall. Such trust should be limited to specific protocols and, where possible, should be
validated by something other than an IP address.
In the example above, the hacker attached to the Internet already exploited some vulnerability
of the DMZ host, which is connected to the DMZ interface of the firewall. The hacker controls
the entire DMZ host. His next goal is to compromise the inside host that is connected to the
inside (trusted) interface of the firewall. To attack the inside host from the DMZ host, the
hacker needs to find the protocols that are permitted from the DMZ to the inside interface. Then
the attacker would search for vulnerability on the inside host and exploit it. If the firewall is
configured to allow only minimum or no connectivity from the DMZ to the inside, this attack
can be stopped.
Port Redirection
The figure shows a firewall with three interfaces and a host on each interface. The host on the
outside can reach the host on the public services segment (host A), but not the host on the
inside (host B). The host on the public services segment can reach the host on both the outside
and the inside. If hackers are able to compromise the public services segment host, they can
install software to redirect traffic from the outside host directly to the inside host. Though
neither communication violates the rules implemented in the firewall, the outside host has now
achieved connectivity to the inside host through the port redirection process on the public
services host. An example of an application that provides that type of access is Netcat.
Port redirection can be mitigated primarily through the use of proper trust models that are
network-specific. Assuming a system is under attack, a HIPS can help detect a hacker and
prevent installation of such utilities on a host.
5-22 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Man-in-the-Middle Attacks
Man-in-the-middle attacks have these purposes:
Theft of information
Hijacking of an ongoing session to gain access to your internal network resources
Traffic analysis to obtain information about your network and its users
DoS
Corruption of transmitted data
Introduction of new information into network sessions
Man-in-the-Middle Attacks
and Their Mitigation
An example of a man-in-the-middle attack is when someone working for your ISP gains access
to all network packets transferred between your network and any other network. Man-in-the-
middle attackers can make sure not to disrupt the traffic and thus set off alarms. Instead, they
use their position to stealthily extract information from the network.
Man-in-the-middle attack mitigation is achieved, as shown in the figure, by encrypting traffic in
a VPN tunnel. Encryption allows the hacker to see only cipher text.
A DoS attack tries to overload system resources, crashing the applications or processes by
executing exploits or a combination of exploits. DoS attacks are the most publicized form of
attack, and are also among the most difficult to completely eliminate. Even within the hacker
community, DoS attacks are regarded as trivial and considered bad form because they require
so little effort to execute. Nevertheless, because of their ease of implementation and potentially
significant damage, DoS attacks deserve special attention from security administrators. DoS
attacks can target many various vulnerabilities. A common type of DoS attack is distributed
DoS using a spoofed source IP address.
5-24 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Distributed DoS Attacks
A distributed DoS attack and its simpler version, a DoS attack on a server, send an extremely
large number of requests over a network or the Internet. These many requests cause the target
server to dramatically slow down. Consequently, the attacked server becomes unavailable for
legitimate access and use.
DoS and distributed DoS attacks are different from most other attacks because they are not
targeted at gaining access to your network or the information on your network. These attacks
focus on making a service unavailable for normal use. This result is typically accomplished by
exhausting some resource limitation on the network or within an operating system or
application. These attacks require little effort to execute because they typically take advantage
of protocol weaknesses or because the attacks are carried out using traffic that would normally
be allowed into a network. DoS and distributed DoS attacks are among the most difficult to
completely eliminate because of the way they use protocol weaknesses and native or legitimate
traffic to attack a network.
For all known DoS and distributed DoS attacks, there are software fixes that you can install to
limit the damage caused by the attacks. However, as with viruses, hackers are constantly
developing new DoS and distributed DoS attacks.
In the figure, the hacker uses a terminal to scan for systems to hack. After handler systems are
accessed, the hacker installs software on these systems. This software attempts to scan for,
compromise, and infect agent systems. When the agent systems are accessed, the hacker then
loads remote control attack software to carry out the distributed DoS attack.
5-26 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
DoS and Distributed DoS Attack Mitigation
When attacks involve specific network server applications, such as an HTTP server or an FTP
server, the attacker focuses on acquiring and keeping all the available connections supported by
that server open. This strategy effectively locks out valid users of the server or service.
DoS attacks can also be implemented using common Internet protocols, such as TCP and
ICMP. For example, “Ping of Death” exploits limitations in the IP protocol. While most DoS
attacks exploit a weakness in the overall architecture of the system being attacked rather than a
software bug or security hole, some attacks compromise the performance of your network by
flooding the network with undesired, and often useless, network packets and by providing false
information about the status of network resources.
The threat of DoS attacks can be reduced through these three methods:
Anti-spoof features: Proper configuration of anti-spoof features on your routers and
firewalls can reduce your risk. These features include an appropriate filtering with access
lists, unicast reverse path forwarding that looks up the routing table to identify spoofed
packets, disabling of source route options, and others.
Anti-DoS features: Proper configuration of anti-DoS features on routers and firewalls can
help limit the effectiveness of an attack. These features often involve limits on the amount
of half-open TCP connections that a system allows at any given time. This method is also
known as SYN-flooding prevention, and can be configured on the router either by limiting
the overall number of half-open TCP sessions that can go through the router, by limiting
the number of half-open sessions per minute, or limiting the number of half-open sessions
destined to a specific server.
Traffic rate limiting: An organization can implement traffic rate limiting with its ISP.
This type of filtering limits the amount of nonessential traffic that crosses network
segments at a certain rate. A common example is to limit the amount of ICMP traffic
allowed into a network because it is used only for diagnostic purposes. ICMP-based
distributed DoS attacks are common.
Routers determine the best route between distant computers by examining the destination
address. The originating address is ignored by routers. However, the destination machine uses
the originating address when it responds back to the source. In a spoofing attack, the intruder
sends messages to a computer indicating that the message has come from a trusted system. For
example, an attacker outside your network pretends to be a trusted computer, either by using an
IP address that is within the range of IP addresses for your network, or by using an authorized
external IP address that your network trusts and provides specified resource access to. To be
successful, the intruder must first determine the IP address of a trusted system, and then modify
the packet headers so that it appears that the packets are coming from the trusted system. The
goal of the attack is to establish a connection that allows the attacker to gain root access to the
host and to create a backdoor entry path into the target system.
Normally, an IP spoofing attack is limited to the injection of data or commands into an existing
stream of data passed between a client and server application or a peer-to-peer network
connection. To enable bidirectional communication, the attacker must change all routing tables
to point to the spoofed IP address. Another approach the attacker could take is to simply not
worry about receiving any response from the applications. For example, if an attacker is
attempting to get a system to mail a sensitive file, application responses are unimportant.
If an attacker manages to change the routing tables to divert network packets to the spoofed IP
address, the attacker can receive all network packets that are addressed to the spoofed address
and reply just as any trusted user. Like packet sniffers, IP spoofing is not restricted to people
who are external to the network.
5-28 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
IP spoofing can also provide access to user accounts and passwords, or it can be used in other
ways. For example, an attacker can emulate one of your internal users in ways that prove
embarrassing for your organization. The attacker could send e-mail messages to business
partners that appear to have originated from someone within your organization. Such attacks
are easier when an attacker has a user account and password, but they are also possible when
simple spoofing attacks are combined with knowledge of messaging protocols.
Distributed DoS attacks are often carried out using a spoofed source IP address.
Encryption
Another possible way to prevent IP spoofing is to encrypt all network traffic to avoid source
and destination hosts from being compromised.
5-30 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Note RCF 3704 covers ingress filtering for multihomed networks. It updates RFC 2827.
Note RFC 2827 defines filters to drop packets coming from source addresses within 0.0.0.0/8,
10.0.0.0/8, 127.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 224.0.0.0/4, or 240.0.0.0/4. This
source address is a so-called "Martian Address.“
Additional Authentication
The most effective method for mitigating the threat of IP spoofing is the same as the most
effective method for mitigating the threat of packet sniffers—eliminate its effectiveness. IP
spoofing can function correctly only when devices use IP address-based authentication;
therefore, if you use additional authentication methods, IP spoofing attacks are irrelevant.
Cryptographic authentication is the best form of additional authentication. However, when
cryptographic authentication is not possible, strong two-factor authentication using OTPs can
also be effective.
Viruses are malicious software programs that are attached to other programs and which execute
a particular unwanted function on a user workstation. A virus propagates itself by infecting
other programs on the same computer. Viruses can do serious damage, such as erasing files or
erasing an entire disk. They can also be a simple annoyance, such as popping up a window that
says “Ha, ha, you are infected.” Viruses cannot spread to a new computer without human
assistance, for example, opening an infected file on a removable media such as an e-mail
attachment, or through file sharing.
A worm executes arbitrary code and installs copies of itself in the memory of the infected
computer. It can then infect other hosts from the infected computer. Like a virus, a worm is also
a program that propagates itself. Unlike a virus, a worm can spread itself automatically over the
network from one computer to the next. Worms are not clever or evil, they just take advantage
of automatic file sending and receiving features found on many computers.
Trojan horse is a general term, referring to programs that appear desirable, but actually contain
something harmful. For example, a downloaded game could erase files. The contents could also
hold a virus or a worm.
A Trojan horse can attack on three levels. A virus known as the “Love Bug” is an example of a
Trojan horse because it pretended to be a love letter when it actually carried a harmful program.
The Love Bug was a virus because it infected all image files on the attacked disk, turning them
into new Trojans. Finally, the Love Bug was a worm because it propagated itself over the
Internet by hiding in the Trojan horses that it sent out using addresses in the attacked e-mail
address book.
5-32 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Virus and Trojan Horse Attack Mitigation
Viruses and Trojan horse attacks can be contained through the effective use of antivirus
software at the user level and potentially at the network level.
Antivirus software can detect most viruses and many Trojan horse applications and prevent
them from spreading in the network. Keeping up-to-date with the latest developments in these
sorts of attacks can also lead to a more effective posture against these attacks. As new virus or
Trojan horse applications are released, enterprises need to keep up-to-date with the latest
antivirus software and application versions and patches. Deploying host-based intrusion
prevention systems, such as the Cisco Security Agent (CSA), provides a very effective defense-
in-depth method to prevent attacks against the hosts.
1. The enabling
vulnerability
2. Propagation
mechanism
3. Payload
Typically, worms are self-contained programs that attack a system and try to exploit
vulnerabilities in the target. Upon successful exploitation of the vulnerability, the worm copies
its program from the attacking host to the newly exploited system to begin the cycle again. A
virus normally requires a path to carry the virus code from one system to another. The vector
can be a word-processing document, an e-mail message, or an executable program. The key
element that distinguishes a computer worm from a computer virus is that human interaction is
required to facilitate the spread of a virus.
5-34 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Mitigating Worm Attacks
Worm attack mitigation requires diligence on the part of system and network administration
staff. Coordination between system administration, network engineering, and security
operations personnel is critical in responding effectively to a worm incident.
5-36 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Netcat
Netcat is a featured networking utility that reads and writes data across network connections
using the TCP/IP protocol.
Netcat
#nc -h
connect to somewhere: nc [-options] hostname port[s] [ports] ...
listen for inbound: nc -l -p port [-options] [hostname] [port]
options:
-g gateway source-routing hop point[s], up to 8
-G num source-routing pointer: 4, 8, 12, ...
-i secs delay interval for lines sent, ports scanned
-l listen mode, for inbound connects
-n numeric-only IP addresses, no DNS
-o file hex dump of traffic
-p port local port number
-r randomize local and remote ports
-s addr local source address
-u UDP mode
-v verbose [use twice to be more verbose]
port numbers can be individual or ranges: lo-hi [inclusive]
Netcat is designed to be a reliable “back-end” tool that can be used directly or can easily be
driven by other programs and scripts. At the same time, Netcat is a feature-rich network
debugging and exploration tool because it can create almost any kind of connection you would
need and it has several interesting built-in capabilities.
Netcat Example
The first example in the figure shows how a hacker who gained access to a DMZ host uses
Netcat on that host to relay traffic. All TCP sessions destined to TCP port 80 on the local
system will be redirected to an inside host on TCP port 139. This will allow the hacker to
access TCP port 139 of the inside host, although the firewall permits only HTTP traffic to the
DMZ host.
The second example shows that Netcat is able to execute a program when the local system
accepts a network connection. Any connection accepted by the DMZ system on the local TCP
port 80 will spawn a CMD.exe shell. As a result, when a hacker connects to the HTTP server
running on that DMZ host, they will receive a command prompt, effectively allowing the
attacker to perform any operations within the system.
5-38 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Mitigation of Application Layer Attacks
You can take various measures to reduce your risks for application layer attacks.
These are some of the measures that you can take to reduce your risks:
Read operating system and network log files or have them analyzed. It is important to
review all logs and take action accordingly.
Subscribe to mailing lists that publicize vulnerabilities. Most application and operating
system vulnerabilities are published on the web by various sources.
Keep your operating system and applications current with the latest patches. Always test
patches and fixes in a nonproduction environment. This practice prevents downtime and
keeps errors from being generated unnecessarily.
Use IDS, IPS, or both to scan for known attacks, monitor and log attacks, and ultimately
prevent attacks. Using these systems is essential to identifying security threats and
mitigating some of these threats. In most cases, mitigation can be done automatically.
Configuration Management
If the managed device does not support any of the recommended management protocols, such
as SSH and SSL, Telnet (not recommended) may have to be used. Recall that Telnet was
developed in an era when security was not an issue. The network administrator should
recognize that the data within a Telnet session is sent as plaintext and may be intercepted by
anyone with a packet sniffer located along the data path between the managed device and the
management server. The clear text may include important or sensitive information, such as the
configuration of the device itself, passwords, or other sensitive data.
5-40 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Configuration Management Recommendations
Regardless of whether SSH, SSL, or Telnet is used for remote access to the managed device,
you should configure ACLs to allow only management servers to connect to the device. All
attempts from other IP addresses should be denied and logged.
Configuration Management
Recommendations
Management Protocols
SNMP is a network management protocol that you can use to retrieve information from a
network device (commonly referred to as read-only access) or to remotely configure parameters
on the device (commonly referred to as read-write access). SNMP version 1 and 2 uses
passwords (called community strings) within each message as a simple form of security.
Unfortunately, SNMPv1/v2 devices send the community string in plaintext along with the
message. Therefore, SNMPv1/v2 messages may be intercepted by anyone with a packet sniffer
located along the data path between the device and the management server. SNMPv3
overcomes these shortcomings by providing authentication and encryption to the message
exchange.
The syslog protocol is designed to carry messages from a device that is configured for logging
to a syslog server that collects the information. The messages are sent as plaintext between the
managed device and the management host. Syslog has no packet-level integrity checking to
ensure that the packet contents have not been altered in transit. An attacker may alter syslog
data in order to confuse a network administrator during an attack.
TFTP is used for transferring configuration or system files across the network. TFTP uses UDP
for the data stream between the requesting host and the TFTP server. As with other
management protocols that send data in plaintext, you should recognize that data within a TFTP
session might be intercepted by anyone with a packet sniffer located along the data path
between the device and the management server. Whenever possible, TFTP traffic should be
encrypted within an IPsec tunnel in order to reduce the chance of interception.
5-42 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Network Time Protocol (NTP) is used to synchronize the clocks of various devices across a
network. Synchronization of the clocks within a network is critical for digital certificates and
for correct interpretation of events within syslog data. A secure method of providing clocking
for the network is for network administrators to implement their own master clocks for private
networks synchronized, via satellite or radio, to Coordinated Universal Time (UTC). However,
if network administrators do not wish to implement their own master clocks because of cost or
other reasons, clock sources are available for synchronization via the Internet.
The current version of NTP is version 4. The latest version defined by an RFC is version 3,
which is recommended from a security perspective.
An attacker could attempt a DoS attack on a network by sending bogus NTP data across the
Internet in an attempt to change the clocks on network devices in such a manner that digital
certificates are considered invalid. An attacker could also attempt to confuse a network
administrator during an attack by disrupting the clocks on network devices. This scenario
makes it difficult for the network administrator to determine the order of syslog events on
multiple devices.
Management
Recommendations
Protocol
SNMP • Configure SNMP with only read-only community strings.
• Set up access control on the device you wish to manage.
• Use SNMP version 3.
Syslog • Encrypt syslog traffic within an IPsec tunnel.
• Implement RFC 3704 filtering.
• Set up access control on the firewall.
TFTP • Encrypt TFTP traffic within an IPsec tunnel.
NTP • Implement your own master clock.
• Use NTP version 3 or above.
• Set up access control that specifies which network devices
are allowed to synchronize with other network devices.
5-44 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Determining Vulnerabilities and Threats
This topic describes how to use open source tools to discover network vulnerabilities and
threats.
There are several tools and techniques that you can use to find vulnerabilities in your network.
Once you identify the vulnerabilities, you can consider and implement mitigation steps as
appropriate. Use these tools to determine vulnerabilities:
The Blue’s PortScanner scans 300 ports per second on a Windows computer.
Ethereal is used by network professionals around the world for troubleshooting, analysis,
software and protocol development, and education. Ethereal has all of the standard features
you would expect in a protocol analyzer, and several features not seen in any other product.
The Ethereal open source license allows talented experts in the networking community to
add enhancements. Ethereal runs on all popular computing platforms, including UNIX,
Linux, and Windows.
Microsoft Baseline Security Analyzer (MBSA) is the free, best practices vulnerability
assessment tool for the Microsoft platform. MBSA is a tool designed for the IT
professional that helps with the assessment phase of an overall security management
strategy. MBSA includes a graphic and command line interface that can perform local or
remote scans of Windows systems.
5-46 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Blue’s Port Scanner and Ethereal
The figure on the left illustrates a TCP host scan and a resulting list of open TCP ports
produced by Blue’s PortScanner. Blue’s PortScanner has been used to scan a single host with
the address 10.1.1.2. The TCP scan shows that SMTP, HTTP, FTP, HTTPS, EPMAP, and
NETBIOS-SSN are open on that host.
Blue’s
PortScanner
Ethereal
© 2006 Cisco Systems, Inc. All rights reserved. ISCW v1.0—5-48
The image on the right shows a packet capture example using Ethereal. Ethereal allows you to
specify various options, such as which adapter is used for sniffing and which packet filters to
apply to the capture. In the figure, you see a number of packets of different protocols, each of
which can be individually investigated in detail.
Caution Limit the scope of the testing so that you do not cause a DoS attack against your network.
5-48 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Summary
This topic summarizes the key points that were discussed in this lesson.
Summary
Summary (Cont.)
Objectives
Upon completing this lesson, you will be able to describe the techniques used to harden a Cisco
device. This ability includes being able to meet these objectives:
Identify router services and interfaces that are vulnerable to network attack
Explain how the process of locking down a Cisco router can be automated with the auto
secure command
Explain how to configure AutoSecure on a Cisco router
Compare the process of locking down a Cisco router with the CLI auto secure command
and the One-Step Lockdown mode of the Security Audit wizard available in SDM
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Vulnerable Router Services and Interfaces
This topic describes common vulnerabilities of Cisco IOS routers configured with default
settings and provides methods to mitigate these vulnerabilities.
Medium-sized and large networks typically use a firewall appliance behind the perimeter
router, which adds security features, and performs user authentication and more advanced
packet filtering.
Firewall installations also facilitate the creation of Demilitarized Zones (DMZs) where hosts
that are commonly accessed from the Internet are placed.
Cisco IOS software offers an alternative to a firewall appliance by incorporating many firewall
features in the perimeter router itself. Although this option does not provide the same
performance and security features that a Cisco PIX Security Appliance offers, a router with an
integrated firewall feature set can solve most small-to-medium business perimeter security
requirements.
Cisco IOS routers run many services that create potential vulnerabilities. To secure an
enterprise network, you must disable all unneeded router services and interfaces.
5-52 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Vulnerable Router Services
Cisco routers support many network services that may not be required in certain enterprise
networks.
The services listed in the figure have been chosen for their vulnerability to malicious
exploitation. These are the router services most likely to be used in network attacks. For ease of
learning, they have been grouped as follows:
Unnecessary services and interfaces:
— Router interfaces: Limit unauthorized access to the router and the network by
disabling unused open router interfaces.
— BOOTP server: This service is enabled by default. This service allows a router to
act as a BOOTP server for other routers. This service is rarely required and should
be disabled.
— Cisco Discovery Protocol (CDP): This service is enabled by default. CDP is used
primarily to obtain protocol addresses of neighboring Cisco devices and discover the
platforms of those devices. CDP can also be used to show information about the
interfaces your router uses. CDP is media- and protocol-independent, and runs on
most Cisco-manufactured equipment, including routers, bridges, access servers,
switches, and IP phones. If not required, this service should be disabled globally or
on a per-interface basis.
— Configuration auto-loading: This service is disabled by default. Auto-loading of
configuration files from a network server should remain disabled when not in use by
the router.
— FTP server: This service is disabled by default. The FTP server enables you to use
your router as an FTP server for FTP client requests. Because it allows access to
certain files in the router Flash memory, this service should be disabled when it is
not required.
5-54 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
— IP source routing: This service is enabled by default. The IP protocol supports
source routing options that allow the sender of an IP datagram to control the route
that a datagram will take toward its ultimate destination, and generally the route that
any reply will take. These options can be exploited by an attacker to bypass the
intended routing path and security of the network. Also, some older IP
implementations do not process source-routed packets properly, and it may be
possible to crash machines running these implementations by sending datagrams
with source routing options. Disable this service when it is not required.
Features related to probes and scans:
— Finger service: This service is enabled by default. The finger protocol (port 79)
allows users throughout the network to get a list of the users currently using a
particular device. The information displayed includes the processes running on the
system, the line number, connection name, idle time, and terminal location. This
information is provided through the Cisco IOS software show users EXEC
command. Unauthorized persons can use this information for reconnaissance
attacks. Disable this service when it is not required.
— ICMP unreachable notifications: This service is enabled by default. This service
notifies senders of invalid destination IP networks or specific IP addresses. This
information can be used to map networks and should be explicitly disabled on
interfaces to untrusted networks.
— ICMP mask reply: This service is disabled by default. When enabled, this service
tells the router to respond to ICMP mask requests by sending ICMP mask reply
messages containing the interface IP address mask. This information can be used to
map the network, and this service should be explicitly disabled on interfaces to
untrusted networks.
Terminal access security:
— IP identification service: This service is enabled by default. The identification
protocol (specified in RFC 1413) reports the identity of a TCP connection initiator to
the receiving host. This data can be used by an attacker to gather information about
your network, and this service should be explicitly disabled.
— TCP keepalives: This service is disabled by default. TCP keepalives help “clean
up” TCP connections where a remote host has rebooted or otherwise stopped
processing TCP traffic. Keepalives should be enabled globally to manage TCP
connections and prevent certain DoS attacks.
Gratuitous and proxy Address Resolution Protocol (ARP):
— Gratuitous ARP: This service is enabled by default. Gratuitous ARP is the main
mechanism used in ARP poisoning attacks. You should disable gratuitous ARPs on
each router interface unless this service is otherwise needed.
— Proxy ARP: This service is enabled by default. This feature configures the router to
act as a proxy for Layer 2 address resolution. This service should be disabled unless
the router is being used as a LAN bridge.
IP directed broadcast: This service is enabled in Cisco IOS software releases prior to
Cisco IOS software Release 12.0 and disabled in Cisco IOS software Release 12.0 or later.
IP directed broadcasts are used in the common and popular smurf denial of service (DoS)
attack and other related attacks. This service should be disabled when not required.
The manual process of disabling the services individually is lengthy and error-prone because
you may overlook some services that are not needed and should be disabled. As a result, the
manual disabling of services may leave the router vulnerable.
5-56 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Locking Down Routers with AutoSecure
This topic describes the steps of the automated feature for hardening Cisco IOS routers called
AutoSecure.
What is AutoSecure?
The AutoSecure feature is found in Cisco IOS software Release 12.3 and newer.
AutoSecure is a single privileged EXEC program that allows you to quickly and easily
eliminate many potential security threats. AutoSecure helps to make you more efficient at
securing Cisco routers.
Obviously, interactive mode provides for greater control over the router security-related
features than noninteractive mode. However, when you want to quickly secure a router without
much human intervention, the noninteractive mode becomes the better choice. You can enable
noninteractive portions of the dialogue by selecting the optional no-interact keyword.
5-58 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
AutoSecure Functions
AutoSecure allows you to choose which router components to secure. You may want to secure
the entire router functionality, or select individual planes or functions. The selectable
components are the management plane, forwarding plane, firewall, login, NTP, and Secure
Shell (SSH).
AutoSecure Functions
The management plane includes management services, such as finger, PAD, UDP and TCP
small servers, password encryption, TCP keepalives, CDP, BOOTP, HTTP, source routing,
gratuitous ARP, proxy ARP, ICMP (redirects, mask-replies), directed broadcast, MOP, and
banner. It also includes the login functions, such as password security and failed login attempt
actions, as well as SSH access.
The forwarding plane hardening consists of enabling Cisco Express Forwarding (CEF) and
configuring ACLs for traffic filtering.
The firewall component allows you to activate the Cisco IOS Firewall inspection for common
protocols and applications.
Login functions include password configuration, and setting options for failed login attempts.
NTP functionality sets up authenticated NTP connectivity.
The SSH feature configures a hostname and a domain-name if not configured already, and
enables SSH access to the protected router. TCP Intercept function enables the TCP intercept
feature with default settings.
The full, ntp, login, ssh, firewall, and tcp-intercept keywords were added in Cisco IOS
software Release 12.3(4)T.
Using the full option, the user will be prompted for all interactive questions.
5-60 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
AutoSecure Process Overview
This topic explains how to configure AutoSecure on a Cisco router.
router#
auto secure [management | forwarding] [no-interact |
full] [ntp | login | ssh | firewall | tcp-intercept]
• Launches AutoSecure
• Main steps with the interactive full option:
– Identify outside interfaces.
– Secure the management plane.
– Create security banner.
– Configure passwords, AAA, and SSH.
– Secure the interface settings.
– Secure the forwarding plane.
AutoSecure is initiated using the auto secure command in privileged EXEC mode.
auto secure [management | forwarding] [no-interact | full] [ntp | login | ssh | firewall | tcp-
intercept]
AutoSecure uses this syntax to provide a level of granularity. To secure all components and
functions, select the full option. To avoid configuration prompts, select the no-interact
keyword. To limit the scope of hardening, use any of the remaining options, described in the
table below.
Parameter Description
no-interact (Optional) The user will not be prompted for any interactive
configurations. No interactive dialogue parameters will be
configured, including usernames or passwords.
full (Optional) The user will be prompted for all interactive questions.
This is the default.
5-62 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Start and Interface Selection
The first questions that AutoSecure asks you are directly related to how the router is connected
to the Internet.
Router#auto secure
--- AutoSecure Configuration ---
*** AutoSecure configuration enhances the security of the router but it will not
make router absolutely secure from all security attacks ***
All the configuration done as part of AutoSecure will be shown here. For more
details of why and how this configuration is useful, and any possible side effects,
please refer to Cisco documentation of AutoSecure.
At any prompt you may enter '?' for help.
Use ctrl-c to abort this session at any prompt.
Gathering information about the router for AutoSecure
If you do not specify any options, as in the example, AutoSecure starts in the interactive mode
and proceeds to secure the full scope of services and functions.
At the beginning, AutoSecure needs to know the following:
Is the router going to be connected to the Internet?
How many interfaces are connected to the Internet?
What are the names of the interfaces connected to the Internet?
This is the same as using the banner command in global configuration mode.
5-66 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Passwords and AAA
Next, AutoSecure proceeds to the configuration of login functionality.
AutoSecure asks whether you want to configure the SSH server. If you answer “yes,”
AutoSecure will automatically configure the SSH timeout to 60 seconds and the number of
SSH authentication retries to two:
Hostname: If you configured a hostname for this router prior to starting the AutoSecure
procedure, you will not be prompted to enter one here. However, if the router is currently
using the factory default hostname of Router, you will be prompted to enter a unique
hostname as shown in the figure. This is important because SSH requires a unique
hostname for key generation.
Domain name: AutoSecure prompts you for the domain to which this router belongs. Like
the hostname parameter, a domain name is important for SSH key generation.
Then, AutoSecure automatically disables the following services on all router interfaces:
IP redirects
IP proxy ARP
IP unreachables
IP directed-broadcast
IP mask replies and disables MOP on Ethernet interfaces
5-68 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Forwarding Plane, Verification, and Deployment
Next, AutoSecure secures the router forwarding plane.
no service finger
no service pad
no service udp-small-servers
no service tcp-small-servers
service password-encryption
.
.
Apply this configuration to running-config? [yes]: y
Note Unicast RPF is an antispoof feature that scans the routing table information to detect and
possibly block spoofed IP packets. When an incoming packet arrives on an interface, the
router checks the routing entry for the source IP address of the packet. If the route points to
the same interface, the packet is accepted. If the packet arrived on a different interface, it
may have been spoofed, and is dropped.
5-70 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
The Commands that are Applied to the Router Description
5-72 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Locking Down Routers with the SDM
This topic describes the steps of the automated AutoSecure feature.
SDM
automated
hardening
features:
• Security
Audit
• One-Step
Lockdown
Cisco SDM is an intuitive, web-based device-management tool for Cisco IOS software-based
routers. Cisco SDM simplifies router and security configuration through smart wizards, which
help you to quickly and easily deploy, configure, and monitor a Cisco router without requiring
knowledge of the CLI. Cisco SDM simplifies firewall and Cisco IOS software configuration
without requiring expertise about security or Cisco IOS software.
Cisco SDM contains a Security Audit wizard that provides a comprehensive router security
audit. Cisco SDM uses security configurations recommended by Cisco Technical Assistance
Center (TAC) and International Computer Security Association (ICSA) as its basis for
comparisons and default settings. The Security Audit wizard assesses the vulnerability of the
existing router and provides quick compliance to best-practice security policies.
SDM can implement almost all of the configurations that AutoSecure offers with the One-Step
Lockdown feature.
Examples of the audit include, but are not limited to, the following:
Shuts down unneeded servers on the router (BOOTP, finger, TCP/UDP small servers)
Shuts down unneeded services on the router (CDP, IP source-route, IP classless)
Applies a firewall to the outside interfaces
Disables SNMP, or enables it with hard-to-guess community strings
Shuts down unused interfaces using the no ip proxy-arp command
Forces passwords for the router console and vty lines
Forces an enable secret password
Enforces the use of ACLs
5-74 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
SDM Security Audit: Main Window
The Security Audit wizard contains two modes:
Security Audit: Examines router configuration, then displays the Report Card window,
which shows a list of possible security problems. You can choose which vulnerability you
would like to lock down.
One-Step Lockdown: Initiates the automatic lockdown using recommended settings.
2.
3.
A welcome page opens describing the functions performed by the security audit wizard. Click
the Next button to proceed to the next step.
5-76 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
SDM Security Audit Interface Configuration
The Security Audit Interface Configuration window opens after clicking Next.
In this step, select the inside and outside interfaces. Then, click the Next button to proceed to
the next step.
After viewing the report, you have the option of saving it as a file. Click the Close button to
close the window and proceed to the next step.
5-78 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
SDM Security Audit: Fix the Security Problems
Next, a window appears listing the identified problems.
Check the Fix It check boxes next to any problems that you want Cisco SDM to fix, and click
the Next button. Additional windows may appear requiring your input, such as entering a
password. Pay special attention to any warning messages that appear. Make sure that you do
not “fix” a potential security breach and lock yourself out of the router.
Note For a description of the problem and a list of the Cisco IOS commands that will be added to
your configuration, click the problem description hyperlinks. A Help page describing the
selected problem will open.
5-80 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
SDM One-Step Lockdown: Main Window
Cisco SDM provides an easy one-step router lockdown for many security features. The wizard
button is available in the Security Audit task under the Configure tab.
Click the One-step lockdown button to launch the One-Step Lockdown wizard.
This option tests the router configuration for any potential security problems and automatically
makes any necessary configuration changes to correct the problems found.
The conditions tested and, if needed, corrected are as follows:
Disable Finger Service
Disable PAD Service
Disable TCP Small Servers Service
Disable UDP Small Servers Service
Disable IP BOOTP Server Service
Disable IP Identification Service
Disable CDP
Disable IP Source Route
Enable Password Encryption Service
Enable TCP Keepalives for Inbound Telnet Sessions
Enable TCP Keepalives for Outbound Telnet Sessions
Enable Sequence Numbers and Time Stamps on Debugs
Enable IP CEF
Disable IP Gratuitous ARPs
Set Minimum Password Length to Less Than Six Characters
Set Authentication Failure Rate to Less Than Three Retries
5-82 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Set TCP SYN Wait Time
Set Banner
Enable Logging
Set Enable Secret Password
Disable SNMP
Set Scheduler Interval
Set Scheduler Allocate
Set Users
Enable Telnet Settings
Enable NetFlow Switching
Disable IP Redirects
Disable IP Proxy ARP
Disable IP Directed Broadcast
Disable MOP Service
Disable IP Unreachables
Disable IP Mask Reply
Disable IP Unreachables on NULL Interface
Enable Unicast RPF on Outside Interfaces
Enable Firewall on All of the Outside Interfaces
Set Access Class on HTTP Server Service
Set Access Class on VTY Lines
Enable SSH for Access to the Router
Summary
5-84 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Lesson 3
Objectives
Upon completing this lesson, you will be able to secure Cisco router physical installations and
administrative access using passwords. This ability includes being able to meet these
objectives:
Describe how to configure secure administrative access to Cisco routers by configuring
passwords
Describe how to secure administrative access to Cisco routers by setting a login failure rate
and using IOS login enhancements
Describe how to secure administrative access to Cisco routers by setting timeouts
Describe how to secure administrative access to Cisco routers by setting multiple privilege
levels
Describe how to secure administrative access to Cisco routers by configuring banner
messages
Explain role-based CLI and the commands required to configure basic CLI views
Explain how to secure Cisco IOS boot image and configuration files
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Configuring Router Passwords
This topic describes how to configure secure administrative access to Cisco routers by
configuring passwords.
Strong passwords are the primary defense against unauthorized access to your router. The best
way to manage passwords is to maintain them on an authentication, authorization, and
accounting (AAA) server. Almost every router needs a locally configured password for
privileged access, and may also have other password information in its configuration file.
One way to perform initial router configuration tasks is to access the router console port.
Consoles are only one of the ways to obtain administrative access to configure and manage
routers. Other ways to gain administrative access include:
Telnet
Secure Shell (SSH)
Simple Network Management Protocol (SNMP)
Cisco Security Device Manager (SDM) access using HTTP or HTTPS
5-86 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Password Creation Rules
This section describes the best practices in password security.
When creating passwords for Cisco routers, always keep these rules in mind:
The best practice is to have a minimum of ten characters. You can enforce the minimum
length using a feature available on Cisco IOS routers, discussed later in this topic.
Passwords may include the following:
— Any alphanumeric character
— A mix of uppercase and lowercase characters
— Symbols and spaces
Passwords should not use dictionary words. Using dictionary words makes the passwords
vulnerable to dictionary attacks.
Password-leading spaces are ignored, but all spaces after the first character are not ignored.
You should have a policy defining when and how often the passwords should be changed.
Changing passwords frequently provides two advantages: It limits the window of
opportunity in which a hacker can crack a password, and it limits the window of exposure
after a password has been compromised.
You may want to add your own rules to this list, making your passwords even safer.
The first few questions in the initial configuration dialog pertain to these password
requirements:
The router enable secret password
The router enable password
The password used to access the router using virtual terminal lines
The enable secret password is used to enter enable mode (sometimes referred to as privileged
mode or privileged-EXEC mode). You can set the enable secret password by entering a
password during the initial configuration dialog, as shown in the figure, or by using the enable
secret command in global configuration mode. The enable secret overrides the enable password
configured with the enable password command. In other words, when enable secret is
configured on a router, you cannot access the privileged mode using the password configured
with enable password command. The enable secret command uses a one-way encryption hash
based on Message Digest 5 (MD5) and is considered irreversible by most cryptographers.
However, even this type of encryption is still vulnerable to brute force or dictionary attacks. If
you forget the enable secret password, you have no alternative but to replace it using the Cisco
router password recovery procedure.
5-88 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
The enable password command is also used to enter enable mode, but is a holdover from older
versions of Cisco IOS software. By default, the enable password is not encrypted in the router
configuration. Cisco decided to keep the older enable password command in later versions of
Cisco IOS software even though enable secret password is a safer way to store privileged-
EXEC passwords. The older command was kept in case the router is downgraded to a version
of Cisco IOS software that did not support enable secret password. The enable password
protects the privileged-EXEC mode.
The virtual terminal password is the line-level password entered when connecting to the router
using Telnet or SSH. You can set this password during the initial configuration dialog or by
using the password command in vty line configuration mode. The virtual terminal password is
not encrypted.
router(config)#
line console 0
line aux 0
line vty 0 4
• Enters line configuration mode (console, auxiliary, or vty)
router(config-line)#
login
• Enables password checking at login
router(config-line)#
password password
• Sets the line-level password
Boston(config)#line con 0
Boston(config-line)#login
Boston(config-line)#password ConUser1
Console Port
By default, the Cisco router console ports allow a hard BREAK signal (within 60 seconds of a
reboot) to interrupt the normal boot sequence and give the console user complete control of the
router. This is used for maintenance purposes, such as when running the Cisco router password
recovery procedure. Even though this hard BREAK sequence is, by default, available to
someone who has physical access to the router console port, it is still important to set a line-
level password for users who might try to gain console access remotely. The hard BREAK
sequence may be disabled using the no service password-recovery command.
Note If a router is configured with the no service password-recovery command, all access to
the ROM Monitor (ROMMON) is disabled.
By default, the console port does not require a password for console administrative access.
However, you should always configure a console port line-level password. There are two ways
to configure a console line password: You can enter the password during the initial
configuration dialog, or you can use the password command in the console line configuration
mode.
VTY Lines
Cisco routers support multiple Telnet sessions (up to five simultaneous sessions, by default—
more can be added), each serviced by a logical vty. By default, Cisco routers do not have any
line-level passwords configured for these vty.
5-90 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
If you enable password checking, you must also configure a vty password before attempting to
access the router using Telnet. If you fail to configure a vty password, and password checking
is enabled for vty, you will encounter an error message similar to the following:
Telnet 10.0.1.2
Trying 10.0.1.2 ….. open
Auxiliary Lines
By default, Cisco router auxiliary ports do not require a password for remote administrative
access. Administrators sometimes use auxiliary ports to remotely configure and monitor the
router using a dialup modem connection.
Unlike console and vty passwords, the auxiliary password is not configured during the initial
configuration dialog and should be configured using the password command in auxiliary line
configuration mode.
If you wish to turn off the EXEC process for the aux port, use the no exec command within the
auxiliary line configuration mode.
Setting the auxiliary line-level password is only one of several steps you must complete when
configuring a router auxiliary port for remote dial-in access. The table explains commands used
when configuring an auxiliary port.
Command Explanation
5-92 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Password Minimum Length Enforcement
Cisco IOS software Release 12.3(1) and later allows you to set the minimum character length
for all router passwords using the security passwords min-length global configuration
command. This command provides enhanced security access to the router by allowing you to
specify a minimum password length (0 to 16), which eliminates common passwords that are
prevalent on most networks, such as lab and cisco. This command affects user passwords,
enable passwords and secrets, and line passwords created after the command was executed.
Existing router passwords remain unaffected.
router(config)#
It is highly recommended that you set your minimum password length to at least 10 characters.
After this command is enabled, any attempt to create a new password that is less than the
specified length fails and results in an error message similar to the following:
Password too short - must be at least 10 characters. Password
configuration failed.
Boston(config)#service password-encryption
Boston(config)#exit
Boston#show running-config
enable password 7 06020026144A061E
!
line con 0
password 7 0956F57A109A
!
line vty 0 4
password 7 034A18F366A0
!
line aux 0
password 7 7A4F5192306A
With the exception of the enable secret password, all Cisco router passwords are, by default,
stored in plaintext form within the router configuration. View these passwords with the show
running-config command. Sniffers can also see these passwords if your TFTP server
configuration files traverse an unsecured intranet or Internet connection. If an intruder gains
access to the TFTP server where the router configuration files are stored, the intruder will be
able to obtain these passwords.
A proprietary Cisco algorithm based on a Vigenere cipher (indicated by the number 7 when
viewing the configuration) allows the service password-encryption command to encrypt all
passwords (except the previously encrypted enable secret password) in the router configuration
file. This method is not as safe as MD5, which is used with the enable secret command, but
prevents casual discovery of the router line-level passwords.
After all of your passwords are configured for the router, you should run the service password-
encryption command in global configuration mode, as shown in the figure.
When you remove the service password-encryption command with the no form, this does not
decrypt the passwords.
5-94 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Enhanced Username Password Security
You can choose to use an MD5 hashing mechanism to encrypt username passwords.
router(config)#
username name password {[0] password | 7 hidden-password}
router(config)#
username name secret {[0] password | 5 encrypted-secret}
Cisco routers can maintain a list of usernames and passwords for performing local login
authentication. Traditionally, local users were defined with the username password command,
which was used to configure users and plaintext passwords. These passwords could then be
obfuscated by the password-encryption service, which employed the weak Vigenere cipher that
defended against reading the passwords but did not provide adequate protection from hackers.
Option 7 in the username password command allowed you to enter the ciphertext of a
password, computed by the Vigenere algorithm. This option was used in recovery scenarios in
which a previous configuration, using password-encryption service, needed to be reinstalled
and only obfuscated passwords were available in the backup configuration.
Enhanced username password security uses the username secret command and employs MD5
password hashing. It is a much stronger encryption scheme than the standard type 7 encryption
found in the service password-encryption command. The added layer of MD5 encryption is
useful in environments in which the password crosses the network or is stored on a TFTP
server.
Using the username secret command in global configuration mode, you can choose to enter a
plaintext password for MD5 hashing by the router (option 0), or enter a previously encrypted
MD5 secret (option 5).
username name secret {[0] password | 5 encrypted-secret}
Parameter Description
encrypted-secret The MD5 encrypted secret password that will be stored as the
encrypted user password
Note MD5 encryption is a strong encryption method that is not retrievable; therefore, you cannot
use MD5 encryption with protocols that require plaintext passwords, such as Challenge
Handshake Authentication Protocol (CHAP).
5-96 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Securing ROMMON
By default, Cisco IOS routers allow a break sequence during power up, which forces the router
into ROM Monitor (ROMMON) mode. Once the router is in ROMMON mode, anyone can
choose to enter a new enable secret password using the well-known Cisco password recovery
procedure. This procedure, if performed correctly, leaves the router configuration intact. This
scenario presents a potential security breach because anyone who gains physical access to the
router console port can enter ROMMON, reset the enable secret password, and discover the
router configuration.
router(config)#
no service password-recovery
You can mitigate this potential security breach by using the no service password-recovery
global configuration command. The no service password-recovery command has no
arguments or keywords.
Caution If a router is configured with the no service password-recovery command, all access to
the ROMMON is disabled. If the router flash memory does not contain a valid Cisco IOS
image, you will not be able to use the rommon xmodem command to load a new flash
image. In order to repair the router, you must obtain a new Cisco IOS image on a flash
SIMM, or on a PCMCIA card (3600 only). See Cisco.com for more information regarding
backup flash images.
Once the no service password-recovery command is executed, the router boot sequence will
look similar to this:
System Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1)
Copyright (c) 1999 by cisco Systems, Inc.
C2600 platform with 65536 Kbytes of main memory
5-98 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Setting a Login Failure Rate
This topic describes how to secure administrative access to Cisco routers by setting a login
failure rate.
router(config)#
Starting with Cisco IOS software Release 12.3(1), you can configure the number of allowable
unsuccessful login attempts by using the security authentication failure rate global
configuration command.
security authentication failure rate threshold-rate log
Parameter Description
When the number of failed login attempts reaches the configured rate, two events occur:
A TOOMANY_AUTHFAILS event message is sent by the router to the configured syslog
server.
A 15-second delay timer starts.
After the 15-second delay has passed, the user may continue to attempt to log in to the router.
router(config)#
login block-for seconds attempts tries within seconds
The first command parameter (seconds) specifies the duration of time, or quiet period, during
which login attempts are denied.
The second parameter (attempts) stands for the maximum number of failed login attempts that
triggers the quiet period.
The third parameter (within) describes the duration of time, in seconds, during which the
allowed number of failed login attempts must be made before the quiet period is triggered.
After the login block-for command is enabled, these defaults are enforced:
A default login delay of one second.
All login attempts made via Telnet, secure shell (SSH), and HTTP are denied during the
quiet period; that is, no ACLs are exempt from the login period until the login quiet-mode
access-class command is issued.
5-100 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
This logging message is generated after the router switches to quiet-mode:
00:04:07:%SEC_LOGIN-1-QUIET_MODE_ON:Still timeleft for
watching failures is 158 seconds, [user:sfd]
[Source:10.4.2.11] [localport:23] [Reason:Invalid login],
[ACL:22] at 16:17:23 UTC Wed Feb 26 2003
The following logging message is generated after the router switches from quiet mode back to
normal mode:
00:09:07:%SEC_LOGIN-5-QUIET_MODE_OFF:Quiet Mode is OFF,
because block period timed out at 16:22:23 UTC Wed Feb 26 2003
router(config)#
login quiet-mode access-class {acl-name | acl-number}
The ACL also specifies IP addresses that are excluded from login failure counting using the
login block-for command.
5-102 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Setting a Login Delay
A Cisco IOS device can accept login connections (such as Telnet, secure shell (SSH), and
HTTP) as fast as they can be processed. The login delay command introduces a uniform delay
between successive login attempts. The delay occurs for all login attempts—failed or successful
attempts. Thus, users can better secure their Cisco IOS device from dictionary attacks, which
are an attempt to gain username and password access to your device.
router(config)#
login delay seconds
Boston(config)#login delay 30
The login delay command was introduced in Cisco IOS software Release 12.3(4)T. If not
enabled, a login delay of one second is automatically enforced after the login block-for
command is applied to the router configuration.
Verifying Login
router#
show login [failures]
Boston(config)#show login
The sample output from the show login command verifies that the login block-for command is
issued. In this example, the command is configured to block login hosts for 100 seconds if 16
or more login requests fail within 100 seconds; five login requests have already failed.
Router#show login
5-104 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
The sample output from show login failures command shows all failed login attempts on the
router.
Router#show login failures
router(config-line)#
exec-timeout minutes [seconds]
• Default is 10 minutes
• Terminates an unattended connection
• Provides an extra safety factor when an administrator walks
away from an active console session
Boston(config)#line console 0
Boston(config-line)#exec-timeout 3 30
Boston(config)#line aux 0
Boston(config-line)#exec-timeout 3 30
By default, an administrative interface stays active (and logged on) for ten minutes after the last
session activity. After that, the interface times out and logs out of the session. It is
recommended that you fine-tune these timers to limit the amount of time to within two or three
minutes maximum.
Caution Setting the exec-timeout value to 0 means that there will be no timeout and the session will
stay active for an unlimited time. Do not set the value to 0.
You can adjust these timers using the exec-timeout command in line configuration mode for
each of the line types used.
exec-timeout minutes [seconds]
exec-timeout Parameters
Parameter Description
5-106 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Setting Multiple Privilege Levels
This topic describes how to secure administrative access to Cisco routers by setting multiple
privilege levels.
router(config)#
Cisco routers enable you to configure various privilege levels for your administrators. Different
passwords can be configured to control who has access to the various privilege levels. This is
especially helpful in a help desk environment where certain administrators are allowed to
configure and monitor every part of the router (level 15) while other administrators may be
restricted to only monitoring (customized levels 2 to 14). The 16 levels (0 to 15) are defined in
the figure.
Privileges are assigned to levels 2 to 14 using the privilege command from global
configuration mode.
The example shown in the figure assigns the ping command to privilege level 2 and establishes
“Patriot” as the secret password users must enter to use level 2 commands. Using the enable 2
command, you will be prompted for the enable secret password for privilege level 2. The show
privilege command is used to display the current privilege level.
router>enable 2
Password: Patriot
router#show privilege
Current privilege level is 2
privilege mode {level level command | reset command}
Parameter Description
mode This command specifies the configuration mode. See the list after
this table for options for this argument.
level This is the privilege level associated with a command. You can
specify up to 16 privilege levels, using numbers 0 to 15.
command This sets the command to which the privilege level is associated.
command This is the command for which you want to reset the privilege
level.
Use the privilege ? option of the command in the global configuration mode to see a complete
list of router configuration modes on your router. The table contains some of the router
configuration modes that can be configured using the privilege command.
5-108 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Configuration Mode Description
router(config)#
Boston(config)#banner motd %
WARNING: You are connected to $(hostname) on the Cisco Systems,
Incorporated network. Unauthorized access and use of this network will
be vigorously prosecuted. %
Banner messages should be used to warn would-be intruders that they are not welcome on your
network. Banners are important, especially from a legal perspective. Intruders have been known
to win court cases because they did not encounter appropriate warning messages when
accessing router networks.
Choosing what to place in your banner messages is extremely important and should be
reviewed by legal counsel before placing them on your routers. Never use the word welcome or
any other familiar greeting that may be misconstrued as an invitation to use the network.
Banners are disabled by default and must be explicitly enabled by the administrator. As shown
in the figure, use the banner command from global configuration mode to specify appropriate
messages.
banner {exec | incoming | login | motd | slip-ppp} d message d
banner Parameters
Parameter Description
5-110 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Parameter Description
message This represents message text. You can include tokens in the form
$(token) in the message text. Tokens are replaced with the
corresponding configuration variable.
This list contains valid tokens for use within the message section of the banner command:
$(hostname): Displays the hostname for the router
$(domain): Displays the domain name for the router
$(line): Displays the vty or tty (asynchronous) line number
$(line-desc): Displays the description attached to the line
Although users can control CLI access via both privilege levels and enable mode passwords,
these functions do not provide the necessary level of detail needed when working with
Cisco IOS routers and switches.
The Role-Based CLI Access feature allows you to define “views,” which are a set of
operational commands and configuration capabilities that provide selective or partial access to
Cisco IOS EXEC and configuration mode commands. Views restrict user access to Cisco IOS
CLI and configuration information; that is, a view can define which commands are accepted
and what configuration information is visible. CLI views provide a more detailed access control
capability for network administrators, thereby improving the overall security and accountability
of Cisco IOS software.
As of Cisco IOS software Release 12.3(11)T, you can also specify an interface or a group of
interfaces to a view, thereby allowing access on the basis of specified interfaces.
Access to a view is protected with a password, similarly to the concept used by the privilege
levels.
To simplify the view management, views can be grouped to superviews, to create large sets of
commands and interfaces. A superview encompasses several individual views, resulting in
wider administrative privileges.
5-112 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Role-Based CLI Details
When a system is in root view, it has all of the access privileges as a user who has level 15
privileges. If you wish to configure any view to the system, the system must be in root view.
The difference between a user who has level 15 privileges and a root view user is that a root
view user can configure a new view and add or remove commands from the view. Also, when
you are in a CLI view, you have access only to the commands that have been added to that
view by the root view user.
View authentication can be performed by an external AAA server via the new cli-view-name
attribute. AAA authentication associates only one view name to a particular user; that is, only
one view name can be configured for a user in an authentication server.
Note AAA provides access to an external user database that is used for authentication,
authorization, and accounting tasks. Without the external AAA server, all network devices
would need to maintain a local copy of the user database, which may have a severe impact
on scalability and functionality of the system.
The maximum number of CLI views and superviews, including one lawful intercept view, that
can be configured is 15. (This does not include the root view.)
Before you enter or create a view, you must enable AAA via the aaa new-model command.
Then use the enable command with the view parameter to enter the root view. You will be
prompted for authentication, if configured. Use the privilege 15 password.
enable Parameters
Parameter Description
view (Optional) Enters into root view, which enables users to configure
CLI views. This keyword is required if you want to configure a CLI
view.
view-name (Optional) Enters or exits a specified CLI view. This keyword can
be used to switch from one CLI view to another CLI view.
5-114 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Configuring CLI Views
After aaa new-model has been enabled and you enter the root view, create a view and enter the
view configuration mode using the parser view command. You need to specify the name of the
view to be created or the existing view to be modified.
router(config-view)#
password 5 encrypted-password
commands parser-mode {include | include-exclusive |
exclude} [all] [interface interface-name | command]
• Sets a password to protect access to the view
• Adds commands or interfaces to a view
Next, protect access to the CLI view with a secret using the password command. The only
available encryption algorithm is MD5, represented by the number 5 in the first parameter field.
Then provide a password that will be required to enter this view. You must issue this command
before you can configure additional attributes for the view.
Finally, add commands or interfaces to a view using the commands command.
commands parser-mode {include | include-exclusive | exclude} [all] [interface interface-
name | command]
commands Parameters
Parameter Description
include Adds a command or an interface to the view and allows the same
command or interface to be added to an additional view
5-116 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Configuring Superviews
Role-based CLI facilitates the concept of grouping CLI views into view supersets, called
superviews.
Configuring Superviews
router(config)#
router(config-view)#
password 5 encrypted-password
view view-name
• Sets a password to protect access to the superview
• Adds a CLI view to a superview
A superview consists of one or more CLI views, which allow users to define which commands
are accepted and what configuration information is visible. Superviews allow you to easily
assign all users within configured CLI views to a superview instead of having to assign
multiple CLI views to a group of users.
Superviews have these characteristics:
A CLI view can be shared among multiple superviews.
Commands cannot be configured for a superview; that is, you must add commands to the
CLI view and add that CLI view to the superview.
Users who are logged into a superview can access all of the commands that are configured
for any of the CLI views that are part of the superview.
Each superview has a password that is used to switch between superviews or from a CLI
view to a superview.
If a superview is deleted, all CLI views associated with that superview will not also be
deleted.
To configure a superview, use the parser view command and configure a password for that
superview. Then, add a normal CLI view to the superview using the view command. Issue this
command for each CLI view that is to be added to the superview.
Note Before adding a CLI view to a superview, ensure that the CLI views that are added to the
superview are valid views in the system; that is, the views have been successfully created
via the parser view command.
Note The all keyword is available only to root users. However, the all keyword can be configured
by a user in root view to be available for users in any CLI view.
router#
router#
To display debug messages for all views—use the debug parser view command in privileged
EXEC mode.
5-118 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Role-Based CLI Configuration Example
In this example, the CLI view first is created and configured to include the commands show
version, configure terminal, and all commands starting with show ip.
Boston(config)#aaa new-model
Boston(config)#exit
Boston#enable view
%PARSER-6-VIEW_SWITCH: successfully set to view ‘root’.
Boston#configure terminal
Boston(config)#parser view first
%PARSER-6-VIEW_CREATED:view ‘first’ successfully created.
Boston(config-view)#secret 5 firstpass
Boston(config-view)#command exec include show version
Boston(config-view)#command exec include configure terminal
Boston(config-view)#command exec include all show ip
Boston(config-view)#exit
Next, this configuration will be verified by entering and viewing the available commands.
To further verify the view configuration, the user looks at the available options of the show
command. The available options include parser, which is always available, and the configured
keywords ip and version.
5-120 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Role-Based CLI Verification (Cont.)
Boston#show ip ?
access-lists List IP access lists
accounting The active IP accounting database
aliases IP alias table
arp IP ARP table
as-path-access-list List AS path access lists
bgp BGP information
cache IP fast-switching route cache
casa Display casa information
cef Cisco Express Forwarding
community-list List community-list
dfp DFP information
dhcp Show items in the DHCP database drp
--More--
Next, the user verifies that all sub-options of the show ip command are available in the view.
A great challenge for network operators is to deal with the total downtime experienced after a
router has been compromised and its operating software and configuration data erased from its
persistent storage. The operator must retrieve an archived copy (if any) of the configuration and
a working image to restore the router. Recovery must then be performed for each affected
router, adding to the total network downtime.
The Cisco IOS Resilient Configuration feature enables a router to secure and maintain a
working copy of the running image and configuration so that those files can withstand
malicious attempts to erase the contents of persistent storage in NVRAM and flash.
The Cisco IOS Resilient Configuration feature is intended to speed up the recovery process.
The feature maintains a secure working copy of the router image and the startup configuration
at all times. These secure files cannot be removed by the user. This set of image and router
running configuration is referred to as the primary bootset.
The following factors were considered in the design of Cisco IOS Resilient Configuration:
The configuration file in the primary bootset is a copy of the running configuration that was
in the router when the feature was first enabled.
The feature secures the smallest working set of files to preserve persistent storage space.
No extra space is required to secure the primary Cisco IOS image file.
The feature automatically detects image or configuration version mismatch.
Only local storage is used for securing files, eliminating scalability maintenance challenges
from storing multiple images and configurations on TFTP servers.
The feature can be disabled only through a console session.
5-122 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Restrictions for Cisco IOS Resilient Configuration
This feature is available only on platforms that support a Personal Computer Memory Card
International Association (PCMCIA) Advanced Technology Attachment (ATA) disk. There
must be enough space on the storage device to accommodate at least one Cisco IOS image and
a copy of the running configuration.
It may be possible to force removal of secured files using an older version of Cisco IOS
software that does not contain file system support for hidden files.
This feature can be disabled only by using a console connection to the router. With the
exception of the upgrade scenario, feature activation does not require console access.
Secured files will not appear in the output of a dir command issued from an executive shell
because secure files are not listed. ROMMON mode does not have any such restriction and can
be used to list and boot secured files. The running image and running configuration archives
will not be visible in the Cisco IOS dir command output. Instead, the show secure bootset
command must be used to verify archive existence.
secure boot-image
• Enables Cisco IOS image resilience
router(config)#
secure boot-config
• Stores a secure copy of the primary bootset in persistent
storage
router#
Boston(config)#secure boot-image
Boston(config)#secure boot-config
To verify the status of the resilience feature and the primary bootset filename, use the show
secure bootset command.
5-124 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Cisco IOS Resilient Configuration Feature Verification
This printout shows a sample output of the show secure bootset command.
IOS image resilience version 12.3 activated at 08:16:51 UTC Sun Jun 16
2005
Secure archive slot0:c3745-js2-mz type is image (elf) []
file size is 25469248 bytes, run size is 25634900 bytes
Runnable image, entry point 0x80008000, run from ram
The printout shows the status of the resilience feature and the primary bootset filename (both
the startup configuration and the running image).
rommon 1 >
dir [filesystem:]
boot [partition-number:][filename]
• Lists the contents of the device with secure bootset
• Boots up the router using the secure bootset image
router(config)#
When the router recovery process starts in the ROMMON mode, you can view the contents of
the file system with the dir command to identify the image that the router should boot from.
Then use the boot command to load the specified secured image. After the router boots and if
the startup configuration was deleted, the router will prompt you for interactive configuration
input. You should decline to enter an interactive configuration session in setup mode if you
secured the configuration file. Instead, use the secure boot-config restore command to recover
the secured startup configuration and save it under a specified filename (slot0:rescue in the
example). Finally, copy the recovered file to the running configuration to resume normal
operations.
5-126 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Summary
This topic summarizes the key points that were discussed in this lesson.
Summary
Summary (Cont.)
Objectives
Upon completing this lesson, you will be able to mitigate threats and attacks to Cisco perimeter
routers by configuring and applying ACLs to filter traffic. This ability includes being able to
meet these objectives:
Identify the types and formats of IP ACLs that are used by routers to restrict access and
filter packets
Describe how to apply ACLs to router interfaces
Explain the use of traffic filtering with ACLs to mitigate threats in a network
Explain how to implement ACLs to mitigate threats
Explain how to configure router ACLs to help reduce the effects of distributed DoS attacks
Describe how to combine many ACL functions into two or three larger ACLs
Explain some of the caveats to be considered when building ACLs
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Cisco ACLs
This topic describes the types and formats of IP ACLs that are used by routers to restrict access
and filter packets.
The Cisco ACL is probably the most commonly used object in Cisco IOS software. The ACLs
are not only used for packet filtering (a type of firewall) but also for selecting types of traffic to
be analyzed, forwarded, or influenced in some way.
The ACL is a list of statements. Each statement defines a pattern that would be found in an IP
packet. As each packet comes through an interface with an associated ACL, the list is scanned
from top to bottom, and in the exact order in which it was entered, for a pattern that matches the
incoming packet. A permit or deny rule associated with the pattern determines what will
happen to that packet.
Cisco routers use ACLs as packet filters to decide which packets can access a router service or
which packets can be allowed across an interface. Packets that are allowed across an interface
are called permitted packets. Packets that are not allowed across an interface are called denied
packets. ACLs contain one or more rules or statements that determine which data is to be
permitted or denied across an interface.
ACLs are designed to enforce one or more corporate security policies. For example, a corporate
security policy may allow only packets using source addresses from within the trusted network
to access the Internet. Once this policy is written, you can develop an ACL that includes certain
statements which, when applied to a router interface, can implement this policy.
Cisco router security depends upon well-written ACLs to restrict access to router network
services, and to filter packets as they traverse the router.
Cisco routers support three types of IP ACLs: standard, extended, and enhanced IP ACLs. The
examples in the figure describe these two types:
5-130 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Standard IP ACLs: A standard ACL only allows you to permit or deny traffic from
specific IP addresses. The destination of the packet and the ports involved do not matter.
The first example allows traffic from all addresses in the range 192.168.3.0 to
192.168.3.255.
Extended IP ACLs: An IP extended ACL is a list of statements that are created in global
mode. This list can filter IP packets based on several attributes (protocol type, source and
IP address, destination IP address, source TCP or User Datagram Protocol [UDP] ports,
destination TCP or UDP ports, optional protocol type information for finer granularity of
control). The second example configures ACL 101 to permit traffic originating from any
address on the 172.31.9.0/24 network to any destination host port 80 (http). More on
extended ACLs will be presented later in the lesson.
Identifying ACLs
Using numbered ACLs is effective on smaller networks with more homogeneously defined
traffic. Because each ACL type is limited to an assigned range of numbers, it is easy to
determine the type of ACL that you are using. There can be up to 99 standard IP ACLs in the
range from 1 to 99. The extended IP ACL number range is assigned from 100 to 199, and from
2000 to 2699.
The table lists the number range and the type of associated ACL.
5-132 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Number Range Type of Associated ACL
You can also identify ACLs with an alphanumeric string (a name) rather than a number. Named
ACLs allow you to configure more ACLs in a router than if you were to use numbered ACLs
alone.
Note If you identify your ACL with a name rather than a number, the mode and command syntax
are slightly different. Currently, only packet and route filters can use a named ACL.
Before you start to develop any ACLs, consider these basic rules:
Base your ACLs on your security policy: Unless the ACL is anchored in a
comprehensive security policy, you cannot be absolutely certain it will effectively control
access in the way access needs to be controlled.
Write the ACL out: Never sit down at a router and start to develop an ACL without first
spending some time in design. The best ACL developers suggest that you write out a list of
things you want the ACL to accomplish. Starting with something as simple as, “This ACL
must block all Simple Network Management Protocol (SNMP) access to the router except
for the SNMP host at 10.1.1.15.”
Set up a development system: Whether you use your laptop PC or a dedicated server, you
need a place to develop and store your ACLs. Word processors or text editors of any kind
are suitable, as long as you can save the files in ASCII text format. Build yourself a library
of your most commonly used ACLs and use them as sources for new files. ACLs can be
pasted into the router running configuration (requires console or Telnet access), or can be
stored in a router configuration file. The system you choose should support TFTP to make
it easy to transfer any resulting configuration files to the router.
Note Hackers love to gain access to router configuration development systems or TFTP servers
that store ACLs. A hacker can discover a lot about your network from looking at these easily
read text files. For this reason, it is imperative that the system where you choose to develop
and store your router files be a secure system.
5-134 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Test: If possible, test your ACLs in a secure environment before placing them into
production. Testing is a common-sense approach to any router configuration changes. Most
enterprises maintain their own network test beds. While testing may appear to be an
unnecessary cost, over time it can save time and money.
Packet-filtering ACLs must be applied to a router interface to take effect. It is important to note
that ACLs are applied to an interface based on the direction of the data flow as shown in the
figure. You can apply the ACL to incoming packets (an “in” ACL) or outgoing packets (an
“out” ACL), as follows:
Inbound (in): The packet filtering ACL applies to packets received on the router interface.
Outbound (out): The packet filtering ACL applies to packets transmitted out of the router
interface. For outbound ACLs, you need to set up the filter only on one outgoing interface
rather than on individual incoming interfaces. This improves performance because only the
network you are protecting will force a lookup on the ACL.
5-136 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Using Traffic Filtering with ACLs
This topic explains the use of traffic filtering with ACLs to mitigate threats in a network.
Traffic Filtering
Always apply the following general rules when deciding how to handle router services, ports,
and protocols:
Disable unused services, ports, or protocols. In the case where no one, including the router
itself, needs to use an enabled service, port, or protocol, disable that service, port, or
protocol.
Limit access to services, ports, or protocols. In the case where a limited number of users or
systems require access to an enabled router service, port, or protocol, limit access to that
service, port, or protocol using ACLs.
ACLs are important because they act as traffic filters between the corporate (trusted) network
and the Internet (untrusted network). Using ACLs, the router enforces corporate security
policies by rejecting protocols and restricting port usage.
The table contains a list of common router services that can be used to gather information about
your network, or worse, can be used to attack your network. Unless your network configuration
specifically requires one of these services, the services should not be allowed to traverse the
router. Use ACLs to block these services inbound to the protected network and outbound to the
Internet.
Blocked Services
netbios-ns 137 TCP and UDP Back Orifice 31337 TCP and UDP
This table contains a listing of common services that reside either on the corporate protected
network or on the router itself. These services should be denied to untrusted clients using
ACLs.
Denied Services
snmp 161 TCP and UDP rsh, rcp, rdist, 514 TCP
rdump
5-138 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Filtering Network Traffic to Mitigate Threats
This topic describes how to implement ACLs to mitigate a range of threats.
“Be a good citizen and prevent your network from being spoofed.”
The example in the figure shows ACL 105 for router R2. This ACL permits only those packets
that contain source addresses from the 10.2.1.0/24 network and denies all others.
This ACL is applied inbound to the inside interface (e0/1) of router R2.
Note Cisco routers running Cisco IOS software Release 12.0 and later may use IP Unicast
Reverse Path Forwarding (RPF) verification as an alternative IP address spoof mitigation
mechanism.
5-140 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
DoS TCP SYN Attack Mitigation: Blocking External Access
TCP SYN attacks involve sending large numbers of TCP SYN packets from a spoofed source
into the internal network, which results in the flooding of the TCP connection queues of the
receiving nodes.
The ACL in the figure is designed to prevent inbound packets, with the SYN flag set, from
entering the router. However, the ACL does allow TCP responses from the outside network for
TCP connections that originated on the inside network (keyword established). The established
option is used for the TCP protocol only. It indicates return traffic from an established
connection. A match occurs if the TCP datagram has the ACK control bit set.
TCP Intercept protects internal hosts from SYN flood attacks by intercepting and validating
TCP connection requests before they reach the hosts. Valid connections (those connections
established within the configured thresholds) are passed on to the host. Invalid connection
attempts are dropped.
Note Because TCP Intercept examines every TCP connection attempt, TCP Intercept can impose
a performance burden on your routers. Always test for any performance problems before
using TCP Intercept in a production environment.
5-142 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
DoS Smurf Attack Mitigation
Smurf attacks consist of large numbers of ICMP packets sent to a router subnet broadcast
address using a spoofed source IP address from that same subnet. Some routers may be
configured to forward these broadcasts to other routers in the protected network, and this
process causes performance degradation. The ACL shown in the figure is used to prevent this
forwarding process and halt the smurf attack.
The ACLs in the figure block all IP packets originating from any host destined for the subnet
broadcast addresses specified (10.2.1.255 and 10.1.1.255).
Note Cisco IOS software Release 12.0 and later now have the no ip directed-broadcast feature
enabled by default, which prevents this type of ICMP attack. Therefore, you may not need to
build an ACL as shown here.
ICMP echo packets can be used to discover subnets and hosts on the protected network and can
also be used to generate DoS floods. ICMP redirect messages can be used to alter host routing
tables. Both ICMP echo and redirect messages should be blocked inbound by the router.
The ACL statement shown in the figure blocks all ICMP echo and redirect messages. As an
added safety measure, this ACL also blocks mask-request messages. All other ICMP messages
inbound to the 10.2.1.0/24 network are allowed.
5-144 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Filtering Outbound ICMP Messages
These ICMP messages are required for proper network operation and should be allowed
outbound:
Echo: Allows users to ping external hosts
Parameter problem: Informs host of packet header problems
Packet too big: Required for packet maximum transmission unit (MTU) discovery
Source quench: Throttles down traffic when necessary
As a general rule, you should block all other ICMP message types outbound.
The ACL shown in the figure permits all of the required ICMP messages inbound to the e0/1
interface while denying all others.
R2(config)#access-list 120 deny udp any any range 33400 34400 log
R2(config)#access-list 120 permit ip any 10.1.1.0 0.0.0.255 log
R2(config)#interface e0/1
R2(config-if)#ip access-group 120 in
R2(config-if)#end
As a rule, you should block all inbound traceroute UDP messages, as shown in the figure (UDP
ports 33400 to 34400).
5-146 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Mitigating Distributed DoS with ACLs
This topic describes how to configure router ACLs to help reduce the effects of distributed DoS
attacks.
5-148 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Mitigate Distributed DoS Using Martian Filters
RFC 2827 recommends that ISPs police their customer traffic by dropping traffic entering their
networks that is coming from a source address not legitimately in use by the customer network.
The filtering includes, but is not limited to, traffic whose source address is a “Martian
address”—a reserved address that includes any address within 0.0.0.0/8, 10.0.0.0/8,
127.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 224.0.0.0/4, or 240.0.0.0/4. RFC 3704 is the update
to RFC 2827.
The reasoning behind the ingress filtering procedure is that distributed DoS attacks frequently
spoof source addresses of other systems, placing a random number in the field. In some attacks,
this random number is deterministically within the target network, simultaneously attacking
one or more machines and causing those machines to attack others with ICMP messages or
other traffic. Attacked sites can protect themselves by proper filtering, by verifying that their
prefixes are not used in source addresses of packets received from the Internet. In other attacks,
the source address is literally a random 32-bit number, resulting in the source of the attack
being difficult to trace. If traffic leaving an edge network and entering an ISP can be limited to
traffic being legitimately sent, attacks can be somewhat mitigated. Traffic with random or
improper source addresses can be suppressed before it does significant damage, and attacks can
be readily traced back to at least their source networks.
The TRIN00 attack sets up communications between clients, handlers, and agents using these
ports:
1524 tcp
27665 tcp
27444 udp
31335 udp
The mitigation tactic for the TRIN00 attack, as well as for the other DoS attacks considered in
this topic, is to block both interfaces in the in direction. The goal is to prevent infected outside
systems from sending messages to an internal network, and to prevent any infected internal
systems from sending messages out of an internal network to the vulnerable ports.
For example, in the figure, the command access-list 190 deny tcp any any eq 1524 log
translates to “ACL number 190 will deny any TCP traffic going from any network to any
network which has the TCP port equivalent of 1524 and this will be logged.”
If you want to be specific about the exact incoming and outgoing network, those ports need to
be specified. For example, if the IP address of the inside network is 10.0.1.0 and you want to
block all traffic going from this inside network to the Internet, the command would be access-
list 190 deny tcp 10.0.1.0 0.0.0.255 any eq 1524 log.
However, blocking these ports may have an impact on regular network users because it may
block some high port numbers that may be used by legitimate network clients. You may wish to
wait to block these port numbers until a particular threat presents itself.
Note The permit ACL entry to allow the desired traffic is not shown in this example, for simplicity.
5-150 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Distributed DoS Attack Mitigation: Stacheldraht
Stacheldraht is a distributed DoS tool that appeared in 1999 and combines features of TRIN00
and Tribe Flood Network (TFN). Stacheldraht also contains some advanced features, such as
encrypted attacker-master communication and automated agent updates. The possible attacks
are similar to those of TFN; namely, ICMP flood, SYN flood, UDP flood, and smurf attacks.
A Stacheldraht attack sets up communication between clients, handlers, and agents using these
ports:
16660 tcp
65000 tcp
The figure shows an example that mitigates a Stacheldraht distributed DoS attack by blocking
traffic on these ports.
Note The ports listed above are the default ports for the Stachedraht tool. Use these ports for
orientation and example only, because the port numbers can easily be changed.
Note The permit ACL entry to allow the desired traffic is not shown in this example, for simplicity.
The figure shows an example that mitigates a Trinity v3 distributed DoS attack by blocking
traffic on TCP port 33270.
Note The permit ACL entry to allow the desired traffic is not shown in this example, for simplicity.
5-152 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Distributed DoS Attack Mitigation: SubSeven
Depending on the version, an attacker will try to exploit TCP ports 1243, 2773, 6711, 6712,
6713, 6776, 7000, 7215, 27374, 27573, and 54283.
The figure shows an example that mitigates a SubSeven distributed DoS attack by blocking
traffic on these ports:
TCP—Range 6711 to 6712
TCP—6776
TCP—6669
TCP—2222
TCP—7000
Note The permit ACL entry to allow the desired traffic is not shown in this example, for simplicity.
This is an example of a possible configuration for Router R2 in the reference network. This
partial configuration file contains several ACLs that contain most of the ACL features
explained in this lesson. View this partial configuration as an example of how to integrate
multiple ACL policies into a few main router ACLs.
The partial configuration file in the table shows how to combine many ACL functions into two
or three larger ACLs.
Configuration Description
5-154 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Configuration Description
access-list 126 deny ip 10.2.1.0 0.0.0.255 any log Prevent any IP packets
! containing the source
address of any internal
hosts or networks
inbound to the private
network.
access-list 126 permit tcp any 10.2.1.0 0.0.0.255 Permit TCP return
established traffic to the remote
! access LAN.
access-list 126 deny icmp any any echo log Deny ICMP echo
access-list 126 deny icmp any any redirect log requests, ICMP
redirects, and mask
access-list 126 deny icmp any any mask-request log requests, and permit
access-list 126 permit icmp any 10.2.1.0 0.0.0.255 all other ICMP traffic to
the remote access
! LAN.
access-list 126 deny tcp any any eq 1524 log Block TRIN00,
access-list 126 deny tcp any any eq 27665 log Stacheldraht, and
Trinity.
access-list 126 deny tcp any any eq 16660 log
access-list 126 deny tcp any any eq 65000 log
access-list 126 deny tcp any any eq 39168 log
access-list 126 deny tcp any any eq 65000 log
!
access-list 126 deny udp any any eq 27444 log Block the TRIN00 UDP
access-list 126 deny udp any any eq 31335 log ports.
!
access-list 126 deny udp any any range 33400 34400 Deny tracing of the
log remote access LAN.
!
access-list 126 permit udp any eq 53 10.2.1.0 Allow return DNS
0.0.0.255 gt 1023 traffic.
!
access-list 126 deny tcp any range 0 65535 any Deny all remaining
range 0 65535 log traffic and provide
access-list 126 deny udp any range 0 65535 any detailed logging
range 0 65535 log information.
access-list 128 permit icmp 10.2.1.0 0.0.0.255 any Permit needed ICMP
echo messages.
access-list 128 permit icmp 10.2.1.0 0.0.0.255 any
parameter-problem
access-list 128 permit icmp 10.2.1.0 0.0.0.255 any
packet-too-big
access-list 128 permit icmp 10.2.1.0 0.0.0.255 any
source-quench
!
access-list 128 deny tcp any any range 1 19 log Block access to certain
access-list 128 deny tcp any any eq 43 log outside TCP services.
access-list 128 deny tcp any any eq 93 log
access-list 128 deny tcp any any range 135 139 log
access-list 128 deny tcp any any eq 445 log
access-list 128 deny tcp any any range 512 518 log
access-list 128 deny tcp any any eq 540 log
!
access-list 128 permit tcp 10.2.1.0 0.0.0.255 gt Permit access to all
1023 any lt 1024 remaining outside TCP
access-list 128 permit udp 10.2.1.0 0.0.0.255 gt services, to DNS
1023 any eq 53 (UDP/53), and allow
tracing outside
access-list 128 permit udp 10.2.1.0 0.0.0.255 any destinations.
range 33400 34400 log
!
5-156 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Configuration Description
access-list 128 deny tcp any range 0 65535 any Deny all remaining
range 0 65535 log access and provide
access-list 128 deny udp any range 0 65535 any detailed logging.
range 0 65535 log
access-list 128 deny ip any any log
ACL Caveats
Statement Caveat
Implicit deny all You may not see this statement but it does exist.
5-158 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
ACL Caveats (Cont.)
Statement Caveat
Adding statements: New statements added to an existing ACL are always appended to the
bottom of the ACL. Because of the inherent top-down statement evaluation order of ACLs,
these new entries may render the ACL unusable. In these cases, a new ACL must be
created (with the correct statement ordering). Delete the old ACL and assign the new ACL
to the router interface.
Special packets: Router-generated packets, such as routing table updates, are not subject to
outbound ACL statements on the source router. If filtering these types of packets is part of
your security policy, then they must be acted upon by inbound ACLs on adjacent routers or
through other router filter mechanisms using ACLs.
Extended ACL placement: Extended ACLs that are placed on routers too far from the
source being filtered can adversely impact packets flowing to other routers and interfaces.
Always consider placing extended ACLs on routers as close as possible to the source being
filtered.
Standard ACL placement: Because standard ACLs filter packets based on the source
address, placing these ACLs too close to the source can adversely impact packets destined
to other destinations. Always place standard ACLs as close to the destination as possible.
Summary
5-160 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Lesson 5
Objectives
Upon completing this lesson, you will be able to explain the procedures to securely implement
management and reporting features of syslog, SSH, SNMPv3, and NTP. This ability includes
being able to meet these objectives:
Describe the factors you must consider when planning the secure management and
reporting configuration of network devices
Describe the factors that affect the architecture of secure management and reporting in
terms of in-band and OOB information paths
Describe the steps used to configure an SSH server for secure management and reporting
Describe how the syslog function plays a key role in network security
Describe how to configure syslog on Cisco routers using syslog router commands
Describe the security features of SNMPv3
Describe how to configure SNMPv3 on a Cisco IOS router or a switch
Configure an NTP client including authentication in client mode
Configure a Cisco router as an NTP server
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Secure Management and Reporting Planning
Considerations
This topic explains the factors you must consider when planning the secure management and
reporting configuration of network devices.
Configuring logging for your Cisco routers is a straightforward operation when your network
contains only a few Cisco routers. However, logging and reading information from hundreds of
devices can prove to be a challenging proposition. Too much information can be as bad as too
little, and can raise these important questions:
Which logs are most important?
How do you separate important messages from mere notifications?
How do you ensure that logs are not tampered with in transit?
How do you ensure that time stamps match each other when multiple devices report the
same alarm?
What information is needed if log data is required for a criminal investigation?
How do you deal with the volume of messages that can be generated by a large network?
Securing administrative access and device configurations is also a straightforward operation for
smaller Cisco router networks. However, managing administrative access and device
configurations for a large number of devices can raise these questions:
How do you securely manage many devices in many locations?
How can you track and troubleshoot changes on devices when attacks or network failures
occur?
5-162 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Each of these issues is specific to your needs. To identify the priorities of reporting and
monitoring, input from management, as well as from the network and security teams, is
required. The implemented security policy should also play a large role in answering these
questions.
From a reporting standpoint, most networking devices can send syslog data when you are
troubleshooting network problems or security threats. You can send this data to your syslog
analysis host from any device whose logs you wish to view. This data can be viewed in real
time, on demand, or in scheduled reports. Depending on the device involved, you can choose
various logging levels to ensure that the correct amount of data is sent to the logging device.
You must also flag device log data within the analysis software to permit granular viewing and
reporting. For example, during an attack, the log data provided by Layer 2 switches might not
be as interesting as the data provided by the intrusion detection system (IDS).
To ensure that log messages are time-synchronized, clocks on hosts and network devices must
be synchronized. For devices that support it, NTP provides a way to ensure that accurate time is
kept on all devices. When you are dealing with an attack, seconds matter, because it is
important to identify the order in which a specified attack occurred.
Configuration change management is another issue related to secure management. When a
network is under attack, it is important to know the state of critical network devices and when
the last known modifications occurred. Creating a plan for change management should be a part
of your comprehensive security policy, but, at a minimum, you should record changes using
authentication systems on the devices, and archive configurations via FTP or TFTP.
The figure shows a management module with two network segments separated by a Cisco IOS
router that acts as a firewall and a virtual private network (VPN) termination device. The
segment outside the firewall connects to all the devices that require management. The segment
inside the firewall contains the management hosts themselves and the Cisco IOS routers that act
as terminal servers.
Information flow between management hosts and the managed devices can take two paths:
In-band: Information flows across the enterprise production network or the Internet (or
both).
OOB: Information flows within a network on which no production traffic resides.
The connection to the production network is only provided for selective Internet access, limited
in-band management traffic, and IPsec-protected management traffic from predetermined hosts.
In-band management occurs only when a management application itself does not function out-
of-band, or when the Cisco device being managed does not physically have enough interfaces
to support the normal management connection. It is this latter case that employs IPsec tunnels.
The Cisco IOS firewall is configured to allow syslog information into the management
segment, as well as Telnet, SSH, and SNMP, if these services are first initiated by the inside
network.
Both management subnets operate under an address space that is completely separate from the
rest of the production network. This practice ensures that the management network is not
advertised by any routing protocols, and it enables the production network devices to block any
traffic from the management subnets that appear on the production network links.
5-164 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Any in-band management or Internet access occurs through a Network Address Translation
(NAT) process on the Cisco IOS router that translates the nonroutable management IP
addresses to previously determined production IP address ranges.
The management module provides configuration management for nearly all devices in the
network using two primary technologies:
Cisco IOS routers acting as terminal servers: The routers provide a reverse Telnet
function to the console ports on the Cisco devices throughout the enterprise.
Dedicated management network segment: More extensive management features (such as
software changes, content updates, log and alarm aggregation, and SNMP management) are
provided through the dedicated management network segment.
Because the management network has administrative access to nearly every area of the
network, it can be a very attractive target to hackers. The management module was built with
several technologies designed to mitigate those risks.
The first primary threat is a hacker attempting to gain access to the management network itself.
This threat can be mitigated only through effective deployment of security features in the
remaining enterprise modules.
The other threats assume that the primary line of defense has been breached. To mitigate the
threat of a compromised device, access control is implemented at the firewall and at every other
possible device to prevent exploitation of the management channel. A compromised device
cannot even communicate with other hosts on the same subnet because private VLANs
(PVLANs) on the management segment switches force all traffic from the managed devices
directly to the Cisco IOS firewall, where filtering takes place. Password sniffing reveals only
useless information because of the One Time Password (OTP) environment. Use SNMPv3
wherever possible because SMNPv3 supports authentication and encryption.
SNMP management has its own set of security needs. Keeping SNMP traffic on the
management segment allows the traffic to traverse an isolated segment when it pulls
management information from devices. In Cisco self-defending network topology, SNMP
management only pulls information from devices rather than being allowed to push changes.
To ensure that management information is pulled, each device is configured with a read-only
string. You may configure SNMP read-write when using an OOB network, but be aware of the
increased security risk of a plaintext string allowing modification of device configurations.
Proper aggregation and analysis of syslog information is critical for proper management of a
network. From a security perspective, syslog provides important information about security
violations and configuration changes. Depending on the device in question, different levels of
syslog information might be required. Having full logging with all messages sent might provide
too much information for an individual or syslog analysis algorithm to sort. Logging for the
sake of logging does not improve security.
Information Paths
From an architectural perspective, providing OOB management of network systems is the best
first step in any management and reporting strategy. Devices should have a direct local
connection to such a network wherever possible; and where this is not possible because of
geographic or system-related issues, the device should connect via a private encrypted tunnel
over the production network. Such a tunnel should be preconfigured to communicate only
across specific ports required for management and reporting. The tunnel should also be locked
down so that only appropriate hosts can initiate and terminate the tunnel.
OOB management is not always desirable. Often, the decision depends on the type of
management application that you are running, and the protocols that are required. For example,
consider a management tool whose goal is determining the reachability of all devices on the
production network. If a critical link between two core switches fails, you would want this
management console to alert an administrator. If this management application is configured to
use an OOB network, it may never determine that the link has failed, because the OOB network
makes all devices appear to be attached to a single network. It is preferable to run this kind of
management application in-band. In-band management must be configured as securely as
possible.
5-166 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
In-Band Management Considerations
This section describes issues to be considered when designing an in-band management solution.
When in-band management of a device is required, you should consider these questions:
Which management protocols does the device support? Devices with IPsec should be
managed by simply creating a tunnel from the management network to the device. This
setup allows many insecure management protocols to flow over a single encrypted tunnel.
When IPsec is not possible because it is not supported on a device, other less-secure
options must be chosen. For configuration of the device, SSH or Secure Sockets Layer
(SSL) can often be used instead of Telnet to encrypt configuration modifications made to a
device. These protocols can sometimes also be used to push and pull data to and from a
device instead of insecure protocols, such as FTP and TFTP. Often, however, TFTP is
required on Cisco equipment to back up configurations or to update software versions. This
fact leads to the second question.
Does the management channel need to be active at all times? If not, temporary holes can
be placed in a firewall while the management functions are performed, and then later
removed. This process, however, does not scale with a large number of devices, and should
be used sparingly, if at all, in enterprise deployments. If the channel needs to be active at all
times, such as with SNMP, the third question should be considered.
Do you really need this management tool? Often, SNMP management tools are used on
the inside of a network to ease troubleshooting and configuration. However, SNMP should
be treated with the utmost care because the underlying protocol has its own set of security
vulnerabilities. If SNMP is required, consider providing read-only access to devices via
SNMP, and treat the SNMP community string with the same care you might use for a root
password on a critical UNIX host. By introducing SNMP into your production network,
you introduce a potential vulnerability into your environment. And finally, if you do need
the tool, use SNMPv3 authentication and encryption features.
As a general rule, OOB management is appropriate for large enterprise networks. In smaller
networks, in-band management is recommended as a means of achieving a more cost-effective
security deployment. In smaller architectures, management traffic flows in-band in all cases,
and is made as secure as possible by using tunneling protocols and secure variants to insecure
management protocols (for example, SSH is used whenever possible instead of Telnet).
To ensure that log messages are time-synchronized, clocks on hosts and network devices must
be synchronized. For devices that support it, NTP provides a way to ensure that accurate time is
kept on all devices. When you are dealing with an attack, seconds matter, because it is
important to identify the order in which a specified attack occurred. Synchronization of the
clocks within a network is critical for digital certificates and for correct interpretation of events
within syslog data. A secure method of providing clocking for the network is for network
administrators to implement their own master clocks. The private network should then be
synchronized to Coordinated Universal Time (UTC) via satellite or radio. However, clock
sources are available that synchronize via the Internet. Such clocks should be used by network
administrators who do not wish to implement their own master clocks because of cost or other
reasons.
An attacker could attempt a denial of service (DoS) attack on a network by sending bogus NTP
data across the Internet in an attempt to change the clocks on network devices so that digital
certificates are invalid. Further, an attacker could attempt to confuse a network administrator
during an attack by disrupting the clocks on network devices. This scenario would make it
difficult for the network administrator to determine the order of syslog events on multiple
devices. NTP version 3 and above supports a cryptographic authentication mechanism between
peers. The use of the authentication mechanism, as well as the use of access control lists
(ACLs) that specify which network devices are allowed to synchronize with other network
devices, is recommended to help mitigate such an attack.
5-168 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
The network administrator should weigh the cost benefits of pulling the clock time from the
Internet with the possible risk of allowing unsecured packets through the firewall. Many NTP
servers on the Internet do not require any authentication of peers. Therefore, the network
administrator must trust that the clock itself is reliable, valid, and secure. NTP uses User
Datagram Protocol (UDP) port 123.
Austin2#configure terminal
Austin2(config)#ip domain-name cisco.com
Austin2(config)#crypto key generate rsa general-keys modulus 1024
You should use SSH instead of Telnet to manage your Cisco routers whenever possible. SSH
version 1 (SSHv1) is supported in Cisco IOS software Release 12.1(1)T and later, while SSH
version 2 (SSHv2) is supported in Cisco IOS software Release 12.3(4)T and later. Cisco routers
configured for SSH act as SSH servers. You must provide an SSH client, such as PuTTY,
OpenSSH, or TeraTerm, for the administrator workstation that you wish to use to configure and
manage routers using SSH.
Note Cisco routers with Cisco IOS software Releases 12.1(3)T and later can act as SSH clients
as well as SSH servers. This means that you could initiate an SSH client-to-server session
from your router to a central SSH server system. SSH employs strong encryption to protect
the SSH client-to-server session. Unlike Telnet, where anyone with a sniffer can see exactly
what you are sending and receiving from your routers, SSH encrypts the entire session.
Complete these tasks before configuring your routers for SSH server operations:
Ensure that the target routers are running a Cisco IOS software Release 12.1(1)T image or
later with the IPsec feature set. Only Cisco IOS software images containing the IPsec
feature set support an SSH server.
Ensure that the target routers are configured for local authentication, AAA server for
username/password authentication, or both.
Ensure that each of the target routers has a unique hostname.
Ensure that each of the target routers is using the correct domain name of your network.
5-170 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Complete these steps to configure your Cisco router to support SSH server:
Step 1 Configure the IP domain name of your network using the ip domain-name
command in global configuration mode:
Austin2(config)#ip domain-name cisco.com
Step 2 Generate keys to be used with SSH by generating the RSA keys using the crypto
key generate rsa command in global configuration mode:
Austin2(config)#crypto key generate rsa general-keys modulus
1024
Note It is recommended that you use a minimum key length of modulus 1024.
Step 3 Optionally, to display the generated keys, use the show crypto key mypubkey rsa
command in privileged EXEC mode.
Step 4 Configure the time that the router waits for the SSH client to respond using the ip
ssh timeout command in global configuration mode:
Austin2(config)#ip ssh timeout 120
Step 5 Configure the SSH retries using the ip ssh authentication-retries command in
global configuration mode:
Austin2(config)#ip ssh authentication-retries 4
Caution Be sure to disable Telnet transport input on all of the router vty lines or the router will
continue to allow insecure Telnet sessions.
Implementing a router logging facility is an important part of any network security policy.
Cisco routers can log information regarding configuration changes, ACL violations, interface
status, and many other types of events. Cisco routers can direct log messages to several
different facilities. You should configure the router to send log messages to one or more of the
following:
Console: Console logging is used when modifying or testing the router while it is
connected to the console. Messages sent to the console are not stored by the router, and are,
therefore, not very valuable as security events.
Terminal lines: Enabled EXEC sessions can be configured to receive log messages on any
terminal lines. Similar to console logging, this type of logging is not stored by the router
and is, therefore, only valuable to the user on that line.
Memory buffer: You may direct a router to store log messages in router memory.
Buffered logging is a bit more useful as a security tool, but has the drawback of having
events cleared whenever the router is booted.
SNMP traps: Certain router events may be processed by the router SNMP agent, and
forwarded as SNMP traps to an external SNMP host. This is a viable security logging
facility, but requires the configuration and maintenance of an SNMP system.
Syslog: Cisco routers can be configured to forward log messages to an external syslog
service. This service may reside on any number of servers, including Microsoft Windows
and UNIX-based systems. Syslog is the most popular message logging facility because it
provides long-term log storage capabilities and a central location for all router messages.
5-172 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Syslog Systems
Syslog is a standard for logging system events.
Syslog Systems
• Syslog server: A host that accepts and processes log messages from one or
more syslog clients.
• Syslog client: A host that generates log messages and forwards them to a
syslog server.
© 2006 Cisco Systems, Inc. All rights reserved. ISCW v1.0—5-13
Note Using router logs can become very difficult if your router clocks are not running the proper
time. It is recommended that you use an NTP facility to ensure that all of your routers are
operating at the correct time.
The lower the level number, the higher the severity level, as shown in the table.
0 LOG_EMERG A panic condition normally broadcasted Cisco IOS software could not load
to all users
5 LOG_NOTICE Conditions that are not error conditions, Interface changed state, up or down
but should possibly be handled specially
Note When entering logging levels in commands in Cisco IOS software Release 11.3 and earlier,
you must specify the level name. Cisco IOS software Release 12.0 and later support using
the level number or the level name, or both the number and the name.
5-174 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Log Message Format
This section describes the log message format.
Log Message
Name and
Severity Level
Note The log message name is not the same as a severity level name.
Configuring Syslog
Router(config)#
Router(config)#
Router(config)#
logging Parameters
Parameter Description
Step 2 (Optional) Set the log severity (trap) level: Setting the log severity level limits the
error messages sent to syslog servers to only those at the specified level. Default
value is severity level 6. Use the logging trap command in global configuration
mode to set the severity level.
5-176 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
logging trap Parameter
Parameter Description
Step 3 (Optional) Set the syslog facility: You must configure the syslog facility in which
error messages are sent. The eight commonly used syslog facility names for Cisco
routers are local0 through local7. Default value is facility local7. Use the logging
facility command in global configuration mode to set the syslog facility.
Parameter Description
Router(config)#
Router(config)#
logging on
5. Enables logging
Step 4 (Optional) Set the source interface: By default, syslog messages are sent using the
IP address of the source interface. You should specify the source IP address of
syslog packets, regardless of the interface where the packets actually exit the router.
Use the logging source-interface command in global configuration mode to set the
source interface.
Parameter Description
Step 5 Enable logging: Make sure that the router logging process is enabled using the
logging on command in global configuration mode. The logging on command has
no arguments or keywords.
5-178 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Example: Syslog Implementation
The figure contains an example of configuring syslog for router R3 using the commands
previously described.
R3(config)#logging 10.2.2.6
R3(config)#logging trap informational
R3(config)#logging source-interface loopback 0
R3(config)#logging on
In this example, the administrator wishes to log all events that occur on the router except the
debugging (level 7) information. An example of an informational level (level 6) event is an
ACL hit. The router will send the messages from level 6 and all more critical levels (0–5) to the
syslog server with the IP address 10.2.2.6.
SNMP was developed to manage nodes (servers, workstations, routers, switches, hubs, and
security appliances) on an IP network. All versions of SNMP are application layer protocols
that facilitate the exchange of management information between network devices. SNMP is
part of the TCP/IP protocol suite. SNMP enables network administrators to manage network
performance, find and solve network problems, and plan for network growth.
SNMPv1 and SNMPv2 are based on three concepts:
Managers: In any configuration, at least one manager node runs SNMP management
software.
Agents: Network devices that need to be managed, such as bridges, switches, routers,
servers, and workstations, are equipped with an agent software module.
MIB: The agent is responsible for providing access to a local MIB of objects that reflects
the resources and activity at its node.
The SNMP manager can retrieve (get) information from the agent, or change (set) information
in the agent. Sets can change variables (settings and configuration) in the agent device, or
initiate actions in devices. A reply to a set indicates the new setting in the device. For example,
a set can cause a router to reboot, or to send or receive a configuration file.
Network devices send “traps” to the SNMP manager to indicate that an event or incident has
occurred within the network device.
The actions gets and sets are the vulnerabilities that open SNMP to an attack.
5-180 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Community Strings
SNMPv1 and SNMPv2 use a community string to access router SNMP agents.
Community Strings
SNMP community strings act like passwords. An SNMP community string is a text string used
to authenticate messages between a management station and an SNMP engine:
If the manager sends one of the correct read-only community strings, it can get information,
but not set information in an agent.
If the manager uses one of the correct read-write community strings, it can get or set
information in the agent.
In effect, having read-write access is equivalent to having the enable password.
SNMP agents accept commands and requests only from SNMP systems using the correct
community string. By default, most SNMP systems use a community string of “public.” If you
configure your router SNMP agent to use this commonly known community string, anyone
with an SNMP system is able to read the router MIB. Because router MIB variables can point
to things like routing tables and other security-critical parts of the router configuration, it is
important that you create your own custom SNMP community strings.
Definitions:
• Security model is a security strategy used by the SNMP agent
• Security level is the permitted level of security within a security model
A security model is an authentication strategy that is set up for a user and the group in which
the user resides. Currently, Cisco IOS software supports three security models: SNMPv1,
SNMPv2, and SNMPv3.
A security level is the permitted level of security within a security model. The security level is
a type of security algorithm performed on each SNMP packet. There are three security levels:
noAuth: Authenticates a packet by a string match of the user name or community string.
Auth: Authenticates a packet by using either the Hash-based Message Authentication
Codes (HMACs) with Message Digest 5 (MD5) (RFC 2104) or Secure Hash Algorithms
(SHAs).
Priv: Authenticates a packet by using either the HMAC MD5 or SHAs, and encrypts the
packet using the Cipher Block Chaining-Data Encryption Standard (CBC-DES) (DES-56)
algorithm.
SNMPv3 adds security and remote configuration capabilities to the previous versions. SNMPv3
provides three security model and security level options. The table in the figure identifies the
combinations of security models and levels.
5-182 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
SNMPv3 Architecture
In its natural evolution, the current version of SNMPv3 addresses the vulnerabilities of earlier
versions by including three important services: authentication, privacy, and access control.
SNMPv3 Architecture
Each managed node and the NMS is a single entity. There are two types of entities, each
containing different applications:
Managed node SNMP entities: The managed node SNMP entity includes an SNMP agent
and an SNMP MIB. The agent implements the SNMP protocol, and allows a managed node
to provide information to the NMS and accept instructions from it. The MIB defines the
information that can be collected and used to control the managed node. Information
exchanged using SNMP takes the form of objects from the MIB.
SNMP NMS entities: The SNMP entity on an NMS includes an SNMP manager and
SNMP applications. The manager implements the SNMP protocol, and collects information
from managed nodes and sends instructions to them. The SNMP applications are software
applications used to manage the network.
5-184 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
SNMPv3 Features and Benefits
The figure summarizes the features and benefits of SNMPv3.
It is strongly recommended that all network management systems use SNMPv3 rather than
SNMPv1 or SNMPv2.
Four configuration tasks are used to set up SNMPv3 communications on a Cisco IOS router:
1. Configuring the SNMP-server engine ID to identify the devices for administrative purposes
2. Configuring the SNMP-server group names for grouping SNMP users
3. Configuring the SNMP-server users to define usernames that reside on hosts that connect to
the local agent
4. Configuring the SNMP-server hosts to specify the recipient of a notification operation (trap
or inform)
5-186 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Configuring the SNMP-Server Engine ID
To configure a name for either the local or remote SNMP engine on the router, use the snmp-
server engineID global configuration command.
To remove a specified SNMP engine ID, use the no form of this command.
Router(config)#
snmp-server engineID [local engineid-string] | [remote
ip-address udp-port port-number engineid-string]
• Configures names for both the local and remote SNMP engine
(or copy of SNMP) on the router
Parameter Description
The SNMP engine ID is a unique string used to identify the device for administration purposes.
You do not need to specify an engine ID for the device; a default string is generated using a
Cisco enterprise number (1.3.6.1.4.1.9) and the MAC address of the first interface on the
device.
5-188 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Configuring the SNMP-Server Group Names
To configure a new SNMP group, or a table that maps SNMP users to SNMP views, use the
snmp-server group global configuration command. This command is used to group SNMP
users residing on hosts that connect to the local SNMP agent.
Router(config)#
snmp-server group groupname {v1 | v2c | v3 {auth | noauth
| priv}} [read readview] [write writeview] [notify
notifyview] [access access-list]
An SNMP view is a mapping between SNMP objects and the access rights available for those
objects. An object can have different access rights in each view. Access rights indicate whether
the object is accessible by either a community string or a user.
snmp-server group groupname {v1 | v2c | v3 {auth | noauth | priv}} [read readview] [write
writeview] [notify notifyview] [access access-list]
Parameter Description
v2c The second least secure of the possible USMs. It allows for the
transmission of informs and counter 64, which allows for integers
twice the width of what is normally allowed.
read (Optional) The option that allows you to specify a read view.
write (Optional) The option that allows you to specify a write view.
notify (Optional) The option that allows you to specify a notify view.
The example in the figure shows how to define a group johngroup for SNMP v3, using
authentication but not privacy (encryption).
The other example shows how to define a group billgroup for SNMP v3, using both
authentication and privacy.
5-190 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Configuring the SNMP-Server Users
To add a new user to an SNMP group, use the snmp-server user global configuration
command.
Router(config)#
snmp-server user username groupname [remote ip-address
[udp-port port]] {v1 | v2c | v3 [encrypted] [auth {md5 |
sha} auth-password [priv des56 priv-password]]} [access
access-list]
To configure a user existing on a remote SNMP device, specify the IP address or port number
for the remote SNMP device where the user resides. Also, before you configure remote users
for that device, configure the SNMP engine ID, using the command snmp-server engineID
with the remote option. The SNMP engine ID of the remote device is needed when computing
the authentication and privacy digests from the password. If the remote engine ID is not
configured first, the configuration command will fail.
snmp-server user username groupname [remote ip-address [udp-port port]] {v1 | v2c | v3
[encrypted] [auth {md5 | sha} auth-password [priv des56 priv-password]]} [access access-
list]
Parameter Description
username The name of the user on the host that connects to the agent.
ip-address (Optional) The IP address of the device that contains the remote
copy of SNMP.
port (Optional) This is a UDP port number that the host uses. The
default value is 162.
v2c The second least secure of the possible SNMP versions. It allows
for the transmission of informs and counter 64, which allows for
integers twice the width of what is normally allowed.
The example in the figure shows how to define a user John, belonging to the group johngroup.
Authentication uses the password john2passwd and no privacy (no encryption) is applied. Then
a user Bill, belonging to the group billgroup, is defined using the password bill3passwd and
privacy (encryption) is applied.
5-192 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Configuring the SNMP-Server Hosts
To specify the recipient of an SNMP notification operation, use the snmp-server host global
configuration command. To remove the specified host, use the no form of this command.
Router(config)#
snmp-server host host-address [traps | informs] [version
{1 | 2c | 3 [auth | noauth | priv]}] community-string
[udp-port port] [notification-type]
SNMP notifications can be sent as traps or inform requests. Traps are unreliable because the
receiver does not send acknowledgments when it receives traps. The sender cannot determine if
the traps were received.
An SNMP entity that receives an inform request acknowledges the message with an SNMP
response protocol data unit (PDU). However, informs consume more resources in the agent and
in the network.
If you do not enter an snmp-server host command, no notifications are sent. In order to
configure the router to send SNMP notifications, you must enter at least one snmp-server host
command. If you enter the command with no keywords, all trap types are enabled for the host.
To be able to send an “inform,” perform these steps:
Step 1 Configure a remote engine ID.
Step 2 Configure a remote user.
Step 3 Configure a group on a remote device.
Step 4 Enable traps on the remote device.
Step 5 Enable the SNMP manager.
snmp-server host host-address [traps | informs] [version {1 | 2c | 3 [auth | noauth | priv]}]
community-string [udp-port port] [notification-type]
Parameter Description
host-address The address of the recipient for which the traps are targeted.
traps (Optional) Specifies that the type of notification being sent should
be a trap.
informs (Optional) Specifies that the type of notification being sent should
be an inform.
community-string This is a string that is used as the name of the community and it
acts as a password by controlling access to the SNMP
community. This string can be set using the snmp-server host
command, but it is recommended that you set the string using the
snmp-server community command before using the snmp-
server host command.
port (Optional) This is a UDP port number that the host uses. The
default is 162.
notification-type (Optional) This is the type of trap to be sent to the host. If no type
is specified, all traps are sent.
For a full list refer to the SNMPv3 Configuration Guide. Some of the types of traps are listed in
the table.
Types of Traps
Trap Description
syslog Sends error message traps (Cisco Syslog MIB). Specify the level
of messages to be sent with the logging history level command.
5-194 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
The example in the figure shows how to send configuration informs to the 10.1.1.1 remote host.
Note There are several more snmp-server commands available that are described in the Cisco
IOS Master Commands List, Release 12.4 at:
http://www.cisco.com/univercd/cc/td/doc/product/software/ios124/124mindx/124index.htm.
The router Trap_sender is configured to send traps to the NMS host with the IP address
11.11.11.11. The traps are encrypted using the credentials configured for the local user
snmpuser belonging to the group snmpgroup. The Trap_sender router sends traps related to
CPU, configuration, and SNMP. The trap packets are sourced from the router loopback 0
interface.
The router Walked_device is configured so that the NMS host can read the MIBs on the local
device. The NMS server will need to use the username credentials configured on the
Walked_device (snmpuser with respective authentication and encryption passwords) to get
access to the SNMP information of the router.
5-196 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Configuring NTP Client
This topic describes the procedure to configure an NTP client, including authentication in client
mode.
Understanding NTP
NTP is used to synchronize the clocks in the entire network. Many features depend on it, such
as accurate time information in syslog messages, certificate-based authentication in VPNs,
ACLs with time range configuration, key rollover in routing protocol authentication (Enhanced
Interior Gateway Routing Protocol [EIGRP], Routing Information Protocol [RIP]).
Most Cisco routers have two clocks: a battery-powered system calendar in the hardware and a
software-based system clock. These two clocks are managed separately.
The heart of the time service is the software-based system clock. This clock runs from the
moment the system starts up and keeps track of the current date and time. The system clock can
be set from a number of sources and in turn can be used to distribute the current time through
various mechanisms to other systems. When a router with a system calendar is initialized or
rebooted, the system clock is set based on the time in the internal battery-powered system
calendar. The system clock can then be set manually or by using NTP.
The system clock keeps track of time internally based on Coordinated Universal Time (UTC),
also known as Greenwich Mean Time (GMT). You can configure information about the local
time zone and summer time (daylight savings time) so that the time is displayed correctly
relative to the local time zone.
The system clock keeps track of whether the time is “authoritative” or not (that is, whether it
has been set by a time source considered to be authoritative). If it is not authoritative, the time
will be available only for display purposes and will not be redistributed.
The NTP is a protocol designed to time-synchronize a network of machines. NTP runs over
UDP, which in turn runs over IP.
5-198 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Configuring NTP Authentication
NTP services are enabled on all interfaces by default. If you want to disable NTP on a specific
interface, use the ntp disable command in the interface configuration mode. All NTP
configuration tasks discussed in this lesson are optional.
If you want to authenticate the associations with other systems for security purposes, use the
commands that follow. The first command enables the NTP authentication feature. The second
command defines each of the authentication keys. Each key has a key number, a type, and a
value. Currently the only key type supported is md5. Finally, a list of trusted authentication
keys is defined. If a key is trusted, this system will be ready to synchronize to a system that
uses this key in its NTP packets.
To configure NTP authentication, use the global configuration commands listed in the table.
Command Description
Router(config)#
ntp server {ip-address | hostname} [version number] [key
keyid] [source interface] [prefer]
• Forms a server association with another system
Router(config-if)#
ntp broadcast client
Although you may configure either a peer or a server association, NTP clients would be
typically configured with a server association (meaning that only this system will synchronize
to the other system, and not the other way around). If you want to allow the software clock to
be synchronized by an NTP time server, use the ntp server command in global configuration
mode.
ntp server {ip-address | hostname} [version number] [key key-id] [source interface] [prefer]
Parameter Description
source (Optional) Identifies the interface from which to pick the IP source
address. Default is to take the interface address.
interface (Optional) Name of the interface from which to pick the IP source
address.
5-200 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
In addition or instead of creating unicast NTP associations, you can allow the system to listen
to broadcast packets on an interface-by-interface basis. To do so, use the ntp broadcast client
command in interface configuration mode.
Router(config)#
ntp access-group {query-only | serve-only | serve | peer}
access-list-number
• Controls NTP message exchange
Router(config)#
ntp source interface
To control access to NTP services, use the ntp access-group command in global configuration
mode.
ntp access-group {query-only | serve-only | serve | peer} access-list-number
The access group options are scanned in the following order, from least restrictive to most
restrictive:
1. peer: Allows time requests and NTP control queries and allows the system to synchronize
itself to a system whose address passes the ACL criteria. This option is used in scenarios in
which either the local or the remote system can become the NTP source.
2. serve: Allows time requests and NTP control queries, but does not allow the system to
synchronize itself to a system whose address passes the ACL criteria. This option allows
you to filter IP addresses of systems that can become clients of the local system from which
NTP control queries will be permitted.
3. serve-only: Allows only time requests from a system whose address passes the ACL
criteria. This option allows you to filter IP addresses of systems that can become clients of
the local system from which NTP control queries will be denied.
4. query-only: Allows only NTP control queries from a system whose address passes the
ACL criteria.
If the source IP address matches the ACLs for more than one access type, the first type is
granted. If no access groups are specified, all access types are granted to all systems. If any
access groups are specified, only the specified access types will be granted.
5-202 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
When the system sends an NTP packet, the source IP address is normally set to the address of
the interface through which the NTP packet is sent. Use the ntp source command in global
configuration mode if you want to configure a specific interface from which the IP source
address will be taken.
ntp source interface
This interface will be used for the source address for all packets sent to all destinations. If a
source address is to be used for a specific association, use the source parameter on the ntp peer
or ntp server command.
Cisco IOS routers activate the NTP protocols and work as clients or servers depending on the
peer association that is established with another device. An IOS router will offer the time
information to any peer with a lower stratum number as soon as it is itself synchronized with its
own authoritative source.
You can configure an IOS to become an authoritative time source even when there is no higher-
stratum source to retrieve the time from.
When a router is functioning as an NTP server, it may establish associations either by
broadcasting the NTP packets or sending the messages to configured peers using unicast
packets.
You can control the exchange of NTP information by authenticating the messages or by
permitting and denying the connections based on IP addresses.
5-204 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Configuring NTP Server
To configure the software clock to synchronize a peer or to be synchronized by a peer, use the
ntp peer command in global configuration mode.
ntp peer ip-address [normal-sync] [version number] [key keyid] [source interface] [prefer]
Parameter Description
interface (Optional) Name of the interface from which to pick the IP source
address
prefer (Optional) Makes this peer the preferred peer that provides
synchronization
Use the ntp master command in global configuration mode if you want the system to be an
authoritative NTP server (a master clock), even if the system is not synchronized to an outside
time source or an external NTP source is not available. Stratum is an optional number from 1 to
Caution Use this command with caution. It is very easy to override valid time sources using this
command, especially if a low stratum number is configured. Configuring multiple machines
in the same network with the ntp master command can cause instability in keeping time if
the machines do not agree on the time.
To configure the system to send NTP broadcast packets on a specified interface, use the
ntp broadcast command in interface configuration mode. The version parameter is an optional
number from 1 to 3 indicating the NTP version. Use the destination keyword if you want the
NTP host to restrict broadcast of NTP frames to the IP address of a designated system. The
optional key parameter is configured when only the specified key should be included in the
transmitted NTP broadcast packets.
5-206 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
NTP Configuration Example
This section presents an NTP configuration example.
Source(config)#ntp master 5
Source(config)#ntp authentication-key 1 md5 secretsource
Source(config)#ntp peer 172.16.0.2 key 1
Source(config)#ntp source loopback 0
This example shows three routers configured for NTP exchange. Source is configured as an
authoritative NTP server with stratum 5 and has all settings for an authenticated association
with Intermediate.
Intermediate receives the time information through the configured association with the Source
and then broadcasts the current time, authenticating it with all available keys via the
Fastethernet0/0 interface.
Client accepts the broadcast packets on its Fastethernet0/1 interface and trusts the messages that
have been authenticated with the NTP key that has been locally configured as trusted.
Summary
5-208 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Lesson 6
Objectives
Upon completing this lesson, you will be able to explain the procedures to configure AAA
implementation on a Cisco router using both SDM and CLI. This ability includes being able to
meet these objectives:
Describe the three components of AAA
Describe the AAA access modes
Describe the AAA RADIUS and TACACS+ protocols
Configure AAA login authentication on Cisco routers using CLI
Configure AAA login authentication on Cisco routers using SDM
Troubleshoot AAA on a Cisco perimeter router using the debug aaa command
Explain AAA authorization and the commands that are required to configure it on Cisco
routers
Explain AAA accounting and the commands that are required to configure it on Cisco
routers
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Introduction to AAA
This topic describes the concepts of authentication, authorization, and accounting.
AAA Model
• Authentication:
– Who are you?
– “I am user student and my password validateme proves it.”
• Authorization:
– What can you do? What can you access?
– “User student can access host serverXYZ using Telnet.”
– “Assign an IP address and ACL to user student connecting through
VPN.”
– “When user student starts an EXEC session, assign privilege level 10.”
• Accounting:
– What did you do? How long and how often did you do it?
– “User student accessed host serverXYZ using Telnet for 15 minutes.”
– “User student was connected to VPN for 25 minutes.”
– “EXEC session of user student lasted 20 minutes and only show
commands were executed.”
AAA services provide a higher degree of scalability than line-level and privileged-EXEC
authentication.
Unauthorized access in campus, dialup, and Internet environments creates the potential for
network intruders to gain access to sensitive network equipment and services. The Cisco AAA
architecture enables systematic and scalable access security.
Network and administrative access security in the Cisco environment, whether it involves
campus, dialup, or Internet access, is based on a modular architecture that has three functional
components: authentication, authorization, and accounting:
Authentication: Requires users and administrators to prove that they really are who they
say they are. Authentication is established using a username and password, challenge and
response, token cards, and other methods: “I am user student and my password validateme
proves it.”
Authorization: After authenticating the user and administrator, authorization services
decide which resources the user and administrator are allowed to access and which
operations the user and administrator are allowed to perform: “User student can access host
serverXYZ using Telnet.”
Other typical authorization tasks are:
— Assigning parameters, such as IP addresses and access control lists (ACLs) to
connected users
— Assigning privilege levels to users who run EXEC sessions
— Controlling the usage of specific EXEC commands
5-210 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Accounting and auditing: Accounting records what the user and administrator actually
did, what they accessed, and how long they accessed it for accounting and auditing
purposes. Accounting keeps track of how network resources are used: “User student
accessed host ServerXYZ using Telnet for 15 minutes.”
Implementing AAA
Two examples of AAA implementation include authenticating remote users accessing the
corporate LAN through dialup or Internet connections, and authenticating administrators
accessing the router console port, aux port, and vty ports.
Cisco provides three ways of implementing AAA services for Cisco routers, network access
servers (NASs), and switch equipment, as shown in the figure:
Self-contained AAA: AAA services may be self-contained in the router or NAS itself (also
known as local authentication).
Cisco Secure ACS for Windows Server: AAA services on the router or NAS contact an
external Cisco Secure Access Control Server (ACS) for Windows system for user and
administrator authentication.
Cisco Secure ACS Solution Engine: AAA services on the router or NAS contact an
external Cisco Secure ACS Solution Engine for user and administrator authentication.
5-212 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Router Access Modes
This topic describes the AAA router access modes.
Understanding router access modes is a key to understanding AAA commands and how they
work to secure your network access server.
With the exception of the aaa accounting system command, all of the AAA commands apply
to either character mode or packet mode. The mode refers to the format of the packets
requesting AAA. If the query is presented as Service-Type = Exec-User, it is presented in
character mode. If the request is presented as Service-Type = Framed-User and Framed-Type =
PPP, it is presented in packet mode.
Character mode allows a network administrator with a large number of routers in a network to
authenticate one time as the user, and then access all routers configured in this method. The
figure shows how to decode the meaning of an AAA command by associating the AAA
command element with the connection mode to the router.
Primary applications for the Cisco Secure ACS include securing dialup access to a network and
securing the management of routers within a network. Both applications have unique AAA
requirements.
With the Cisco Secure ACS, you can choose a variety of authentication methods, each
providing a set of authorization privileges. These router ports must be secured using the Cisco
IOS software and a Cisco Secure ACS server.
The best-known and best-used types of AAA protocols are TACACS+ and RADIUS.
TACACS+ supersedes older versions of TACACS and XTACACS. TACACS+ and RADIUS
have different features that make them suitable for different situations.
For example, RADIUS is maintained by a standard that was created by the Internet Engineering
Task Force (IETF); TACACS+ is a proprietary Cisco Systems technology that encrypts data.
Another key difference is that TACACS+ runs in TCP while RADIUS operates in User
Datagram Protocol (UDP).
TACACS+ provides many benefits for configuring Cisco devices to use AAA for management
and terminal services. TACACS+ can control the authorization level of users, while RADIUS
cannot. Also, because TACACS+ separates authentication and authorization, it is possible to
use TACACS+ for authorization and accounting while using a different method for
authentication, such as Kerberos.
5-214 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
RADIUS Authentication and Authorization
This topic describes the RADIUS authentication process.
This figure illustrates the authentication process with RADIUS. These steps are involved in the
exchange:
Step 1 The NAS prompts the client for a username.
Step 2 The client provides a username to the NAS.
Step 3 NAS prompts for a password.
Step 4 The client provides the password.
Step 5 The information about the username and the password is sent to the RADIUS server
using an Access-Request datagram, which contains all the necessary attribute-value
(AV) pairs.
Step 6 If the user-information is correct, the server responds with an Access-Accept
datagram. The Access-Accept message also contains authorization parameters in the
form of AV pairs, such as the IP address to be assigned, and so on. If the user
information is invalid, an Access-Reject message is returned and the NAS
terminates the connection.
RADIUS Messages
5-216 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
RADIUS Attributes
Each message can contain a number of attribute-value (AV) pairs. Some are used for
authentication purposes and some are used for authorization purposes.
RADIUS Attributes
RADIUS Features
RADIUS (Cisco) is the RADIUS (IETF) support plus IETF attribute 26, the vendor-specific
attribute (VSA) for Cisco. It is under this VSA that any authorization request specified in the
TACACS+ specification can be sent to an access device through RADIUS.
The most notable limitations of RADIUS include the following:
Limited security features
The combination of authentication and authorization in one function
5-218 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
TACACS+ Authentication
The figure shows a typical authentication process using the TACACS+ protocol.
TACACS+ Authentication
The TACACS+ protocol is much more flexible than the RADIUS communication. It permits
the TACACS+ server to use virtually arbitrary dialogs to collect enough information until a
user is authenticated.
Note TACACS+ allows an arbitrary conversation to be held between the daemon and the user,
until the daemon receives enough information to authenticate the user. This is usually done
by prompting for a username and password combination, but may include other items, such
as mother's maiden name, all under the control of the TACACS+ daemon.
The figure illustrates the authentication process with TACACS+. These steps are involved in
the exchange:
Step 1 A user requests access.
Step 2 NAC requests a username prompt from the TACACS+ server.
Step 3 The TACACS+ server provides a username prompt.
Step 4 NAC prompts the user.
Step 5 The user provides a username.
Step 6 NAC forwards the username to the TACACS+ server.
Step 7 NAC requests the password prompt from the TACACS+ server.
Step 8 The TACACS+ server provides a password prompt.
Step 9 NAC prompts the user for the password.
Step 10 User submits the password.
5-220 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
TACACS+ Network Authorization
The NAS eventually receives one of these responses from the TACACS+ daemon:
ACCEPT: The user is authenticated and service may begin. If the NAS is configured to
require authorization, authorization will begin at this time.
REJECT: The user has failed to authenticate. The user may be denied further access, or
will be prompted to retry the login sequence, depending on the TACACS+ daemon.
ERROR: An error occurred at some time during authentication. This can be either at the
daemon or in the network connection between the daemon and the NAS. If an ERROR
response is received, the NAS will typically try to use an alternative method to authenticate
the user.
CONTINUE: The user is prompted for additional authentication information.
Following authentication, the user is also required to undergo an additional authorization phase,
if authorization has been enabled on the NAS. Users must first successfully complete
TACACS+ authentication before proceeding to TACACS+ authorization.
If TACACS+ authorization is required, the TACACS+ daemon is again contacted and it returns
an ACCEPT or REJECT authorization response. If an ACCEPT response is returned, the
response will contain data in the form of attributes that are used to direct the EXEC or
NETWORK session for that user. This determines the services that the user can access.
Services include the following:
Telnet, rlogin, PPP, Serial Line Interface Protocol (SLIP), or EXEC services
Connection parameters, including the host or client IP address, ACL, and user timeouts
The figure illustrates the authorization process with TACACS+, after the user has successfully
authenticated. A per-user ACL and static route are uploaded to the NAS. TACACS+ can be
used for uploading a variety of other parameters to the NAS. These steps are involved in the
exchange:
5-222 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
TACACS+ Command Authorization
Another important aspect of authorization is the access control to services available to a user.
Controlling access to configuration commands greatly simplifies the infrastructure security in
large enterprise networks. Per-user permissions can easily be configured on the ACS, which
simplifies the configuration on network devices.
The example in the figure shows the authorization process when a network administrator issues
the configure terminal command on a router. The router queries the ACS for permission to
execute the command on behalf of user “joe.”
Note TACACS+ by default establishes a new TCP session for every authorization request, which
may lead to delays when users enter commands. Cisco Secure ACS supports persistent
TCP sessions to improve performance. Both the Cisco Secure ACS and the router have to
be configured for this functionality.
These are some examples of TACACS+ attributes frequently used for authentication and
authorization:
ACL (EXEC authorization): Contains an access-class number to be applied to a line.
ADDR (SLIP, PPP/IP authorization): Specifies the IP address of the remote host that
should be assigned when using a SLIP or PPP/IP connection.
CMD (EXEC): The AV pair is used for starting an authorization request for an EXEC
command.
Priv-lvl (EXEC authorization): Specifies the current privilege level for command
authorizations, a number from 0 to 15.
Route (PPP/IP, SLIP authorization): Specifies a route to be applied to an interface.
InACL (PPP/IP, SLIP authorization): Contains an inbound IP ACL for SLIP or PPP/IP
connections.
OutACL: Contains an outbound IP ACL for SLIP or PPP/IP.
Addr-pool: Specifies the name of a local address pool from which to get the address of the
remote host.
Autocmd: Specifies a command to be automatically executed at EXEC startup.
Many other attributes exist for most network applications, such as dial-in solutions, proxy-
authentication on firewalls, or command authorization for Cisco devices.
TACACS+ is the primary protocol for Cisco AAA implementations and is supported on IOS
routers, switches, and the Cisco PIX Firewall.
5-224 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
TACACS+, the Cisco proprietary protocol, uses TCP port 49 as a default transport layer.
Normally, each AAA transaction uses a dedicated TCP connection. A single session can be
established to ensure less server load and better detection of a break in communication. This
session persists as long as the server or the network device is operational.
TACACS+
RADIUS
These are the first steps in configuring the network access server:
Step 1 Globally enable AAA to allow the use of all AAA elements. This step is a
prerequisite for all other AAA commands.
Step 2 Specify the Cisco Secure ACS that will provide AAA services for the network
access server.
Step 3 Configure the encryption key that will be used to encrypt the data transfer between
the network access server and the Cisco Secure ACS.
The table shows commonly used AAA configuration commands and describes their function.
Command Description
aaa new-model Enables AAA on the router. Prerequisite for all other AAA
commands.
tacacs-server host ip- Indicates the address of the Cisco Secure ACS server and
address single- specifies use of the TCP single-connection feature of Cisco
connection Secure ACS. This feature improves performance by maintaining
a single TCP connection for the life of the session between the
network access server and the Cisco Secure ACS server, rather
than opening and closing TCP connections for each session (the
default).
tacacs-server key key Establishes the shared secret encryption key between the
network access server and the Cisco Secure ACS server.
5-226 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Command Description
radius-server key key Specifies an encryption key to be used with the RADIUS AAA
server.
Router(config)#
The authentication login command in global configuration mode enables the AAA
authentication process.
aaa authentication login {default | list-name} group {group-name | radius | tacacs+}
[method2 [method3 [method4]]]
Parameter Description
list-name This command creates a list, with a name of your choosing, that
is applied explicitly to a line or interface using the method or
methods specified. This defined list overrides the default when
applied to a specific line or interface.
group group-name These methods specify the use of an AAA server. The group
group radius radius and group tacacs+ methods refer to previously defined
RADIUS or TACACS+ servers. The group-name string allows the
group tacacs+ use of a predefined group of RADIUS or TACACS+ servers for
authentication (created with the aaa group server radius or aaa
group server tacacs+ command).
5-228 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Parameter Description
Router#show running-config
...
aaa new-model
aaa authentication login default group tacacs+ local
aaa authentication login my_list group tacacs+
...
line con 0
line aux 0
line vty 0 4
login authentication my_list
Command Description
aaa authentication The default login is TACACS+ server. If no response from the
login default group server, then use the local username and password database.
tacacs+ local
aaa authentication Used for character mode username and password challenge. A
login my_list group new list name, my_list, is defined, and the only method is
tacacs+ TACACS+.
login authentication Configures the console line to use the AAA list name my_list,
my_list which has been previously defined to use only TACACS+.
line 1 48 Configures lines 1 through 48 to use the AAA list name my_list,
login authentication which has been previously defined to use only TACACS+.
my_list
line vty 0 4 On lines vty 0 through 4, the default list is used, which in this
case specifies the aaa authentication login default tacacs+
local command.
5-230 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Configure AAA Login Authentication on Cisco
Routers Using SDM
This topic describes the procedure to configure AAA login authentication on Cisco routers
using SDM.
The first task when configuring AAA using the Security Device Manager is to enable AAA.
This option is available under Configure > Additional Tasks > AAA. Locate the Enable
AAA button in the upper right corner to enable AAA on the router.
5-232 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Defining AAA Servers
When AAA is enabled on the router, you can proceed to the task of defining AAA servers.
Locate the AAA Servers option under Configure > Additional Tasks > AAA > AAA Servers
and Groups. Click the Add button in the upper right corner to create a new AAA server entry.
The figure illustrates how to define a RADIUS server. After you click the Add button in the
AAA Servers configuration section, an Add AAA Server window appears. You can choose
either RADIUS or TACACS+ from the Server Type drop-down box. When you choose
RADIUS, you have the option of modifying the UDP ports for authorization and accounting,
setting the timeout, and configuring the RADIUS key.
This example illustrates how to create and configure an entry for a TACACS+ server.
5-234 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Creating a Login Authentication Policy
Next, you will have to create or modify an authentication policy.
This option can be found in the menu Configure > Additional Tasks > AAA >
Authentication Policies > Login. You can either edit an existing policy by highlighting it and
selecting the Edit button in the upper right corner, or create a new policy by clicking the Add
button. After AAA is enabled on the router, a default authentication policy (using local
authentication) is automatically created by SDM to prevent session lockout. The figure above
shows how to create a new policy named radius_local that should use group radius as the first
authentication method.
In this example, you add the local authentication as a backup authentication method to the
policy radius_local.
5-236 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Creating an EXEC Authorization Policy
Next, you can create or modify an authorization policy.
This option can be found in the menu Configure > Additional Tasks > AAA > Authorization
Policies > Edit. You can either edit an existing policy by highlighting it and clicking the Edit
button in the upper right corner, or create a new policy by clicking the Add button. After AAA
is enabled on the router, a default authentication policy (using local authentication) is created.
The figure shows how to create a new policy, named radius_local, that should use group
radius as the first authentication method. The policy name in this example is identical to the
previously configured authentication policy because it should use the same methods. The
names of the authentication and authorization policies may be different or the same.
In this example, you add the local authorization as a backup authorization method to the policy
radius_local.
5-238 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Creating Local User Accounts
After you decide to use local authentication in the AAA configuration on the router, you will
populate the local router database with user accounts. This option is available in the menu
Configure > Additional Tasks > Router Access > User Account/View. You can add or
modify user accounts by clicking the Add or Edit buttons, respectively.
In this example, a new user joe is created using the password encryption scheme.
You do not have to apply to the default authentication policy because it is applied by default. If
you wish to apply an authentication policy to vty lines, select the menu Configure >
Additional Tasks > Router Access > VTY > Authentication Policy and click the Edit button
in the upper right corner.
5-240 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Applying Authentication Policy to VTY Lines
The Edit VTY Lines window will open and you can choose the desired policy from the
Authentication Policy drop-down menu.
In the Edit VTY Lines window, you can select which vty lines to edit, specify the EXEC
timeout, select the transport protocols, apply access rules, and select the authentication and
authorization policies from the respective drop-down boxes. There is a preconfigured default
authentication policy, and the custom policies that have additionally been created. The default
authentication policy uses the local method, that is, it uses the local user database, to control
access. In this example, the custom authentication policy radius_local is being applied to the
vty lines.
In the Edit VTY Lines window, you can select the authorization policy. There is a
preconfigured default authorization policy, and the custom policies that have additionally been
created. The default authorization policy uses the local method, that is, it uses the local user
database to control access. In this example, the custom authorization policy radius_local is
being applied to the vty lines.
5-242 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Verifying AAA Login Authentication Commands
This configuration lists all commands actually sent to the router as a result of the AAA
configuration performed in SDM.
aaa new-model
!
aaa authentication login default local
aaa authentication login radius_local group radius group radius
aaa authorization exec default local
!
username joe secret 5 $1$SlZh$Io83V..6/8WEQYTis2SEW1
!
tacacs-server host 10.1.1.10 single-connection key secrettacacs
radius-server host 10.1.1.10 auth-port 1645 acct-port 1646 key
secretradius
!
line vty 0 4
login authentication radius_local
The first, second, and fourth command result from enabling AAA on the router. The remaining
commands are used to define an authentication policy, create a local user account, configure the
AAA servers, and apply the authentication policy to the vty lines.
router#
debug aaa authentication
Use the debug aaa authentication command on your routers to trace AAA packets and
monitor authentication.
The command displays debugging messages on authentication functions.
5-244 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Troubleshoot AAA Authentication Example
router(config)#
aaa authorization {network | exec | commands level | config-commands
| reverse-access} {default|list-name} method1 [method2...]
Example:
router(config)#aaa authorization exec default group radius local none
You can configure the access server to restrict the user to perform certain functions only after
successful authentication. Use the aaa authorization command in global configuration mode
to select the function authorized and the method of authorization.
aaa authorization {network | exec | commands level | config-commands | reverse-access}
{default | list-name} method1 [method2...]
Parameter Description
network All network services, including SLIP, PPP, and AppleTalk Remote
Access protocol (ARA protocol)
if-authenticated Allows the user to use the requested function if the user is
authenticated
local Uses the local database for authorization (with the username
password or username secret commands)
5-246 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Authorization Example
This topic provides an authentication and authorization example with character mode access.
Authorization Example
R2#show running-config
...
aaa new-model
!
aaa authentication login default local
aaa authentication enable default group tacacs+ enable
aaa authorization exec default group tacacs+ local
aaa authorization commands 1 default group tacacs+ local
aaa authorization commands 15 default group tacacs+ local
...
username admin password 0 cisco123
Command Description
aaa authentication Determines if the user can access the enabled command level. If
enable default group authentication via TACACS+ server is unavailable, then use the
tacacs+ enable enable password.
aaa authorization exec Determines if the user is allowed access to an EXEC shell, and, if
default group tacacs+ so, which shell attributes are permitted or denied. The method is
local TACACS+. If there is no response from the TACACS+ server,
then the method is local, using the local username and password
database.
aaa authorization Runs authorization for all commands at the specified privilege
command n default level (n). It is possible to have every line entered by a user
group tacacs+ local authorized by TACACS+.
Troubleshooting Authorization
router#
The figure displays sample output from the debug aaa authorization command, which
performs an EXEC authorization for user carrel. The output is interpreted as follows:
On the first line, the username carrel is authorized.
On the second and third lines, the AV pairs are authorized.
The debug output displays a line for each AV pair that is authorized.
The display indicates the authorization protocol used.
The final line in the display indicates the status of the authorization process, which, in this
case, has failed.
The aaa authorization command causes a request packet containing a series of AV pairs to be
sent to the TACACS daemon as part of the authorization process. The daemon responds in one
of the following three ways:
Accepts the request as is
Makes changes to the request
Refuses the request, thereby refusing authorization
The table describes AV pairs associated with the debug aaa authorization command that may
appear in the debug output.
5-248 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
AV Pairs Associated with the debug aaa authorization Command
AV Pair Description
acl=x Used with service=shell and service=arap. For ARA, this pair
contains an ACL number. For service=shell, this pair contains an
access class number (for example, acl=2).
5-250 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
AAA Accounting Commands
This topic describes how to use AAA accounting commands.
router(config)#
aaa accounting {command level | connection | exec | network |
system} {default | list-name} {start-stop | stop-only | wait-start}
group {tacacs+ | radius}
Example:
R2(config)#aaa accounting exec default start-stop group tacacs+
Use the aaa accounting command in global configuration mode for auditing and billing
purposes.
aaa accounting {commands level | connection | exec | network | system} {default | list-
name} {start-stop | stop-only | wait-start} group {tacacs+ | radius}
Parameter Description
commands level Audits all commands at the specified privilege level (0–15).
network Audits all network service requests, such as SLIP, PPP, and
ARAP.
stop-only Sends a stop accounting notice at the end of the requested user
process.
5-252 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
AAA Accounting Example
The example shows how to configure a Cisco IOS router for accounting of user EXEC
sessions.
Accounting of user EXEC sessions requires that aaa new-model is enabled, and that the
authentication and authorization configuration is in place. In the example, TACACS+ is used
for authentication, authorization, and accounting purposes.
The Cisco Secure ACS serves as a central repository for accounting information by completing
the access control functionality. Accounting tracks events occurring on the network.
Each session that is established through the Cisco Secure ACS can be fully accounted for and
stored on the server. This stored information can be very helpful for management, security
audits, capacity planning, and network usage billing. In the example, you use the Cisco Secure
ACS to view the accounting information for user EXEC sessions. In ACS, select Reports and
Activity > Tacacs+ Accounting, and if needed - Refresh, to view the current accounting
information.
5-254 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Troubleshooting Accounting
To display information on accounting events as they occur, use the debug aaa accounting
privileged EXEC command, as shown in the figure. Use the no debug aaa accounting
command to disable debug mode. This figure displays sample output from the debug aaa
accounting command.
Troubleshooting Accounting
router#
The information displayed by the debug aaa accounting command is independent of the
accounting protocol used to transfer the accounting information to a server. Use the debug
tacacs and debug radius protocol-specific commands to get more detailed information about
protocol-level issues.
You can also use the show accounting command to step through all active sessions and to print
all the accounting records for actively accounted functions. The show accounting command
enables you to display the active accounting events on the system. This command provides you
with a quick look at what is happening, and may also be useful for collecting information in the
event of data loss on the accounting server. The show accounting command displays additional
data on the internal state of the AAA security system, if the debug aaa accounting command is
active as well.
In the example debugging output, the first two messages inform about the start of an EXEC
session through port 10. The third message informs about the termination of that connection
and provides additional parameters about the endpoint address, the amount of exchanged data,
and session duration.
Summary
References
For additional information, refer to these resources:
Remote Authentication Dial In User Service (RADIUS) at:
http://www.ietf.org/rfc/rfc2865.txt
TACACS+ Attribute-Value Pairs at:
http://www.cisco.com/en/US/products/ps6350/products_configuration_guide_chapter09186
a00804fe2d8.html
5-256 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Module Summary
This topic summarizes the key points that were discussed in this module.
Module Summary
This module describes various aspects of Cisco device hardening. The most common threats to
network devices are described, along with mitigation techniques. The module explains that
attackers can compromise unused services, and provides methods to disable them using the
command-line interface (CLI) and Security Device Manager (SDM). Administrative access
security is introduced, including password security, protection of various access paths, failed
login handling, security banner, privilege levels, role-based CLI, and secure configuration files.
Furthermore, the module covers traffic filtering using access control lists (ACLs), and explains
how to design and implement a secure management system, including secure protocols such as
Secure Shell (SSH), Simple Network Management Protocol version 3 (SNMPv3), and
authenticated Network Time Protocol (NTP). The module addresses the logging component of
a management solution that uses the syslog protocol and various logging levels. The module
also describes authentication, authorization, and accounting (AAA), and describes its
configuration using both the CLI interface and the SDM. A detailed comparison between the
AAA protocols RADIUS and TACACS+ is also provided.
Q1) What is a major difficulty that a hacker would encounter when performing an IP
spoofing attack? (Source: Mitigating Network Attacks)
A) It is difficult to source packets using the IP address of someone else.
B) Antispoofing ACLs usually block such attacks.
C) Return traffic typically does not go back to the attacker.
D) uRPF always blocks such attacks.
Q2) What is a typical attack against a public web server? (Source: Mitigating Network
Attacks)
A) DoS by TCP SYN flooding
B) brute-force attack
C) packet sniffer
D) exploit of Telnet-based management
Q3) Which AutoSecure mode should be used for setting up SSH access to a router with an
empty configuration: interactive or non-interactive? (Source: Disabling Unused Cisco
Router Network Services and Interfaces)
A) Non-interactive, if default settings are desired.
B) Interactive, because the administrator must provide the hostname and domain
name.
C) Non-interactive, because the RSA keys are generated using the default length.
D) Interactive, because it is considered more secure.
Q4) Can AutoSecure affect connectivity of a lab environment with private addresses?
(Source: Disabling Unused Cisco Router Network Services and Interfaces)
A) No, AutoSecure does not have any caveats.
B) Yes, because management plane security requires public addressing.
C) Yes, because forwarding plane filtering blocks packets sourced from private
address ranges.
Q5) How can you provide the same degree of protection to line-level passwords and the
enable secret password? (Source: Securing Cisco Router Installations and
Administrative Access)
A) By enabling the service password-encryption.
B) By lowering the protection of the enable secret to the Vigenere cipher.
C) You cannot, because the line-level passwords can only be protected using the
service password-encryption (Vigenere cipher) and the enable secret
password cipher uses MD5 encryption.
D) By enabling enhanced password security for line-level passwords.
5-258 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Q6) What is the Cisco IOS Resilient Configuration feature used for? (Source: Securing
Cisco Router Installations and Administrative Access)
A) to speed up the recovery process once a router is compromised and the IOS
image or configuration is erased
B) to provide device resilience in a standby router setup
C) to prevent anyone from reading the configuration file or the IOS image
D) to provide a backup configuration file once the primary is corrupted
Q7) Why would you use an explicit deny statement to drop all remaining packets at the end
of an ACL? (Source: Mitigating Threats and Attacks with Access Lists)
A) An implicit deny statement at the end of an ACL works only under certain
conditions.
B) An explicit deny is recommended for strict packet dropping.
C) To log the corresponding event.
D) Allows longer ACLs to be compiled more effectively.
Q8) How can you use ACLs to control Telnet and SSH access to a Cisco IOS router?
(Source: Mitigating Threats and Attacks with Access Lists)
A) The only method is to apply the ACLs to the router interfaces in inbound
direction.
B) By using configuration commands telnet and ssh that control such access..
C) The only method is to use the access-class command in combination with the
filtering ACL.
D) By using the access-class command in combination with the filtering ACL or
applying the filtering ACLs to the router interfaces in inbound direction.
Q9) Which two of the following can you use to secure a syslog transmission? (Choose two.)
(Source: Securing Management and Reporting Features)
A) ACL deployment
B) IPsec protection
C) SSL protection
D) an out-of-band channel dedicated to management traffic
E) nothing, syslog is considered secure for most environments
Q10) Which IP protocol and port is used by NTP? (Source: Securing Management and
Reporting Features)
A) TCP, port 112
B) UDP, port 112
C) TCP, port 123
D) UDP, port 123
Q11) What is the difference between TACACS+ and RADIUS? (Source: Configuring AAA
on Cisco Routers)
A) TACACS+ encrypts passwords while RADIUS does not.
B) TACACS+ is better for authentication and RADIUS is better for authorization.
C) TACACS+ can be used for command authorization while RADIUS cannot.
D) TACACS+ has more options than RADIUS.
5-260 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Module Self-Check Answer Key
Q1) C
Q2) A
Q3) B
Q4) C
Q5) C
Q6) A
Q7) C
Q8) D
Q9) B, D
Q10) D
Q11) C
Q12) A, C, F
Overview
Cisco IOS Firewall software offers a full set of security features that you can implement to
provide security for a network. In this module, you will learn about the Cisco IOS Firewall and
Cisco IOS intrusion prevention system (IPS) functionality. The module explains various
firewall technologies, such as packet filters, stateful firewalls, and proxy servers, and discusses
their filtering capabilities and features. Further, the module describes how to design effective
firewall topologies, and how to configure Cisco IOS Firewall functionality on Cisco IOS
routers. The module covers the two configuration methods for Cisco IOS Firewall: using the
command-line interface (CLI) and the Security Device Manager (SDM). The module also
explains the IDS and IPS technologies, describes types of intrusion detection system (IDS) and
IPS systems, compares host-based and network-based approaches, describes the placement of
IPS systems, lists signature categories, and discusses possible actions that an IOS router can
take when an attack is detected. Cisco IOS IPS can, just like the Cisco IOS Firewall, be
configured using the CLI and SDM, and both methods are covered. This module explains the
IPS configuration wizard included in the SDM, and explains the IPS verification and
customization options of the SDM.
Module Objectives
Upon completing this module, you will be able to describe and configure Cisco IOS Firewall
features. This ability includes being able to meet these objectives:
Explain the Cisco IOS Firewall functionality
Describe the procedure to configure Cisco IOS Firewall features using the CLI and SDM,
explain the resulting configurations, and verify firewall operations using SDM and show
commands
Explain the features, components, and functionality of Cisco IOS IPS
Describe the procedure to configure Cisco IOS IPS operations using SDM
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
6-2 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Lesson 1
Objectives
Upon completing this lesson, you will be able to explain the Cisco IOS Firewall functionality.
This ability includes being able to meet these objectives:
Explain the basic structure of a layered defense
Describe the operational strengths and weaknesses of the three firewall technologies
Explain the basic operation of a stateful firewall
Describe the features of the Cisco IOS Firewall
Describe how the Cisco IOS Firewall combines the features of packet inspection and proxy
firewalls to provide an optimal security solution
Explain the Cisco IOS Firewall process
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Layered Defense Strategy
This topic describes the basic structure of a layered defense.
DMZ
Firewalls enforce access control between networks, which can be of different types and levels
of trust. A common name for a group of networks reachable over a single firewall network
interface is a security zone. A security zone is therefore an administratively separate domain, to
or from which a firewall can filter incoming or outgoing traffic. The most notable security
zones are inside and outside networks that are connected to firewalls over inside or outside
interfaces, respectively.
In order to provide a layered approach, the idea of the screened subnet was developed. The idea
is based on creation of a buffer network, which is situated between security zones, and actually
represents a miniature zone itself. This small network, often called the Demilitarized Zone
(DMZ), is neither an inside nor an outside network. It acts as a “no-man’s land,” and access to
it is permitted from inside and outside, although typically no traffic can directly cross the DMZ.
Filtering points, set up on DMZ edges to connect it to the inside and outside networks, enforce
access control for traffic entering or exiting the DMZ. These filtering points are usually
implemented with classic or stateful packet filters.
Another type of a filtering device is a proxy server, also known as an application layer gateway
(ALG). An ALG establishes two application sessions—one with the client, and the other with
the application server. The ALG acts as server to the client and as client to the server, and
provides security by sanitizing the data flow.
6-4 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Layered Defense Features
This section explains the features of a layered defense approach.
The DMZ is an ideal place to host services—public services, exposed servers that untrusted
users connect to, or proxy servers such as ALGs—to enable inside users to connect to the
outside perimeter.
Note Because of its ability to contain an attack and limit damage in the case of a break-in, the
DMZ approach is the most popular and commonly used modern architecture.
The multiple layers of security offered by a DMZ are distributed between services and filtering
points, as follows:
The filtering points initially protect the services and, if the services are compromised, limit
the ability of an attacker to proceed further into the system. Both entering and exiting
traffic is filtered, either by classic routers or dedicated firewalls.
Public servers placed in the DMZ require proper security measures. The services are
hardened, making it difficult for an attacker to compromise them.
ALGs, also known as proxy servers, located in the DMZ sanitize the data exchange within
the application flow. This is especially recommended for outbound connectivity.
An attacker who manages to break into the DMZ may not be able to launch attacks against
the trusted inside network because the filtering points provide additional defense.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-5
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Multiple DMZs
The DMZ is a single network, nested between the inside and outside security zones. The
concept of multiple DMZs is an alternative.
Multiple DMZs
Using a single DMZ zone, there is no access control available between the different hosts
inside the DMZ. If a host is broken into, it is likely that other hosts in the same DMZ can be
compromised if their operating systems and applications are not properly hardened. For
security reasons, modern applications are often multi-tiered, and separating the web server from
the application server, as well as the database server, is required in a robust system.
A solution is multiple DMZ networks, in which each DMZ hosts a particular service. The
figure illustrates an implementation of a multiple DMZ in which each new DMZ creates a new
security zone, with filtering points in each single DMZ controlling traffic entering and exiting.
A web server can now be isolated from an application server. A compromise of one server will
leave an attacker in an extremely restricted environment, with only a few carefully chosen
services available, in accordance with the least privilege philosophy.
6-6 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Modern DMZ Design
The figure shows simplified versions of the multi-DMZ configuration.
A modern firewall device with multiple “legs or interfaces” creates multiple DMZs, each “leg
network” being separated from others via a single filtering device. The single device substitutes
“outside” and “inside” routers of a classic DMZ, providing the same level of ingress and egress
filtering. Such a setup has the benefit of being simple, manageable, and cost-effective.
The first topology in the figure illustrates a stateful firewall, also known as stateful packet filter,
with six network interfaces attached to it. Two interfaces each connect to the inside and outside
networks. The remaining interfaces are for the four DMZs.
The second topology is identical to the first except that an ALG is used as the filtering device
instead of a stateful firewall.
The third topology also identifies four DMZs, but two stateful firewalls provide the
connectivity structure instead of one. This topology provides better performance, because the
filtering tasks are divided between two devices, which provide more security through
compartmentalization but increase the overall costs of the solution.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-7
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Firewall Technologies
This topic describes the operational strengths and weaknesses of the three firewall
technologies: packet filter, stateful firewall, and application gateway.
Firewall Technologies
6-8 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Note Each technology has advantages and disadvantages and each one has a “best fit” role to
play, depending on the needs of the security policy.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-9
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Packet Filtering
A packet filtering firewall selectively routes or drops IP packets based on information in the
network (IP) and transport (TCP or UDP) headers. It can be implemented on routers or on dual-
homed gateways.
Packet Filtering
A packet filter uses rules to accept or reject incoming packets based on source and destination
IP addresses, source and destination port numbers, and packet type. These rules can also be
used to reject any packet from the outside that claims to come from an address inside the
network. Recall that each service relies on specific ports. By restricting certain ports, you can
restrict those services. For example, blocking port 23 for all user workstations prevents the
users from using Telnet, which is an insecure management protocol.
Any device that uses ACLs can do packet filtering. ACLs are probably the most commonly
used objects in Cisco IOS router configuration. Not only are they used for packet filtering
firewalls, but they can also select specified types of traffic to be analyzed, forwarded, or
influenced in some way.
While packet filtering is effective and transparent to users, there are these disadvantages:
Packet filtering is susceptible to IP spoofing. Arbitrary packets can be sent that fit ACL
criteria and pass through the filter.
Packet filters do not filter fragmented packets well. Because fragmented IP packets carry
the TCP header in the first fragment and packet filters filter on TCP header information, all
non-first fragments are passed unconditionally. This process is based on the assumption
that the filter of the first fragment is accurately enforcing the policy.
Complex ACLs are difficult to implement and maintain correctly.
Some services cannot be filtered. For example, it is difficult to permit dynamically negotiated
sessions without opening up access to a whole range of ports, which in itself might be
dangerous.
6-10 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Packet Filtering Example
The figure shows a simple packet filter example using a Cisco IOS router.
In most network topologies, the Ethernet interface connecting to the internal (inside) network
needs to be protected. The serial interface connects to the Internet.
In this example, only one ACL is applied in the inbound direction to the outside interface Serial
0/0. It permits packets from established TCP sessions destined to the inside network 16.1.1.0/24
and drops all other traffic. Packets that belong to established TCP flows are recognized by the
ACK flag set to 1 in the TCP header. The sessions have been originated by the hosts in the
trusted zone (inside network). There is no ACL blocking the initial flows from the inside
network toward the Internet.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-11
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Application Layer Gateway
An ALG is a firewall device that examines packets at the application layer of the Open Systems
Interconnection (OSI) reference model.
An ALG acts as an intermediary between the users and the protected system. Users gain access
to the network by going through a process that establishes sessions, performs user
authentication, and enforces authorized policy.
These problems are associated with ALGs:
ALGs must evaluate a lot of information in many packets and therefore can slow down the
network performance.
ALGs are typically designed to filter a single application. Adding new services would
require running multiple ALG programs on one machine or even setting up new ALG
hosts.
ALGs create a single point of failure in the network. If the ALG is compromised, the entire
network becomes compromised.
6-12 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
ALG Firewall Device
ALG services run at the application level of the network protocol stack for each different type
of service (for example FTP or HTTP).
An ALG controls how internal users access the outside world and how Internet users access the
internal network. In some cases, the proxy blocks all connections coming from the outside and
only allows internal users to access the Internet. The only packets allowed back through the
proxy are those that return responses to requests from inside the firewall. In other cases, both
inbound and outbound traffic are allowed under strictly controlled conditions. The ALG
controls such connectivity by working as a filtering agent for internal or external users.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-13
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Stateful Packet Filtering
In the mid-1990s, packet filters and proxy servers were the two technologies used to build
firewall systems. As the number of applications that needed to pass through firewalls increased,
proxy server vendors could not keep up with the development of new proxy servers. On the
other hand, packet filtering also could not support the dynamic nature of the many modern
applications. Thus, a new technology was born.
Unlike static packet filtering, which examines a packet based on the information in its header,
stateful inspection tracks each connection and makes sure the connections are valid. A stateful
firewall may examine not just the header information but also the contents of the packet up
through the application layer in order to determine more about the packet than just information
about its source and destination.
For example, if the initial packet of a request arrives through the inside interface, the stateful
packet filter remembers certain details of that request. This remembering is called “saving the
state.” Each time a TCP or UDP connection is established for inbound or outbound
connections, the state information is logged in the stateful session table. When the outside
system responds to the initial request, the firewall compares the received packets with the saved
state to determine if it should be allowed into the network.
Stateful firewalling, also known as stateful packet filtering, is an application-aware method of
packet filtering that works on the connection level. A stateful packet filter is application-aware,
able to recognize all sessions of a dynamic application. In addition, a stateful packet filter
maintains a state table (or connection table), where it keeps track of all the active sessions over
the firewall.
6-14 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Stateful packet filtering is effective for these reasons:
It works on packets and connections.
It operates at a higher performance level than packet filtering or using a proxy server.
It records data for every connection or connectionless transaction in a stateful session flow
table. This table serves as a reference point to determine if packets belong to an existing
connection or are from an unauthorized source.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-15
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Stateful Firewall Operation
This topic describes the operation of a stateful firewall.
Stateful Firewalls
Application Awareness
Stateful packet filters are application-aware through additional inspection of passing traffic. By
inspecting the session more closely, up to the application layer, a stateful packet filter is able to
associate any dynamic channels of the application with the initial session of the application.
The concept of a session in the stateful packet filter world is mainly connected to the TCP and
UDP notion of a session. Some stateful packet filter implementations, however, can keep the
state of other protocols, such as the Internet Control Message Protocol (ICMP) or Generic
Routing Encapsulation (GRE).
Note Stateful packet filters do not usually change packet headers or payloads in any way.
Packets are only compared against the state table and, if permitted, are transmitted in their
original form. An SPF may optionally perform Network Address Translation (NAT) or Port
Address Translation (PAT). However, address or port translation is distinct from the stateful
packet filtering process.
6-16 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Stateful Packet FilterHandling of Different Protocols
Stateful firewalls provide different filtering granularity for various protocols.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-17
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Stateful Packet Filter Handling of Dynamic Applications
Dynamic applications, such as FTP, SQLnet, and many protocols used for voice and video
signaling and media transfer, open a channel on a well-known port, and then negotiate
additional channels through the initial session. Stateful firewalls support these dynamic
applications through application inspection features. The Stateful Packet Filter snoops the
initial session, and parses the application data to learn about the additional negotiated channels.
Then the Stateful Packet Filter usually enforces the policy that if the initial session was
permitted, any additional channels of that application should be permitted as well.
6-18 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Introducing the Cisco IOS Firewall Feature Set
This topic describes the key features of the Cisco IOS Firewall Feature Set.
The Cisco IOS Firewall Feature Set is a security-specific option for Cisco IOS software
available in security IOS images. It integrates robust firewall functionality, authentication
proxy, and intrusion prevention for every network perimeter, and enriches existing Cisco IOS
security capabilities. It adds more flexibility to existing Cisco IOS security solutions, such as
authentication, encryption, and failover, by delivering application-based filtering; dynamic per-
user authentication and authorization; defense against network attacks; Java blocking; and real-
time alerts. When combined with Cisco IOS IPsec software and other Cisco IOS software-
based technologies, such as Layer 2 Tunneling Protocol (L2TP) and quality of service (QoS),
the Cisco IOS Firewall provides a complete, integrated virtual private network (VPN) solution.
The Cisco IOS Firewall features are designed to prevent unauthorized external individuals from
gaining access to your internal network and to block attacks on your network, while at the same
time allowing authorized users to access network resources.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-19
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
NAT
IPsec network security
Event logging
User authentication and authorization
Authentication Proxy
You can create specific security policies for each user with Cisco IOS Firewall dynamic, per-
user authentication and authorization.
The authentication proxy feature allows a Cisco IOS router to intercept an HTTP or HTTPS
session and prompt the user for authentication. The authentication is typically offloaded to an
authentication, authorization, and accounting (AAA) server. In addition to just accepting or
denying the connection, the router can download an authorization profile from the AAA server
and apply that profile as an ACL to its interface. The profile includes information about the
services that are accessible to the connecting user. Consequently all other traffic will be denied.
6-20 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Cisco IOS Firewall
Cisco IOS Firewall is the Stateful Packet Filter engine of Cisco IOS routers.
Cisco IOS Firewall intelligently filters TCP and UDP packets based on application layer
protocol session information. It inspects traffic for sessions that originate on any interface of
the router and manages state information for TCP and UDP sessions. This state information is
used to create temporary openings in the ACLs to allow return traffic and additional data
connections for permissible sessions.
Inspecting packets at the application layer and maintaining TCP and UDP session information
helps prevent certain types of network attacks, such as SYN flooding. Cisco IOS Firewall
inspects packet sequence numbers in TCP connections to see if they are within expected ranges,
and drops any suspicious packets. Additionally, Cisco IOS Firewall can detect unusually high
rates of new connections and issue alert messages. The firewall inspection can help protect
against certain denial of service (DoS) attacks involving fragmented IP packets.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-21
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Cisco IOS Firewall Authentication Proxy
The Cisco IOS Firewall authentication proxy feature enables you to apply specific security
policies on a per-user basis.
Traditionally, user identity and related authorized access was associated with a user IP address,
or a single security policy had to be applied to an entire user group or subnet. Now, users can
be identified and authorized on the basis of the per-user policy, and access privileges tailored
on an individual basis are possible, as opposed to a general policy applied across multiple users.
With the authentication proxy feature, users can start an HTTP, HTTPS, FTP, or Telnet session
that traverses the router, and the router will intercept that session and prompt the user for
authentication, as shown in the figure. User-specific access profiles are then automatically
retrieved from a Cisco Secure Access Control Server (ACS) or other RADIUS or TACACS+
authentication server and applied to the router interface. The user profiles are active only when
there is active traffic from the authenticated users.
The authentication proxy is compatible with other Cisco IOS security features, such as NAT,
IPsec, and VPN client software.
6-22 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Cisco IOS Firewall IPS
The Cisco IOS Firewall IPS offers intrusion prevention technology for midrange and high-end
router platforms with firewall support.
Cisco IOS IPS is especially suited for locations in which a router is deployed and additional
security between network segments is required. It can protect intranet and extranet connections
where additional security is mandated, and branch-office sites connecting to the corporate
office or Internet.
The Cisco IOS Firewall IPS identifies 700 or more prepackaged common attacks using
signatures to detect patterns of misuse in network traffic. In addition to the predefined signature
database, administrators can define their own custom signatures. The intrusion prevention
signatures of the Cisco IOS IPS were chosen from a broad cross-section of intrusion prevention
signatures. The signatures represent severe breaches of security and the most common network
attacks and information-gathering scans.
When IOS IPS detects a match against a signature, IOS IPS can be configured to take one or
more of the actions listed in the table.
Signature Actions
Action Description
Reset Resets the TCP connection by sending TCP RST packets to both
the sender and receiver
Block attacker Blocks all communications from the offending IP address for a
specified time
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-23
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Action Description
Block connection Blocks the offending TCP or UDP session for a specified time
6-24 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Cisco IOS Firewall Functions
This topic describes how Cisco IOS Firewall combines the features of packet inspection and
proxy firewalls to provide an optimal security solution.
First, some basic ACL concepts need to be reviewed briefly. An ACL provides packet filtering.
It has an implied “deny all” at the end of the ACL, and if the ACL is not configured, it permits
all connections. Without Cisco IOS Firewall, traffic filtering is limited to ACL implementations
that examine packets at the network layer, or at most, the transport layer.
The static nature of classic ACLs has severe security implications for applications that
dynamically negotiate additional communication channels. Such dynamic channels must be
statically permitted through the ACLs. Attackers can misuse holes created in the ACLs for the
dynamic applications in order to inject malicious traffic into the protected network.
These shortcomings are addressed by the stateful packet filtering functionality available in
Cisco IOS Firewall.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-25
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Cisco IOS Firewall TCP Handling
The figure illustrates TCP filtering on a Cisco IOS Firewall router.
When the first packet from a TCP flow is received by the router (TCP SYN), the inbound ACL
on the inside secured interface is checked. If the packet is permitted, a dynamic session entry is
created. The session is described by endpoint addresses, port numbers, sequence numbers, and
flags. All subsequent packets belonging to this session will be checked against the current state
and discarded if invalid.
The figure illustrates the three-way handshake used in TCP. The first packet contains a random
sequence number and sets the TCP SYN flag. The second packet contains a random sequence
number generated by the responding host, an acknowledgment sequence number which is the
received sequence number incremented by one, and the TCP SYN and ACK flags set. The third
packet acknowledges the received packet by incrementing its sequence number in the
acknowledgment sequence, raising the sequence number by the appropriate number of
transmitted octets, and sets the ACK flag. All subsequent segments will increment their
sequence numbers by the number of transmitted octets and acknowledge the last received
segment by an increment of 1, according to the TCP state machine. After the three-way
handshake, all packets will have the ACK flag set, until the session is terminated.
Note Apart from stateful filtering, the router may perform other options, such as address
translation (NAT or PAT), or packet authentication (authentication proxy).
6-26 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Cisco IOS Firewall UDP Handling
A similar process is invoked when a UDP connection is established through a Cisco IOS
Firewall router.
The only difference from the TCP example is that UDP is not stateful, so the router cannot
track the sequence numbers and flags. There is no three-way handshake and no teardown
process. If the first packet from a UDP flow is permitted through the router, a UDP entry is
created in the connection table. The endpoint addresses and port numbers describe the UDP
connection entry. When no data is exchanged within the connection for a configurable UDP
timeout, the connection description is deleted from the connection table.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-27
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Cisco IOS Firewall Process
This topic describes the process of the Cisco IOS Firewall.
With Cisco IOS Firewall, you specify which protocols to inspect, and you specify an interface
and interface direction (in or out) where the inspection is applied. The firewall engine inspects
only the specified protocol packets if they first pass the inbound ACL applied to the inside
interface. If a packet is denied by the ACL, the packet is dropped and not inspected by the
firewall.
ACL entries on the inbound ACL applied to the outside interface are dynamically created and
deleted. Cisco IOS Firewall dynamically creates and deletes ACL entries at the firewall outside
interfaces, according to the information maintained in the state tables. These ACL entries are
applied to the outside interface in the inbound direction to examine traffic flowing back into the
internal network. These entries create temporary openings in the firewall to permit only traffic
that is part of a permissible session initiated from the inside. The temporary ACL entries are
never saved to NVRAM.
The figure illustrates the actions when a packet arrives at the Cisco IOS Firewall:
Step 1 A packet traveling through the inside interface triggers an inspection rule and an
entry to be logged in the connection state table.
Step 2 The IOS firewall opens a dynamic ACL entry allowing the return traffic to be
permitted through the outside interface inbound ACL.
Step 3 The IOS firewall filter engine keeps inspecting the incoming traffic from the outside
to permit the proper return traffic and blocks application attacks or misuses.
Step 4 When the session terminates, the IOS firewall filter engine removes the dynamic
information from the connection state table and removes the dynamic ACL entry.
6-28 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Cisco IOS Firewall inspects and monitors only the control channels of connections; the data
channels are not inspected. For example, during FTP sessions, both the control and data
channels (which are created when a data file is transferred) are monitored for state changes, but
only the control channel is inspected (that is, the firewall engine software parses the FTP
commands and responses).
Cisco IOS Firewall inspection recognizes application-specific commands in the control channel
and detects and prevents certain application-level attacks. The firewall engine recognizes
application-specific commands (such as illegal Simple Mail Transfer Protocol [SMTP]
commands) in the control channel, and detects and prevents certain application-level attacks.
When the IOS firewall suspects an attack, the IOS firewall can take several actions:
Generate alert messages
Protect system resources that could impede performance
Block packets from suspected attackers
The table lists the timeout and threshold values that Cisco IOS Firewall uses to manage
connection state information, helping to determine when to drop connections that do not
become fully established or that time out.
Value Description
Setting timeout values for TCP Helps prevent DoS attacks by freeing system resources.
and UDP sessions Timeouts can be set separately for TCP and UDP.
Setting threshold values for TCP Helps prevent DoS attacks by controlling the number of half-
sessions opened sessions, which limits the amount of system resources
applied to half-opened sessions. When a session is dropped, the
firewall sends a reset message to the devices at both endpoints
(source and destination) of the session. When the system under
DoS attack receives a reset command, it releases, or frees,
processes and resources related to that incomplete session.
Thresholds are configured only for TCP.
Cisco IOS Firewall provides three thresholds against TCP-based DoS attacks:
The total number of half-opened TCP sessions
The number of half-opened sessions in a time interval
The number of half-opened TCP sessions per host
If a threshold for the number of half-opened TCP sessions is exceeded, the firewall engine has
two options:
It can send a reset message to the endpoints of the oldest half-opened session, making
resources available to service newly arriving SYN packets.
It blocks all SYN packets temporarily for the duration configured by the threshold value.
When the router blocks a SYN packet, the TCP three-way handshake is never initiated,
which prevents the router from using memory and processing resources needed for valid
connections.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-29
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Supported Protocols
Cisco IOS Firewall supports a wide range of protocols.
Supported Protocols
You can configure the Cisco IOS Firewall to inspect these types of sessions:
All TCP sessions, regardless of the application layer protocol (sometimes called single-
channel or generic TCP inspection)
All UDP connections, regardless of the application layer protocol (sometimes called single-
channel or generic UDP inspection)
You can also configure Cisco IOS Firewall to specifically inspect certain application layer
protocols, which are listed in the table.
6-30 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Protocol Description Protocol Description
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-31
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Protocol Description Protocol Description
6-32 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Protocol Description Protocol Description
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-33
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Refer to the latest Cisco IOS documentation for the latest and full listing of the IOS Firewall
applications support.
When a protocol is filtered by the firewall, that protocol traffic is inspected, state information is
maintained, and, in general, packets are allowed back through the firewall only if they belong
to a permissible session.
6-34 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Alerts and Audit Trails
Cisco IOS Firewall generates real-time alerts and audit trails based on events tracked by the
firewall engine.
Enhanced audit trail features use syslog to track all network transactions, recording time
stamps, source host, destination host, ports used, and the total number of transmitted bytes, for
advanced, session-based reporting.
Real-time alerts send syslog error messages to central management consoles upon detecting
suspicious activity. Using firewall inspection rules, you can configure alerts and audit trail
information on a per-application protocol basis. For example, if you want to generate audit trail
information for HTTP traffic, you can specify that in the inspection rule covering HTTP
inspection.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-35
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Summary
This topic summarizes the key points that were discussed in this lesson.
Summary
6-36 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Lesson 2
Objectives
Upon completing this lesson, you will be able to describe the procedure to configure Cisco IOS
Firewall features using the CLI and SDM, explain the resulting configurations, and verify
firewall operations using SDM and show commands. This ability includes being able to meet
these objectives:
Explain the procedure to configure Cisco IOS Firewall from the Cisco IOS CLI
Explain when and how to use the Basic and Advanced Firewall Configuration wizards in
SDM
Explain how to configure a basic firewall using SDM
Explain how to configure the interfaces on an advanced firewall using SDM
Explain how to configure a DMZ on an advanced firewall
Explain how to configure inspection rules
Explain how to complete the Advanced Firewall wizard configuration by viewing the
settings in the Summary window
Explain how to use the SDM logging function to monitor firewall activity
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Configuring Cisco IOS Firewall from the CLI
This topic describes the procedure to configure Cisco IOS Firewall from the CLI.
To configure Cisco IOS Firewall through the CLI, you should perform the tasks described in
the figure. The first two tasks are discussed below, and the remaining tasks are covered on the
next pages.
Note Cisco IOS Firewall can be configured in two directions at one or more interfaces. Configure
the firewall in two directions when the networks on both sides of the firewall require
protection, such as with extranet or intranet configurations, and for protection against denial
of service (DoS) attacks.
6-38 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Permit traffic that should be inspected by the Cisco IOS Firewall. For example, if Telnet
will be inspected by the firewall, then Telnet traffic should be permitted on all ACLs that
apply to the initial Telnet flow.
Use extended ACLs to filter traffic entering the router from the unprotected networks. For
temporary openings to be created dynamically by Cisco IOS Firewall, the access control
list (ACL) for the returning traffic must be an extended ACL.
Note If your firewall only has two connections, one to the internal network and one to the external
network, using all inbound ACLs works well because packets are stopped before they get a
chance to affect the router itself.
Deny any inbound traffic (incoming on external interface) from a source address matching
an address on the protected network. This is known as antispoofing protection, because it
prevents traffic from an unprotected network from assuming the identity of a device on the
protected network.
Deny broadcast messages with a source address of 255.255.255.255. This entry helps to
prevent broadcast attacks.
By default, the last entry in an ACL is an implicit denial of all IP traffic not specifically
allowed by other entries in the ACL. Optionally, you can add an entry to the ACL denying
IP traffic with any source or destination address, thus making the denial rule explicit. This
is especially useful if you want to log information about the denied packets.
For complete information about how to configure IP ACLs, refer to the “Configuring IP
Services” chapter of the Cisco IOS IP Configuration Guide.
For complete information about Cisco IOS Firewall configuration, including optional
parameters, refer to
http://www.cisco.com/en/US/products/sw/iosswrel/ps1835/products_configuration_guide_chap
ter09186a00800ca7c5.html.
Note You do not necessarily need to configure an extended ACL at both the outbound internal
interface and the inbound external interface, but at least one is necessary to restrict traffic
flowing through the firewall into the internal protected network.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-39
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Set Audit Trails and Alerts
This section explains how to configure notification settings in Cisco IOS Firewall.
Router(config)#
ip inspect audit-trail
Router(config)#
no ip inspect alert-off
Router(config)#logging on
Router(config)#logging host 10.0.0.3
Router(config)#ip inspect audit-trail
Router(config)#no ip inspect alert-off
Turn on audit trail logging and real-time alerts globally to provide a record of network access
through the firewall, including illegitimate access attempts, and inbound and outbound services:
Step 1 Turn on logging to your syslog host using standard logging commands. Set the
syslog server IP address with the logging host command.
Step 2 Turn on Cisco IOS Firewall audit trail messages using the ip inspect audit-trail
command in global configuration mode.
Step 3 The Cisco IOS Firewall real-time alerts are off by default (the command ip inspect
alert-off is active by default). To enable real-time alerts, the no version of the
command is needed—so use no ip inspect alert-off command in global
configuration mode.
6-40 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Inspection Rules for Application Protocols
You must define inspection rules to specify which IP traffic (that is, which application layer
protocols) will be inspected by Cisco IOS Firewall at an interface.
Router(config)#
ip inspect name inspection-name protocol [alert
{on|off}] [audit-trail {on|off}] [timeout seconds]
Normally, you define only one inspection rule. The only exception might occur if you want to
enable the firewall engine in two directions at a single firewall interface. In this case you must
configure two rules, one for each direction.
An inspection rule should specify each desired application layer protocol that needs to be
inspected, as well as generic TCP, User Datagram Protocol (UDP), or Internet Control Message
Protocol (ICMP), if desired.
Note Generic TCP and UDP inspection dynamically permits return traffic of active sessions. ICMP
inspection allows ICMP echo reply packets forwarded as a response to previously seen
ICMP echo messages.
The inspection rule consists of a series of statements, each listing a protocol and specifying the
same inspection rule name. Inspection rules include options for controlling alert and audit trail
messages, and for checking IP packet fragmentation.
In the figure, the IP inspection rule shown is named FWRULE. This rule will inspect the
extended Simple Mail Transfer Protocol (SMTP) and FTP protocols with alert and audit trail
enabled, and an idle timeout of 300 seconds.
Use the ip inspect name command in global configuration mode to define a set of inspection
rules. Use the no form of this command to remove the inspection rule for a protocol, or to
remove the entire set of inspection rules.
ip inspect name inspection-name protocol [alert {on | off}] [audit-trail {on | off}] [timeout
seconds]
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-41
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
ip inspect name Parameters
Parameter Description
inspection-name Names the set of inspection rules. If you want to add a protocol to
an existing set of rules, use the same inspection name.
alert {on | off} (Optional) For each inspected protocol, the generation of alert
messages can be set to on or off. If no option is selected, alerts
are generated based on the setting of the ip inspect alert-off
command.
audit-trail {on | off} (Optional) For each inspected protocol, the audit-trail option can
be set to on or off. If no option is selected, audit trail messages
are generated based on the setting of the ip inspect audit-trail
command.
timeout seconds (Optional) Specify the number of seconds for a different idle
timeout to override the global TCP or UDP idle timeouts for the
specified protocol. This timeout overrides the global TCP and
UDP timeouts, but will not override the global Domain Name
Service (DNS) timeout.
6-42 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Apply an Inspection Rule to an Interface
Next, an inspection rule must be applied to an interface.
Router(config-if)#
ip inspect inspection-name {in | out}
Router(config)#interface e0/0
Router(config-if)#ip inspect FWRULE in
Use the ip inspect interface configuration command to apply a set of inspection rules to an
interface in either the inbound or outbound direction.
ip inspect inspection-name {in | out}
ip inspect Parameters
Parameter Description
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-43
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Guidelines for Applying Inspection Rules and ACLs to
Interfaces
For the Cisco IOS Firewall to be effective, both inspection rules and ACLs must be
strategically applied to all the router interfaces.
The general rule of thumb for applying inspection rules and ACLs on the router is as follows:
On the interface where traffic initiates:
— Apply the ACL in the inward direction that permits only wanted traffic.
— Apply the rule in the inward direction that inspects wanted traffic.
On all other interfaces, apply the ACL in the inward direction that denies all traffic, except
traffic that has not been inspected by the firewall, such as Generic Routing Encapsulation
(GRE) and ICMP that is not related to echo and echo reply messages.
6-44 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Example: Two-Interface Firewall
The figure shows a simple, two-interface Cisco IOS Firewall configuration example.
The simplest, clearest, and easiest-to-verify configuration results when both an ACL and an
inspection rule are applied inbound on an interface. Because such configurations are easy to
verify, the chance to leave backdoors is minimized.
In this example, the inspection rule OUTBOUND performs generic TCP, UDP, and ICMP
traffic. The access list OUTSIDEACL is applied to the outside interface and blocks all
incoming traffic except ICMP unreachable “packet-too-big” messages that support maximum
transmission unit (MTU) path discovery. The access list INSIDEACL, applied to the inside
interface in the inbound direction, permits all TCP, UDP and ICMP traffic initiated from the
inside network. The inspection rule OUTBOUND, applied to the inside interface in the inbound
direction, inspects the outbound packets and automatically allows the corresponding return
traffic.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-45
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Example: Three-Interface Firewall
The figure shows a Cisco IOS Firewall configuration example with three interfaces.
interface FastEthernet0/0
ip inspect OUTSIDE in
ip access-group OUTSIDEACL in
!
interface FastEthernet0/1
ip inspect INSIDE in
ip access-group INSIDEACL in
!
interface FastEthernet0/2
ip access-group DMZACL in
!
ip inspect name INSIDE tcp
ip inspect name OUTSIDE tcp
!
ip access-list extended OUTSIDEACL
permit tcp any host 200.1.2.1 eq 25
permit tcp any host 200.1.2.2 eq 80
permit icmp any any packet-too-big
deny ip any any log
!
ip access-list extended INSIDEACL
permit tcp any any eq 80
permit icmp any any packet-too-big
deny ip any any log
!
ip access-list extended DMZACL
permit icmp any any packet-too-big
deny ip any any log
In this example, inside users are permitted to browse the Internet. Outbound HTTP sessions are
allowed by the ACL INSIDEACL applied to the inside interface in inbound direction. Further,
outside clients are allowed to communicate with the SMTP server (200.1.2.1) and HTTP server
(200.1.2.2) located in the enterprise DMZ. Inbound SMTP and HTTP are permitted by the ACL
OUTSIDEACL applied to the outside interface in inbound direction. Additionally, ICMP
unreachable “packet-too-big” messages are accepted on all interfaces to support MTU path
discovery. The inspection rules include the generic TCP inspection and are applied to inbound
connections on the outside interface and to outbound sessions on the inside interface. The TCP
inspection will automatically allow return traffic of the outbound HTTP sessions and allow
return traffic of the inbound SMTP and HTTP sessions.
6-46 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Verifying Cisco IOS Firewall
Cisco IOS CLI offers several commands that verify the configuration and inspected sessions of
Cisco IOS Firewall.
Router#
show ip inspect name inspection-name
show ip inspect config
show ip inspect interfaces
show ip inspect session [detail]
show ip inspect statistics
show ip inspect all
Use the show ip inspect EXEC command to display information about various components of
Cisco IOS Firewall.
In this example, three TCP sessions have been established from host 10.0.0.3 to the host
172.30.0.50 and inspected by the Cisco IOS Firewall. The output of the command includes the
respective port numbers involved in the TCP communications.
show ip inspect {name inspection-name | config | interfaces | statistics | session [detail] | all}
Parameter Description
name inspection-name Shows the configured inspection rule for the inspection name.
statistics Shows the inspection statistics such as current session count and
max session counts.
session [detail] Shows existing sessions that are currently being tracked and
inspected by Cisco IOS Firewall. The optional detail keyword
shows additional details about these sessions.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-47
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Troubleshooting Cisco IOS Firewall
Cisco IOS CLI offers several commands that assist in troubleshooting Cisco IOS Firewall.
Router#
debug ip inspect function-trace
debug ip inspect object-creation
debug ip inspect object-deletion
debug ip inspect events
debug ip inspect timers
debug ip inspect detail
Router#
debug ip inspect protocol
• Protocol-specific debug
Use the debug ip inspect EXEC command to display messages about firewall events.
debug ip inspect {function-trace | object-creation | object-deletion | events | timers |
protocol | detailed}
Parameter Description
6-48 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Basic and Advanced Firewall Wizards
This topic describes when and how to use the Basic and Advanced Firewall Configuration
wizards in SDM.
SDM, a configuration and management tool for Cisco IOS routers using a GUI, offers a simple
method to set up the Cisco IOS Firewall. Depending on the number of router interfaces, you
will select either the Basic Firewall Configuration wizard, which supports only one outside
interface and one or more inside interfaces, or the Advanced Firewall Configuration wizard,
which, in addition to the inside and outside interfaces, also supports a DMZ interface.
The Basic Firewall Configuration wizard applies default access rules to both inside and outside
interfaces, applies default inspection rules to the outside interface, and enables IP unicast
reverse-path forwarding on the outside interface.
The Advanced Firewall Configuration wizard applies default or custom access rules, as well as
default or custom inspection rules, to inside, outside, and DMZ interfaces. Furthermore, the
Advanced Firewall Configuration wizard enables IP unicast reverse-path forwarding on the
outside interface.
Note Unicast reverse path forwarding checks incoming packets for IP source address integrity
and compares the source IP address with the routing table. If the packet arrived on one
interface and the IP route to the source network points to another interface, it means that the
packet traversed a suboptimal path and will be discarded.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-49
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Configuring a Basic Firewall
This topic describes how to configure a basic firewall.
2.
3.
4.
6-50 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Basic Firewall Interface Configuration
Next, the Basic Firewall Interface Configuration window appears.
In this window, identify the outside interface by selecting it from the Outside(untrusted)
Interface drop-down list, and the inside router interfaces by checking their check boxes in the
Inside(trusted) Interfaces section. You may select several inside interfaces. In the example,
the interface FastEthernet0/1 will not be affected because it is not selected.
At this stage, you can check the Allow secure SDM access from outside interfaces check box.
When selected, HTTPS access to the outside router interfaces will be permitted from the
untrusted domain. HTTP access will be denied. In this example, HTTPS access from outside is
not desired.
Click Next to proceed to the next window. You will receive a warning that you will not be able
to launch the SDM via the outside interface—in this case Serial0/0. Make sure that you are not
accessing the SDM through the outside interface, and click OK to proceed to the next task.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-51
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Basic Firewall Configuration Summary and Deployment
The final step of the wizard is the Internet Firewall Configuration Summary.
After clicking OK, you will get a summary of protection rules to be applied to the router.
Review this report, and if all of the rules are listed, click Finish and then OK to send the
commands to the device.
6-52 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Reviewing the Basic Firewall for the Originating Traffic
Next, you can verify and customize the firewall settings. The figure illustrates the policy for
outbound traffic.
When the firewall features are configured on the router, the wizard finishes and you are placed
in the Edit Firewall Policy / ACL tab of the Firewall and ACL menu. In this window, you can
review and modify the configured options. The figure illustrates how to view the ACL entries
applied for the originating traffic (ACL 100 in this example); in other words, you examine the
ACL that is applied to the inside interface in inbound direction.
ACL 100 will be applied inbound to the inside interface. It prevents spoofing by denying
packets sourced from 200.0.0.0/30 network, which is configured on the outside interface. The
ACL also blocks packets sourced from the broadcast address and the 127.0.0.0/8 network and
permits all other traffic.
The inspection rule name in this example is SDM_LOW
In this example, the firewall is active from the Fa0/0 to S0/0/0 direction, where Fa0/0 is in the
inside (trusted) interface and S0/0/0 is the outside (untrusted) interface. You can also verify that
the firewall is active by the firewall icon displayed inside the router icon.
If you select the View Option > Swap From and To interface, you will see that the firewall is
inactive from the S0/0/0 to Fa0/0 direction.
To view the ACL applied for the returning traffic, click the Returning traffic radio button.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-53
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Reviewing the Basic Firewall for the Returning Traffic
The figure illustrates the firewall policy for inbound traffic.
You can review the filter rules for returning traffic in a similar way as the rules for the
originating traffic. This window displays all ACL entries that have been applied to the outside
interface in inbound direction (ACL 101).
ACL 101 will be applied in inbound direction to the outside interface. The ACL permits ICMP
echo-reply, time-exceeded, and unreachable messages destined to the outside router interface
(200.0.0.1), and blocks packets sourced from private address ranges, the broadcast, and the
0.0.0.0 address. The final entry denies and logs all other packets.
6-54 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Resulting Basic Firewall Inspection Rule Configuration
Another verification method is to check the commands that have been applied to the router
using the CLI. This configuration has been generated by the SDM in previous pages.
This figure illustrates the inspection rule configuration that is applied to the router. The
SDM_LOW predefined rule inspects all protocols commonly used in enterprise networks. This
group includes: cuseeme, dns, ftp, h323, https, icmp, imap, pop3, netshow, rcmd, realaudio,
rtsp, esmtp, sqlnet, streamworks, tftp, tcp, udp, and vdolive. The tcp, udp, and icmp offer
generic inspection, while the remaining protocols require enhanced application awareness.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-55
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Resulting Basic Firewall ACL Configuration
This figure includes two ACLs that have been generated by the Basic Firewall Configuration
wizard and will be applied to the router interfaces.
6-56 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Resulting Basic Firewall Interface Configuration
Finally, the Basic Firewall Configuration wizard applies the configured ACLs and inspection
rules to the router interfaces.
Note SDM applies the inspection rule to the outside interface in outbound direction although it
was previously stated that applying inspection rules in inbound direction provides the most
clarity. That recommendation is especially valid in environments with many interfaces and
multiple flows. The SDM Basic and Advanced Firewall wizards operate in relatively simple
environments, so that recommendation is not followed.
In addition to the ACLs and inspection rules applied to the respective interfaces, unicast reverse
path forwarding is enabled on the outside interface.
Note In an Internet environment, the functionality of the unicast reverse path forwarding depends
on the existence of a default route (0.0.0.0 0.0.0.0). If there is no default route, and a packet
comes in from an unmatched IP address, it will be dropped by the unicast reverse path
forwarding feature.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-57
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Configuring Interfaces on an Advanced Firewall
This topic describes how to configure the interfaces on an advanced firewall.
Configuring Interfaces on
an Advanced Firewall
1.
2.
3.
4.
6-58 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Advanced Firewall Interface Configuration
Next, the Advanced Firewall Interface Configuration window appears.
In this window, identify the outside (untrusted) and the inside (trusted) interfaces by checking
their check boxes in the appropriate column, and the DMZ interface by choosing it from the
DMZ Interface (Optional) drop-down list. In addition, you can check the Allow secure SDM
access from outside interfaces check box. This allows HTTPS connectivity from the untrusted
domain. HTTP will be denied from outside.
Click Next to proceed to the next window. You will receive a warning that you will not be able
to launch the SDM via the outside interface—in this case Serial0/0/0.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-59
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Configuring a DMZ on an Advanced Firewall
This topic explains how to configure a DMZ on an advanced firewall.
6-60 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Advanced Firewall DMZ Service Configuration: TCP
Next, you optionally specify which TCP services are hosted on servers attached to the DMZ
interface.
When you click the Add button in the Advanced Firewall DMZ Service Configuration page,
the DMZ Service Configuration window appears. You must provide the server addresses and
select the DMZ services either by clicking the list of well-known services or by manually
specifying the port number. In this figure, an access to the web server running on server
192.168.0.2 port TCP/80 (identified as www service) is permitted.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-61
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Advanced Firewall DMZ Service Configuration: UDP
Next, you optionally specify which UDP services are hosted on servers attached to the DMZ
interface.
In this figure, Internet Security Association and Key Management Protocol (ISAKMP)
connectivity (UDP port 500) to the VPN server using the address 192.168.0.3 is permitted.
Note ISAKMP is the VPN protocol that negotiates parameters that will be used to encrypt and
authenticate data when the IPsec VPN tunnel is established. The data traversing the tunnel
will be encrypted using Encapsulation Security Payload (ESP) protocol within the IPsec.
Because ESP is not session-oriented, return ESP traffic cannot be dynamically permitted by
the firewall engine. In such a scenario, you would have to explicitly permit inbound ESP
traffic in the customization phase.
6-62 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Advanced Firewall DMZ
Service Configuration (Cont.)
After including all TCP and UDP services running on hosts attached to the DMZ interface in
the Advanced Firewall DMZ Service Configuration window, click the Next button to proceed
to the next task.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-63
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Advanced Firewall Security Configuration
This topic explains how to configure inspection rules.
After completing the DMZ service configuration, and clicking Next, the Advanced Firewall
Security Configuration window appears. Here you can define the inspection granularity for
services that run in the DMZ.
You have the option of choosing the default SDM application security policy by selecting the
Use a default SDM Application Security Policy and modifying its security level, or using a
custom policy.
You may preview the commands that constitute the SDM default policy by clicking the
Preview Commands button.
If you want to use a custom policy, you must either create a new policy or select an existing
one. In this example, no custom policies exist, so you need to create a custom policy by
selecting the Create a new policy option.
6-64 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Advanced Firewall Protocols and Applications
When defining a custom application security policy, you can select applications that should be
inspected by the firewall.
The applications are grouped into categories listed on the left side of the Application Security
window:
E-mail
Instant Messaging (IM)
Peer-to-Peer (P2P)
HTTP
Applications / Protocols, which includes the subcategories General, Network Services,
Applications, Voice, Multimedia, IPsec/VPN, Wireless, and User Defined.
You can browse through the menu, and select the protocols and applications that should be
inspected by the firewall.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-65
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Advanced Firewall Protocols
and Applications (Cont.)
In this example, you enable generic inspection for TCP and UDP protocols only. This
inspection will be applied in inbound direction to the inside interface.
6-66 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Advanced Firewall Protocols
and Applications (Cont.)
In addition to the generic TCP and UDP inspection, you want to activate the inspection for
FTP. This inspection will be applied in the inbound direction to the inside interface.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-67
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Advanced Firewall Inspection Parameters
You can modify the inspection parameters by clicking the Edit button in the upper-right corner
of the window.
The parameters that can be modified are alerts, audit, and timeout, and also whether local router
traffic should be inspected. You can set those parameters for each inspected protocol. In this
example, you want to keep most parameters unchanged and enable audit trail for TCP
inspection. Audit trail is disabled by default. Click OK twice to return to the main wizard
thread.
6-68 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Advanced Firewall Security Policy Selection
Next, you need to select the security policy to be deployed to the router.
Advanced Firewall
Security Policy Selection
You can verify that your custom policy will be deployed by clicking the Use a custom
Application Security Policy radio button and choosing the policy from the Policy Name drop-
down list. If you configured several policies, you would need to select which one to deliver to
the router. Click Next to proceed.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-69
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Complete the Configuration
This topic describes how to complete the Advanced Firewall Configuration wizard by viewing
the settings in the Summary window.
After selecting the application security policy in the Advanced Firewall Security Configuration
window, and clicking Next, the Internet Firewall Configuration Summary window appears. The
window lists all firewall rules that will be applied to the router interfaces. Click Finish to apply
the configuration to the router.
The wizard finishes and you are placed in the Edit Firewall Policy / ACL tab of the Firewall
and ACL menu. In this window, you can review and modify the configured options.
Such fine-tuning will be necessary in situations when non-TCP and non-UDP traffic, such as
ESP, must be permitted in inbound direction, or when separate inspection rules should be
applied to different interfaces.
Note If the SDM detects NAT or IPsec VPN configurations on the router already, it will
automatically adjust the ACLs so that NAT or IPsec VPN operations will not be affected.
6-70 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Resulting Advanced Firewall Inspection Rule Configuration
Finally, you can verify the router configuration using the CLI.
This figure illustrates the inspection rules configuration that is applied to the router. First, you
see the custom inspection rule appfw_100 that you created using the wizard. It will be applied
to the inside interface in inbound direction (for inspecting the outbound traffic from the inside
to outside). This rule includes generic TCP and UDP, as well as FTP inspection and enabled
audit trail for TCP traffic. The rule dmzinspect will be applied to the DMZ interface in
outbound direction (for inspecting traffic from the outside to the DMZ services) and checks
generic TCP and UDP.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-71
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Resulting Advanced Firewall ACL Configuration
The following ACLs are sent to the router as a result of the wizard.
This configuration includes three ACLs that will be applied to the router interfaces:
ACL 100 will be applied in inbound direction to the inside interface. The ACL prevents
spoofing by denying packets sourced from 200.0.0.0/30 and 192.168.0.0/24 networks,
which are configured on the outside and DMZ interfaces, respectively. The ACL also
blocks packets sourced from the broadcast address and the 127.0.0.0/8 network and permits
all other traffic.
ACL 101 will be applied in inbound direction to the DMZ interface. This ACL blocks and
logs all packets.
ACL 102 will be applied in inbound direction to the outside interface. The ACL prevents
spoofing by denying packets sourced from 192.168.0.0/24 and 10.1.1.0/24 networks, which
are configured on the DMZ and inside interfaces, respectively. The ACL permits ICMP
echo-reply, time-exceeded, and unreachable messages destined to the outside router
interface (200.0.0.1). It also permits packets destined to the DMZ servers—HTTP traffic to
host 192.168.0.2 and ISAKMP data to host 192.168.0.3. Next, the ACL blocks packets
sourced from private address ranges, the broadcast, and the 0.0.0.0 address. The final entry
denies and logs all other packets.
Note The Advanced Firewall wizard was used to permit HTTP (TCP/80) to the web server
(192.168.0.2) and ISAKMP (UDP/500) to the VPN server (192.168.0.3) residing in the DMZ.
The VPN server will communicate with its peers using both ISAKMP and ESP (IP/50).
Because ESP is stateless, the Advanced Firewall wizard did not allow ESP-based access to
the VPN server. In a real-life scenario, you will have to modify the ACL applied to the outside
interface (102) to permit ESP data to the VPN server.
6-72 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Resulting Advanced Firewall Interface Configuration
This figure describes the resulting interface configuration options.
Finally, the Advanced Firewall Configuration wizard applies the configured ACLs and
inspection rules to the router interfaces. Additionally, unicast reverse path forwarding is
enabled on the outside interface.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-73
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Viewing Firewall Activity
This topic explains how to use the SDM logging function to monitor firewall activity.
4.
3.
5.
6.
2.
6-74 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Viewing Firewall Log
This figure illustrates how to view the firewall log.
2.
After activating firewall logging, you can view the firewall log:
Step 1 Click the Monitor icon in the top horizontal navigation bar to enter the
configuration page.
Step 2 Click the Firewall Status icon in the left vertical navigation bar.
In the example, you see a number of packets that have been denied on the outside interface
because they did not comply to the firewall policy created by the firewall wizard. A number of
packets from an attacker using the address 1.1.1.1 have been dropped. The attacker attempted
to send ICMP, TCP (Telnet), and UDP packets to some high ports, probably using a traceroute.
The target systems were the two hosts in the DMZ: 192.168.0.2 and 192.168.0.3, and the inside
interface address 10.1.1.1.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-75
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Summary
This topic summarizes the key points that were discussed in this lesson.
Summary
References
For additional information, refer to these resources:
Cisco IOS IP Configuration Guide, Release 12.2 (also pertains to 12.3), Configuring IP
Services at:
http://www.cisco.com/en/US/products/sw/iosswrel/ps1835/products_configuration_guide_c
hapter09186a00800ae127.html
Configuring Context-Based Access Control at:
http://www.cisco.com/en/US/products/sw/iosswrel/ps1835/products_configuration_guide_c
hapter09186a00800ca7c5.html
6-76 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Lesson 3
Objectives
Upon completing this lesson, you will be able to explain the features, components, and
functionality of Cisco IOS IPS. This ability includes being able to meet these objectives:
Describe the functions and operations of IDS and IPS systems, and the difference between
IDS and IPS
Describe the types of IDS and IPS systems
Describe the four types of IDS and IPS signatures
Describe what happens when a signature is matched
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Introducing Cisco IOS IDS and IPS
This topic describes the functions and operations of IDS and IPS systems, and the difference
between them.
IDS Introduction
6-78 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Intrusion Protection System
IPSs are active devices in the traffic path, listening to network traffic and permitting or denying
flows and packets into the network.
IPS Introduction
All traffic passes through an IPS for inspection. Traffic arrives on one IPS interface and exits
on another.
When the IPS detects malicious traffic, it sends an alert to the management station and blocks
the malicious traffic immediately. The original and subsequent malicious traffic is blocked as
the IPS proactively prevents attacks.
Because network attack mechanisms are becoming more sophisticated, this proactive approach
is required to protect against network viruses, worms, malicious applications, and vulnerability
exploits.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-79
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Combining IDS and IPS
You should view IDS and IPS as complementary technologies that are often deployed in
enterprise networks in parallel.
The IPS actively blocks offending traffic and can be considered another implementation of a
firewall system. The IPS should be tuned to block only known malicious traffic in order to
avoid connectivity disruptions. An IDS can verify that the IPS is really blocking offending
traffic. In addition, the IDS can be configured to alert about the “gray area” traffic—data that is
neither clearly malicious nor clearly legitimate. Such traffic should not be blocked by IPS
because legitimate connectivity would be interrupted, but it may give a valuable insight into
potential problems or attack techniques, if configured properly.
6-80 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Types of IDS and IPS Systems
This topic describes the types of IDS and IPS systems.
IDS and IPS solutions can be grouped into these general classifications:
1. The approach to identify offending traffic
Signature-Based Approach
Signature-based pattern matching refers to searching for a fixed sequence of bytes in a single
packet, or predefined content. As its name suggests, it is an approach that is fairly rigid but
simple to employ. In most cases, the signature pattern is matched only if the suspect packet is
associated with a particular service or, more precisely, destined to or from a particular port.
This method lessens the amount of inspection done on every packet. However, it tends to make
it more difficult for systems to deal with protocols that do not reside on well-defined ports, and,
in particular, Trojan horses and their associated traffic, which can usually be moved at will.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-81
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Initially, there might be many alerts, but which are no threat for the network. After the system
is tuned and adjusted to the specific network parameters, there will be fewer false alerts than
with the policy-based approach.
Policy-Based Approach
The policy-based approach uses some type of algorithm on which to base alarm decisions. An
example of this type of policy is a policy that would be used to detect a port sweep. This policy
looks for the presence of a threshold number of unique ports being scanned on a particular
machine. The policy may further restrict itself through the specification of the types of packets
that it is interested in (for example, SYN packets). Additionally, there may be a requirement
that all the probes must originate from a single source.
Policies of this type require some threshold manipulations to make them conform to the
utilization patterns on the network they are monitoring. This type of policy may be used to look
for very simple statistical events or complex relationships.
Anomaly-Based Approach
Anomaly-based signatures are typically engineered to look for network traffic that deviates
from what is considered “normal.” The main issue regarding this methodology is the definition
of “normal.” Some systems have hard-coded definitions of “normal” traffic patterns.
Other systems are designed to learn “normal” traffic behavior, but the challenge with these
systems is to eliminate the possibility of improperly classifying abnormal behavior as normal.
Consequently, while relatively easy to implement in small environments, the anomaly-based
approach can be difficult to deploy in large networks.
Honeypot Approach
Honeypot systems provide a dummy server to attract attacks. The philosophy of the honeypot
approach is to distract attacks away from the real network devices. The honeypot offers the
possibility of analyzing incoming attacks and malicious traffic patterns in order to be prepared
when this type of traffic hits the real network. When implementing honeypots, dedicate servers
that can be sacrificed to be compromised, and never trust such systems, because they may have
been compromised without you noticing it.
Host-Based IPS
In a host-based system, a host-based intrusion prevention system (HIPS) examines the activity
on each individual computer or host. The HIPS has full access to the internals of the end
station, and can relate incoming traffic to the activity on the end station to understand the
context. In VPN environments, where encrypted traffic flows through the network, the HIPS is
the only option to examine traffic in plaintext. However, HIPS is typically written for a specific
operating system and does not protect against lower level attacks, such as attacks targeting
Layers 1 through 3 of the Open System Interconnection (OSI) model. Another disadvantage is
that the attacker, after sufficient reconnaissance, can detect the host existence, and possibly
even discover that the host is being protected by HIPS.
Network-Based IPS
In a network-based system, or network intrusion prevention system (NIPS), the individual
packets flowing through a network are analyzed. NIPS can detect malicious packets that are
overlooked by simplistic filtering rules of a firewall. NIPS is placed inside the network and
allows verification of all network traffic, or at least of the critical areas in the network. NIPS
can prevent lower-level attacks but cannot investigate encrypted traffic that passes through the
sensor. NIPS sees attacks taken out of context, which can limit correlation capabilities and
severity judgment.
6-82 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Signature-Based IDS and IPS
To determine an attack signature, which is usually a well-known pattern of attack, IDS and IPS
inspect packet headers or data payloads and match them against a signature database.
A signature is a sequence or a string of bytes in a certain context. The context may be the
position of the sequence in the data flow, a part of a valid command in the application layer
protocol, or a combination of options in the IP datagram. The following are some signature
examples:
Attacks against a web server are usually in the form of specially crafted URLs, so the IDS
and IPS look for the signature at the start of the data flow, which begins with an HTTP
request from the client.
An attack against a Simple Mail Transfer Protocol (SMTP) server may be in the form of a
buffer overflow in the mail from command of the SMTP session. IDS and IPS will look
for an attack signature in the SMTP session that starts with the mail from command, and
includes a particular pattern before the end of the line.
An attack on the mail client may be in the form of a buffer overflow in the Multipurpose
Internet Mail Extension (MIME) header of the message itself. IPS or IDS will look for the
sequence of bytes that identifies the start of a new MIME part in the message, and a
sequence of bytes that compose a buffer overflow following it.
These examples illustrate the fact that a signature-based IDS and IPS only detects attacks that
have been entered into a database by the vendor or the administrator. Usually, IDS and IPS will
be unable to detect undiscovered or unreported attacks (day zero attacks). Therefore, all
signature-based IDSs and IPSs place a certain amount of burden on the administrators, as they
must regularly update the signature database. Usually, the manufacturers publish database
updates. If not, the administrator must create custom signatures that will cover these attacks.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-83
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Policy-Based IDS and IPS
Policy-based IDS and IPS block or alarm if a violation of a configured policy occurs.
6-84 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Anomaly-Based IDS and IPS
Anomaly-based IDSs and IPSs monitor the network for events and content that represent an
anomaly, or a departure from normal behavior.
An anomaly may be an unusual increase in a certain type of traffic, an occurrence of some type
of traffic not usually present on a monitored network, or a malformed message of a known
protocol.
These are the two types of anomaly-based IDSs and IPSs:
Statistical anomaly detection: This type of anomaly-based system approach learns about
the profile of the monitored network (traffic patterns) from the network itself over a period
of time. After that period, the system can detect if statistical properties of the network
traffic deviate enough from the usual pattern, and if they do, the system triggers an alarm.
Nonstatistical approach: This type of anomaly-based system has a predefined definition
of a known good behavior, usually coded by the vendor, and triggers when an event outside
such a profile occurs. These are examples of events that can be considered malicious by
nonstatistical anomaly IPS or IDS systems:
— A communication between two devices using Internetwork Package Exchange (IPX)
in a network where only TCP/IP protocol is used
— An occurrence of a routing protocol update originating from a user device
— A broadcast storm or a network sweep
— An anomalous packet, such as a “Christmas tree” packet in which all TCP flags are
set, or a TCP segment in which the source and destination IP addresses are the same,
and the TCP source and destination ports are the same.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-85
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Honeypot
Honeypots are a special type of IDS used to lure the attacker either to leave the real targets
alone or to give the administrator the time to tighten the defense.
Honeypot
Examples
A classic honeypot is a UNIX system, which allows the attacker to log in, for example, using
weak passwords or no passwords for certain accounts. When the attacker logs in, the
administrator usually sets up a fake environment (a “jail”), in which the administrator can
monitor the actions of the attacker.
Some people have built so-called spam honeypots—mail servers, which appear to be open
relays, but in fact simply suck spamming e-mail in (attracting spam senders), and route it to the
bit bucket.
6-86 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Network-Based and Host-Based IPS
IPS systems can differ in their operational scope.
Network-Based and
Host-Based IPS
Note The classification into network-based and host-based systems applies to IDS in the same
way as it applies to IPS. For simplicity, the lesson refers to IPS only, because Cisco IPS
encompasses a wider functionality than IDS.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-87
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Network-Based Versus Host-Based IPS
The figure shows how NIPS and HIPS complement each other.
While NIPS focuses on detecting buffer overflows, attacks on web servers, network
reconnaissance, and denial of service (DoS) attacks, HIPS focuses on application and host
resource protection.
A significant advantage of HIPS is that it can monitor operating system processes and protect
critical system resources, including files that may exist only on a specific host. HIPS combines
behavioral analysis and signature filters. HIPS can also combine the best features of antivirus,
network firewalls, and application firewalls in one package.
A simple form of HIPS enables system logging and log analysis on the host. However, this
approach can be extremely labor-intensive. HIPS requires software such as the CSA to be
installed on each host to monitor activity performed on and against the host. The CSA performs
the intrusion prevention analysis and protects the host.
6-88 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
NIPS Features
NIPS Features
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-89
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
NIDS and NIPS Deployment
For NIPS and network IDS (NIDS), the placement of sensors in the network is of crucial
importance.
The figure illustrates a typical NIPS and NIDS deployment. Sensors are deployed at network
entry points that protect critical network segments. The network segments have internal and
external corporate resources. The sensors report to the Management Server located inside the
corporate firewall.
6-90 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
IDS and IPS Signatures
This topic describes the four types of IDS and IPS signatures.
Signature Categories
A signature detects patterns in network traffic that should generate an alarm or drop packets.
The IPS mechanism that matches the signatures against data packets is called a microengine.
An IPS system contains several microengines and each microengine handles a set of signatures,
typically grouped together by protocol or some other common characteristics.
Generally, there are four categories of signatures:
Exploit signatures: Since exploit signatures typically identify a traffic pattern unique to a
specific exploit, each exploit variant may require its own signature. Attackers may be able
to bypass detection by slightly modifying the attack payload. Therefore, it is often
necessary to produce an exploit signature for each attack tool variant.
Connection signatures: Connection signatures generate an alarm based on the conformity
and validity of the network connections and protocols.
String signatures: The string signature engines support regular expression pattern
matching and alarm functionality.
DoS signatures: DoS signatures contain behavior descriptions that are considered
characteristic of a DoS attack.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-91
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
When malicious traffic passes through the sensor, one or more sensor microengines are
activated to inspect the data. Each microengine controls a set of signatures. The sensor must
decide which microengine to activate for scanning of the associated signatures. This selection is
based on:
The network protocol of the traversing traffic
The type of the operating system a signature is associated with
The session port
Type of attack
For IPS sensor platforms, such as the Cisco IPS 4200 Series, there are about 1500 signatures
available, while for the IOS IPS, there are about 1200 signatures. Cisco IOS IPS uses SDFs that
contain signature descriptions for the most relevant attacks and are updated by Cisco on a
regular basis.
6-92 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Exploit Signatures
Exploit-specific signatures seek to identify network activity or upper-level protocol transactions
that are unique to a specific exploit or attack tool.
Exploit Signatures
The specificity of exploit signatures may provide an analyst with some insight into the
methodology of an attacker, and may allow the analyst to identify and mitigate targeted
vulnerabilities. Exploit signatures are often relatively easy to produce for simple protocols and
attacks, and are often employed in “pattern matching” IDS and IPS products. Examples of
exploit signatures are grouped by OSI layer.
These are examples of exploit signatures in the network layer:
The most common fragmentation attack attempts to exhaust target resources by sending
many noninitial fragments and tying up reassembly buffers.
Target systems may be configured to not accept IP datagrams with certain IP options, such
as source routing. Signatures may analyze these datagrams before they are discarded. The
configuration for this analysis is based upon the target operating system or the default. This
analysis is enabled by default, but may be turned off for performance.
Distributed DoS attacks are the “next generation” of DoS attacks on the Internet. Examples
of such attacks on the network layer include Internet Control Message Protocol (ICMP)
echo request floods, and ICMP directed broadcasts (also known as smurf attacks).
These are examples of exploit signatures in the transport layer:
Port sweeps, in which the attacker sends packets to all well-known TCP and User
Datagram Protocol (UDP) ports of a host or network. Port sweeps provide a complete list
of all services running on the hosts.
TCP SYN flooding, aimed at compromising the availability of a server that runs out of
resources to serve legitimate sessions.
These are examples of exploit signatures in the application layer:
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-93
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
When hackers attempt to penetrate a particular network, they often need to learn as much
information as possible about the network before launching attacks. Examples include
Domain Name System (DNS) queries, which reveal information such as who owns a
particular domain and what addresses have been assigned to that domain.
Malicious code operating at the application layer includes worms, viruses, Trojan horses,
adware, and malware.
6-94 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Signature Examples
This topic describes some examples of signatures implemented in Cisco IOS IPS.
Signature Examples
ID Name Description
The table lists examples of selected signatures with their description explaining the signature
operations.
Signature Examples
1101 Unknown IP Triggers when an IP datagram is received with the protocol field
Protocol set to 134 or greater. These protocol types are undefined or
reserved, and should not be used. Use of undefined or reserved
protocol types may be indicative of establishment of a proprietary
communication channel. No known exploits implement this
concept. This does not preclude the possibility that exploits do
exist outside of the realm of Cisco Systems knowledge domain.
1307 TCP Window Fires when the TCP window varies in a suspect manner.
Size Variation
3002 TCP SYN Port Triggers when a series of TCP SYN packets have been sent to a
Sweep number of different destination ports on a specific host. This is
indicative that a reconnaissance sweep of your network may be in
progress. This may be the prelude to a more serious attack. For
testing purposes, this sweep can be generated using a widely
available public domain tool called nmap.
3227 WWW HTML Triggers when an attempt is made to view files above the HTML
Script Bug root directory.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-95
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Cisco IOS IPS Signature Definition Files
This section describes how SDFs work.
The Cisco IOS IPS acts as an in-line intrusion detection sensor, watching packets and sessions
as they flow through the router, and scanning each packet to match any of the Cisco IOS IPS
signatures. When the IPS detects suspicious activity, it responds before network security can be
compromised, and logs the event through syslog or Security Device Event Exchange (SDEE)
protocol.
Note SDEE is an application level communication protocol that is used to exchange IPS
messages between IPS clients and IPS servers. It provides a secure communication path
using Secure Socket Layer (SSL) (Secure HTTP [HTTPS]). SDEE replaced the Post Office
Protocol (POP) on Cisco IOS routers.
Cisco IOS IPS offers configuration flexibility by providing these two functions:
The administrator can load the built-in signature database (available in the IOS image
itself), load a specific signature database file (sdf), or even merge different databases to
extend the protection scope.
Individual signatures can be disabled or tuned in case of false positives.
IPS signature files are dynamically updated and posted to Cisco.com on a regular basis. Thus,
customers can access signatures that help protect their network from the latest known network
attacks. Multiple definition sources are available, such as the default, built-in signatures that are
shipped with the routers, or the SDF files named 64MB.sdf, 128MB.sdf, and 256MB.sdf. They
differ in the number of configured signatures. The administrator should select the appropriate
SDF file based on the amount of RAM memory in the router. The SDF files are dynamically
updated and accessed from Cisco.com.
6-96 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Cisco IOS IPS Alarms
This topic describes what happens when a signature is matched.
When a signature is matched, the IPS responds in real time, before network security can be
compromised, and logs the event through Cisco IOS syslog messages or SDEE. You can
configure IPS to choose the appropriate response to various threats. When packets in a session
match a signature, IPS can take any of these actions, as appropriate:
Send an alarm to a syslog server or a centralized management interface. This action is
typically combined with other preventive actions.
Drop the packet. This action is effective for all IP protocols and does not affect any
legitimate user if the source IP address was spoofed.
Reset the connection. This action works only for TCP sessions.
Note The sensor sends TCP RST to both communication endpoints and spoofs the source IP
address in those TCP RST packets. For example, if A and B were communicating via TCP,
the sensor sends RST to A pretending to be B, and to B pretending to be A.
Block traffic from the source IP address of the attacker for a specified amount of time. This
action imposes a penalty on the attacker IP address.
Block traffic on the connection on which the signature was seen for a specified amount of
time. This action imposes a penalty on the attacker session.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-97
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Cisco IOS IPS Alarm Considerations
This section describes additional issues that you should consider when implementing
signatures.
You can configure a combination of actions when a signature is triggered. Typically, you
would combine an alert with some preventive action, such as packet drop.
Cisco IOS IPS can report IPS intrusion alerts either using syslog or SDEE. SDEE is more
secure and therefore recommended, because it uses HTTPS to exchange data. Cisco IOS routers
use SDEE to report IPS events to the SDM.
Note Although SDM provides secure communications, its monitoring capabilities are limited in that
it is not a real-time monitoring tool and it does not offer advanced filtering and correlation
features. For a fully functional monitoring solution, deploy other Cisco tools, such as Cisco
Security Monitoring, Analysis, and Response system (CS-MARS) or CiscoWorks Monitoring
Center for Security, which is a component of the VPN/Security Management Solution.
6-98 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Summary
This topic summarizes the key points that were discussed in this lesson.
Summary
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-99
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
6-100 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Lesson 4
Objectives
Upon completing this lesson, you will be able to describe the procedure to configure Cisco IOS
IPS operations using SDM. This ability includes being able to meet these objectives:
Configure and verify IOS IPS using the CLI interface
Describe the Cisco IOS IPS tasks you can complete with SDM
Select interfaces and configure SDF locations within the SDM IPS Policies wizard
View the IPS policy summary and deliver the IPS configuration to the router using the
SDM IPS Policies wizard
Configure IPS policies and global settings using the SDM
View SDEE messages in the SDM
Tune signatures using the SDM
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Configuring Cisco IOS IPS
This topic describes how to configure IPS on Cisco IOS routers.
6-102 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Basic IOS IPS Configuration
The figure shows a simple Cisco IOS IPS configuration.
The default command ip ips sdf builtin does not appear in this IPS configuration example
because the configuration specifies the default built-in SDF. This file contains 100 signatures,
but with sub-signatures, the total number is 132. The keyword builtin is the default option of
the ip ips sdf command.
The command ip ips fail closed instructs the router to drop all traffic if any of the SMEs that
should scan the data are not available. This command has no other parameters. If the SMEs are
unavailable and you want to forward the packets without scanning, use the no ip ips fail closed
command.
The command ip ips name SECURIPS is used to create an IPS rule. The IPS rule is combined
with an ACL (list 100). This optional standard or extended ACL filters the traffic that will be
scanned. If the packet is permitted by the ACL, the signature will be scanned and reported; if
the packet is denied by the ACL, it will bypass the scanning engine and go directly to its
destination.
At the end, the IPS rule is applied to a router interface (ip ips SECURIPS in). IPS rules can be
applied to an interface in either the inbound or outbound direction. In this example, the rule is
applied inbound to the interface, as specified by the parameter in. Typically, it is recommended
to apply the rules in inbound direction.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-103
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Enhanced Cisco IOS IPS Configuration
This enhanced configuration example is a continuation of the basic IOS IPS configuration.
interface Serial0/0
ip address 172.31.235.21 255.255.255.0
! Reapply the IPS rule to take effect
ip ips SECURIPS in
...
In this enhanced Cisco IOS IPS configuration example, the first command, copy flash:attack-
drop.sdf ips-sdf, merges the attack-drop.sdf file in flash with the built-in SDF that has been
loaded as a result of the basic configuration.
The second command, copy ips-sdf flash:my-signatures.sdf, copies the resulting merged SDF
to flash so that the signature database becomes usable after a router reload.
The configuration command ip ips sdf location flash:my-signatures.sdf specifies a new SDF
location pointing to the merged SDF file in the flash.
The command ip ips signature 1007 0 disable deactivates the signature with ID 1107 and sub-
signature ID 0.
The command ip ips signature 5037 0 delete marks the signature with ID 5037 and sub-
signature ID 0 for deletion. The signature will be removed when the signatures are reloaded or
saved.
The command ip ips signature 6190 0 list 101 filters the traffic prior to scanning by the
signature with ID 6190 and sub-signature ID 0. If the packet is permitted by the ACL, the
signature will be scanned; if the packet is denied by the ACL, the signature is deemed disabled.
Finally, the IPS rule needs to be reapplied to the interface for the changes in SDF to take effect.
You can do so by unbinding the IPS rule from the interface and assigning the rule to the
interface again (using the no ip ips SECURIPS in and ip ips SECURIPS in commands in
interface configuration mode).
6-104 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Verifying IOS IPS Configuration
You can verify the Cisco IOS IPS configuration and parameters by using the show ip ips
configuration EXEC command, and the sample resulting output is shown in the figure.
The merged SDF (my-signatures.sdf) is configured as the SDF location. Built-in signatures are
reported to not have been loaded. This is correct, although in this example they are included in
the merged signature file and effectively loaded from the flash location. The fail-close is
activated. The total number of signatures (183) results from merging the built-in signatures
(132) with the signatures from attack-drop.sdf (51). The signature 1107:0 is disabled, signature
6190:0 is filtered, and the signature 5037:0 has been deleted and does not appear in this output.
The rule SECURIPS is referencing ACL 100 and is applied to Serial0/0 in inbound direction.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-105
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Cisco IOS IPS SDM Tasks
This topic describes the Cisco IOS IPS tasks you can complete with SDM.
The SDM provides a wide range of configuration capabilities for Cisco IOS IPS. All options
are configurable through the IPS Edit menu.
Additionally, SDM offers the IPS Policies wizard, which expedites the deployment of default
IPS settings. The wizard provides configuration steps for interface and traffic flow selection,
SDF location, and signature deployment. The wizard also verifies the available router resources
before the commands are sent to the router. The IPS Policies wizard configures IPS using
default signature descriptions, as defined in the SDF files provided by Cisco, or the built-in
signatures included in the Cisco IOS.
If you want to customize the signatures after the wizard deploys the default settings, you should
use the IPS Edit menu available in SDM. Using the Edit menu, you can modify any signature
parameter, as well as disable and delete the signatures.
6-106 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Selecting Interfaces and Configuring SDF
Locations
This topic describes how to launch the IPS Policies wizard available in the SDM.
Customization
4. options
To access the IPS configuration options available in the SDM, follow this procedure:
Step 1 Click the Configure icon in the top horizontal navigation bar to enter the
configuration page.
Step 2 Click the Intrusion Prevention icon in the left vertical navigation bar.
Step 3 To activate IPS functionality using default signature descriptions, click the Create
IPS tab and click the Launch IPS Rule Wizard button.
Step 4 To configure all IPS features, including the signature customization options, you
may optionally select the Edit IPS tab.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-107
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
IPS Policies Wizard Overview
Next, the wizard provides an overview of functions that will be configured on the router.
After clicking the Launch IPS Rule Wizard button, a window opens, describing the tasks
through which the IPS Policies wizard will guide you. You will select the interfaces to apply
the IPS rules to, select traffic flow direction to be inspected by the IPS rules, and specify the
SDF location. Click Next to proceed to the interface selection.
6-108 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Identifying Interfaces and Flow Direction
The wizard requires you to provide details about the interfaces and flow directions.
After you have clicked Next in the wizard Welcome page, you must specify where the IPS
microengines should scan the traffic. The wizard will create an IPS rule that will be applied to
an interface. Provide the interface name and the direction in which to assign the IPS rule to. In
typical environments, you will apply the rules in inbound direction on interfaces where
incoming malicious traffic is likely.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-109
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Selecting SDF Location
The wizard needs to load the signature database.
Next, you must specify which SDF should be used to load the signatures, and its location. Click
the Add button to provide the information about the SDF location.
Additionally, there is the Use Built-in Signatures (as backup) check box. If checked, the
Cisco IOS built-in signature set will be used if the signatures cannot be loaded from the
specified location or if no SDF location has been configured.
6-110 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Selecting SDF Location (Cont.)
Select location
from flash
Select location
from network
After clicking the Add button, you can specify the SDF location in the flash memory or on a
network server.
Note Cisco publishes multiple types of SDFs. If you use the Cisco installation program for SDM
installation, the most appropriate type of the SDF file is automatically copied to the flash
memory based on the amount of the installed RAM.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-111
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Selecting SDF Location (Cont.)
Next, you see a screen showing the currently configured SDF locations. You may configure
more than one SDF location by clicking the Add button. If you configure more than one SDF
location, Cisco IOS will try to load them, starting from the top of the list. If IOS fails to load
the SDF from the first location in the list, it will try the subsequent locations one by one until it
successfully loads the SDF file.
Click Next to proceed to the next task, in which you will view and deploy the IPS
configuration.
6-112 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Viewing the IPS Policy Summary and Delivering
the Configuration to the Router
This topic describes how to view the IPS policy summary offered by the SDM and deliver the
configuration to the router.
After clicking Next in the SDF locations window, the IPS Policies wizard displays a summary
of the changes that will be deployed to the router. The wizard includes information about the
interfaces and direction in which the IPS rules will be applied, the SDF location, and whether
built-in signatures are enabled for backup usage.
Deploy the configuration by clicking the Finish button.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-113
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Verifying IPS Deployment
After the IPS commands generated by the wizard are sent to the router, you are brought to the
Edit IPS tab.
1.
2.
3.
4.
In the menu under the Edit IPS tab, you can verify and modify the configured settings, as well
as view and tune the available signatures.
The Edit IPS menu is divided into four sections:
1. IPS policies
2. Global settings
4. Signatures
6-114 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Configuring IPS Policies and Global Settings
This topic describes how to customize IPS policies and global settings. You need to perform
these steps:
View and, if needed, modify the IPS policies.
View and, if needed, change the global settings.
IPS Policies
Click IPS Policies in the menu part of the Edit IPS tab to verify the assignment of IPS rules to
the router interfaces. In the example, the only enabled IPS rule is attached to the Serial0/0/0
interface in the inbound direction. This configuration matches the settings you previously
submitted in the IPS Policies wizard. It corresponds to the Identifying Interfaces and Flow
Direction step of the IPS Policies wizard, in which the IPS rule was applied inbound to the
outside interface (Serial0/0/0).
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-115
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Global Settings
This section describes how to modify IPS global settings using the SDM.
Global Settings
Click Global Settings in the menu of the Edit IPS tab to view and modify the general IPS
settings configured on the router. These settings include reporting settings using two protocols:
syslog and SDEE.
You also see the status of the fail-closed setting. SDM default is fail-closed disabled. If
enabled, the router will drop all packets if the IPS engine is unable to scan data. Finally, you
can verify if the built-in signatures have been enabled for backup purposes if the configured
SDF is unavailable or cannot be loaded.
If you want to modify any of these global settings, click the Edit button in the upper-right
corner of the window to perform the desired changes. A configuration window will open, in
which you can modify any parameters visible in the figure.
6-116 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Viewing SDEE Messages
This topic describes how to view the SDEE messages. You will perform these steps:
View all SDEE messages.
View SDEE status messages.
View SDEE alerts.
Select message
type for viewing
The SDM offers you the option to view the SDEE messages if you click SDEE Messages in
the middle part of the Edit IPS tab. By default, all message types are displayed in the window.
You can limit the number of presented messages by selecting the category from the SDEE
Messages drop-down list in the upper-right corner.
Note This SDEE Messages view does not work in real time. If you want to display the current
messages, you need to click the Refresh button in the upper right corner of the window.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-117
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Viewing SDEE Status Messages
You can use the SDM to view the SDEE status messages.
Select Status from the SDEE Messages drop-down list to display the status events only.
This view includes reports about the status of all IPS engines. You can see the compilation
results for engines that contain some signatures associated with it, along with their status. You
can also see which engines have not been built because there were no signatures associated
with them. You can identify such engines by looking for the ENGINE_BUILD_SKIPPED:
[engine name] – there are no new signature definitions message. In this example, that is the
case for the MULTI-STRING engine.
6-118 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Viewing SDEE Alerts
You can use the SDM to view the SDEE alerts.
Signatures fire
SDEE alerts
Select Alerts from the SDEE Messages drop-down list to view the alerts only.
The alerts are fired by the enabled signatures included in the loaded SDF. The messages display
all the details of a firing signature, such as the target and attacker IP address, alarm severity,
signature ID and sub-ID, signature name, and more.
Note Although you can view all the details about a specific alert, this view is not intended to
provide real-time monitoring capabilities. It has no filtering, search, or correlation functions
that are necessary for a monitoring solution.
In the example, you can see that a hacker has been attempting to attack the Internet Information
Server (IIS) Unicode, IIS Dot Dot Execute, and the WWW Directory Traversal against a
protected system. The signatures 3215, 3216, and 5114 fired alarms with medium severity
levels. Scrolling the tab would allow you to view the attacker and target IP address and other
information.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-119
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Tuning Signatures
This topic describes how to tune IPS signatures using the SDM.
Selecting a Signature
Edit signature
To view the parameters of a specific signature, or tune the signature settings, click Signatures
in the middle part of the Edit IPS tab, select the appropriate signature category from the list in
the middle of the window, and locate the desired signature in the right part of the window. You
can also use the search options Select by and Criteria available at the top of the window to
find the signature easily.
In the example, you want to view and modify the settings of the signature named Invalid DHCP
Packet with number 4619 listed under the Attack category. Select the signature and click the
Edit button to launch a signature edit window.
6-120 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Editing a Signature
The SDM allows you to modify signature parameters.
Editing a Signature
Click to edit
Select severity
When the Edit Signature window opens, you can view the current signature settings. Select an
option that you want to modify by clicking the green square next to the option. The green
square turns red and you can select the desired settings from the drop-down list associated with
the respective parameter.
In the example, the alarm severity is increased from the default value of medium to high. Click
OK to apply the change to the router.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-121
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Disabling a Signature Group
SDM allows you to disable individual signatures or entire signature groups.
1.
Select category
4.
In the example, the IOS router protects a network that contains only Windows hosts. To tune
the active signatures better into your environment, you decide to disable all UNIX-related
signatures, as follows:
Step 1 Select the UNIX sub-tree under the OS signature category.
Step 2 Click the Select All button to select all signatures in the selected category.
Step 3 Click the Disable button to disable all selected signatures on the IOS router.
Step 4 Click the Apply Changes button to deliver the configuration to the device.
6-122 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Verifying the Tuned Signatures
After you deliver the configuration to the IOS router, you can verify the current settings by
viewing the signatures in the respective category.
In the example, you see that all UNIX-related signatures have in fact been disabled.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-123
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Summary
This topic summarizes the key points that were discussed in this lesson.
Summary
6-124 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Module Summary
This topic summarizes the key points that were discussed in this module.
Module Summary
This module covers the design and implementation of the Cisco IOS Firewall and Cisco IOS
IPS. It describes the most common firewall technologies, such as packet filtering, stateful
firewalls, and application-layer filtering. The module describes firewall topologies, showing
that a Demilitarized Zone (DMZ)-based approach offers the best defense and scalability
options. The concept of stateful firewalls is explained, along with its implementation on Cisco
IOS routers, Cisco IOS Firewall. The module describes the two Cisco IOS Firewall
configuration methods—command-line interface (CLI) and the Security Device Manager
(SDM), including the Basic and Advanced Firewall Configuration wizard. Further, intrusion
detection system (IDS) and intrusion prevention system (IPS) are described as complementary
technologies that differ in the actions they take when an attack is detected, in the placement in
the network, and in the signature coverage scope. It is recommended that both host- and
network-based IPS be deployed in parallel, because the two approaches cancel out their
individual weaknesses. The module describes the IOS IPS configuration methods with the CLI
and the SDM, which provide a wizard for deployment simplicity.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-125
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Module Self-Check
Use the questions here to review what you learned in this module. The correct answers and
solutions are found in the Module Self-Check Answer Key.
Q1) What is the difference between a packet filter and a stateful firewall in handling static
TCP sessions? (Source: Introducing the Cisco IOS Firewall)
A) None; the established keyword ensures that the packet filter permits the return
traffic carrying the ACK bit while other data is dropped.
B) Stateful firewall is more difficult to configure.
C) Stateful firewall checks more than just the ACK flag; it inspects the sequence
numbers to ensure the correct state of the TCP session.
D) Packet filter is placed differently than a stateful firewall.
Q2) How does Cisco IOS Firewall handle ICMP traffic? (Source: Introducing the Cisco
IOS Firewall)
A) Exactly as any other stateless protocols; that is, only access lists control the
packet flow.
B) With ICMP inspection enabled, echo replies to previously seen echo messages
are permitted automatically through the router even if denied by the ACL.
C) Irrespectively of ICMP inspection configuration, echo replies to previously
seen echo messages are permitted automatically through the router even if
denied by the ACL.
D) Both ICMP unreachable packets and echo replies are permitted through the
firewall as a response to previously seen traffic.
Q3) Which protocol inspection should you activate on a Cisco IOS Firewall router to filter
traffic to an ESMTP server? (Source: Implementing Cisco IOS Firewalls)
A) generic TCP and ESMTP for maximum protection
B) generic TCP because it offers more than adequate protection
C) generic TCP and SMTP, because ESMTP is not supported
D) generic TCP, because ESMTP is not supported
Q4) How should you tune IDS and IPS signatures that detect a data pattern, which could be
a part of an attack or legitimate data? (Source: Introducing Cisco IOS IPS)
A) both IDS and IPS should ignore such an event
B) IDS should send a TCP reset while IPS should alarm
C) both IDS and IPS should reset or block the connection
D) IDS should alarm while IPS should let the traffic pass, possibly generating an
alarm
Q5) Can an attacker detect the presence of an IPS sensor? (Source: Introducing Cisco IOS
IPS)
A) Yes, a sensor is a Layer 3 device and has MAC and IP addresses on all
interfaces.
B) Yes, a sensor is Layer 2-transparent but responds to certain probes.
C) No, a sensor is Layer 2-transparent, like a switch, except that it inspects traffic
prior to forwarding.
D) No, a sensor is a security-conscious Layer 3 device and does not respond to
probes.
6-126 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Q6) Would you recommend the SDM as a monitoring tool for IPS events? (Source:
Configuring Cisco IOS IPS)
A) No, SDM is used only for configuration management and does not receive any
events.
B) No, although SDM receives and displays SDEE events and alarms, it does not
have the required real-time presentation, sorting, and searching capabilities.
C) Yes, SDM offers viewing capabilities for SDEE events and alarms.
D) Yes, SDM is a sufficient IPS monitoring tool for small environments with
limited budget.
© 2006 Cisco Systems, Inc. Cisco IOS Threat Defense Features 6-127
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.
Module Self-Check Answer Key
Q1) C
Q2) B
Q3) A
Q4) D
Q5) C
Q6) B
6-128 Implementing Secure Converged Wide Area Networks (ISCW) v1.0 © 2006 Cisco Systems, Inc.
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc.,
for the sole use by Cisco employees for personal study. The files or printed representations may not be
used in commercial training, and may not be distributed for purposes other than individual self-study.