91
Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved.Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5: Securing the Switch CIS 187 Multilayer Switched Networks CCNP Rick Graziani Spring 2011

Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Embed Size (px)

Citation preview

Page 1: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 61© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks

Part 5: Securing the Switch

CIS 187 Multilayer Switched Networks CCNP Rick Graziani Spring 2011

Page 2: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 62© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Securing Network Switches

Page 3: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 63© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Neighbor Discovery Protocols (NDP)* Not to confused with IPv6 NDP

Cisco Discovery Protocol (CDP)

• NDP Layer 2 protocol enabled by default. Link Layer Discovery Protocol (LLDP)

• Vendor-neutral Layer 2 protocol equivalent

• IEEE standard 802.1AB in 2005

• LLDP is disabled by default on Cisco devices.

Page 4: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 64© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Cisco Discovery Protocol

Uses multicast hello messages Uses a TTL in seconds Cached CDP information available to network management system via

SNMP

• Recommended to block SNMP access to CDP other than to your management station subnet

Page 5: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 65© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Configuring CDP

CDP is enabled by default. The no cdp run command disables CDP globally. The no cdp enable command disables CDP on an

interface.

Page 6: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 66© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Displaying CDP Information (1) When CDP is enabled the command show cdp neighbor

displays a summary of which devices are seen on which ports.

switch# show cdp neighborCapability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge

S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone, D - Remote, C - CVTA, M - Two-port Mac Relay

Device ID Local Intrfce Holdtme Capability Platform Port IDc2960-8 Fas 0/8 168 S I WS-C2960-Fas 0/8

Page 7: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 67© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Displaying CDP Information (2)4506# show cdp neighbor detail-----------------------Device ID: TBA03501074(SwitchA-6500)Entry address(es):IP address: 10.18.2.137Platform: WS-C6506, Capabilities: Trans-Bridge Switch IGMPInterface: FastEthernet3/21, Port ID (outgoing port): 3/36Holdtime : 170 secVersion :WS-C6506 Software, Version McpSW: 7.6(1) NmpSW: 7.6(1)Copyright © 1995-2003 by Cisco Systemsadvertisement version: 2VTP Management Domain: ‘0’Native VLAN: 1Duplex: full-----------------------Device ID: SwitchC-4503Entry address(es):IP address: 10.18.2.132Platform: cisco WS-C4503, Capabilities: Router Switch IGMPInterface: FastEthernet3/27, Port ID (outgoing port): FastEthernet3/14Holdtime : 130 secVersion :Cisco Internetwork Operating System SoftwareIOS (tm) Catalyst 4000 L3 Switch Software (cat4000-I5S-M), Version 12.1(19)EW,CISCO ENHANCED PRODUCTION VERSIONCopyright © 1986-2003 by cisco Systems, Inc.Compiled Tue 27-May-03 04:31 by prothero<output omitted>

Page 8: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 68© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Configuring LLDP

LLDP is disabled by default. The command lldp run enables LLDP globally. The command lldp enable enables LLDP on an

interface.

Page 9: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 69© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Displaying LLDP Information When LLDP is enabled the command show lldp neighbor displays a summary of which devices are seen on which ports.

show lldp neighbor detail show lldp neighbor interface f0/8 detail

switch(config)# lldp runswitch(config)# endswitch# show lldp neighborCapability codes:

(R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device(W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other

Device ID Local Intf Hold-time Capability Port IDc2960-8 Fa0/8 120 B Fa0/8Total entries displayed: 1

Page 10: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 610© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

CDP Vulnerabilities

Sequence of Events

Description

1. System administrator uses CDP to view neighbor information.

2. Attacker uses a packet analyzer to intercept CDP traffic.

3. Attacker analyzes information in CDP packets to gain knowledge of network address and device information.

4. Attacker formulates attacks based on known vulnerabilities of networkplatforms.

Page 11: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 611© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Securing Switch Access Telnet Vulnerabilities Secure Shell (SSH) Vulnerabilities

Page 12: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 612© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Telnet Vulnerabilities All usernames, passwords, and data sent over the public network in

clear text are vulnerable. A user with an account on the system could gain elevated privileges. A remote attacker could crash the Telnet service, preventing legitimate

use of that service by performing a DoS attack such as opening too many bogus Telnet sessions.

Page 13: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 613© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Secure Shell (SSH) SSH provides strong authentication and secure communications over

insecure channels. It is a replacement for rlogin, rsh, rcp, and rdist in addition to Telnet. When using the SSH login (instead of Telnet), the entire login session,

including transmission of password, is encrypted; therefore, it is almost impossible for an outsider to collect passwords.

Note: SSH version 1 implementations are vulnerable to various security compromises. Whenever possible, use SSH version 2

Page 14: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 614© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Configuring SSH

Step 1. Configure a username with a password. Step 2. Configure the hostname and domain name. Step 3. Generate RSA keys. Step 4. Allow SSH transport on the vty lines.

switch(config)# username xyz password abc123switch(config)# ip domain-name xyz.comswitch(config)# crypto key generate rsaswitch(config)# ip ssh version 2switch(config)# line vty 0 15switch(config-line)# login localswitch(config-line)# transport input ssh

Page 15: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 615© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

VTY Access Control ListsThe access-class command is

used to filter incoming Telnet/SSH sessions by source address and to apply filtering to vty lines

Page 16: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 616© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

HTTP Secure Server A web interface is available to configure most switches. The main weakness of the web interface is that it is not encrypted and no filtering. By default, it can be viewed by any user entering the switch IP address in a web

browser address bar. Step 1. Configure username and password. Step 2. Configure domain name. Step 3. Generate RSA keys. Step 4. Enable HTTPS (SSL) server. Step 5. Configure HTTP authentication. Step 6. Configure an access list to limit access.

sw(config)# access-list 100 permit ip 10.1.9.0 0.0.0.255 anysw(config)# username xyz password abc123sw(config)# ip domain-name xyz.comsw(config)# crypto key generate rsasw(config)# no ip http serversw(config)# ip http secure-serversw(config)# http access-class 100 insw(config)# http authentication local

Page 17: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 617© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Authentication, Authorization, and Accounting (AAA)

The AAA network-security services provide the primary framework through which you set up access control on a Cisco IOS switch.

AAA is an architectural framework for configuring a set of three independent security functions in a consistent manner.

Page 18: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 618© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Introduction to AAA

AAA is an architectural framework for configuring three different security features:

• authentication, authorization, and accounting In this module the terms access server and network access server

(NAS) refer to a router connected to the "edge" of a network.

• This router allows outside users to access the network.

Page 19: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 619© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

User "flannery" dials into an access server that is configured with CHAP. The access server will prompt the user for a name and password. The access server authenticates the user’s identity by requiring the

username and password.

• This process of verification to gain access is called authentication. The user may then be able to execute commands on that server once

“flannery” has been successfully authenticated.

What is meant by authentication, authorization, and accounting?

Introduction to AAA

Page 20: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 620© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

The server uses a process called authorization to determine which commands and resources should be made available to that particular user. • Authorization asks the question, "What privileges does this user have?"

Finally, the number of login attempts, the specific commands entered, and other system events can be logged and time-stamped by the accounting process. • Accounting can be used to trace a problem, such as a security breach, or

it may be used to compile usage statistics or billing data. • Accounting asks the questions, "What did this user do and when was it

done?"

What is meant by authentication, authorization, and accounting?

Introduction to AAA

Page 21: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 621© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Introduction to AAA

Authentication can be configured without using AAA, configure a local username and password database in conjunction with CHAP.

This same local database can be used to authenticate users that start an EXEC session with the router.

AAA has the following advantages when used for authentication:• AAA provides scalability.

• Typical AAA configurations rely on a server or group of servers to store usernames and passwords.

• This means that local databases do not have to be built and updated on every router and access server in the network.

• AAA supports standardized security protocols, specifically TACACS+, RADIUS, and Kerberos.

• AAA allows for multiple backup systems. • For example, an access server can be configured to consult a security

server first and a local database second.

Page 22: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 622© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Hosts use a security protocol to communicate with a specialized security server.

The security server maintains a password and username database. The security server also stores authorization configurations and

accounting information. The Cisco IOS supports three key security protocols named TACACS+,

RADIUS, and Kerberos.

Security protocols

Page 23: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 623© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

TACACS+ is a security application used with AAA that provides centralized validation of users attempting to gain access to a router or network access server.

TACACS+ services are maintained in a database on a TACACS+ daemon running on a UNIX, Windows NT, or Windows 2000 workstation.

TACACS+ provides for separate and modular authentication, authorization, and accounting facilities.

TACACS+ Overview

Page 24: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 624© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

RADIUS Overview

RADIUS is a distributed client/server system used with AAA that secures networks against unauthorized access.

In the Cisco implementation, RADIUS clients run on Cisco routers and send authentication requests to a central RADIUS server.

This central server contains all user authentication and network service access information.

Page 25: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 625© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

FYI Kerberos Overview

Kerberos is a secret-key network authentication protocol used with AAA that uses the Data Encryption Standard (DES) cryptographic algorithm for encryption and authentication.

Kerberos was designed to authenticate requests for network resources. Kerberos is based on the concept of a trusted third party that performs

secure verification of users and services. The primary use of Kerberos is to verify that users and the network services

they use are really who and what they claim to be. To accomplish this, a trusted Kerberos server issues tickets to users. These tickets, which have a limited lifespan, are stored in a user's

credential cache. These tickets are then used in place of the standard username and

password authentication mechanism.

Page 26: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 626© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

FYI Comparison

Of the three protocols, TACACS+ and RADIUS offer the most comprehensive AAA support.

Kerberos provides a highly secure method of authentication, in which passwords are never sent over the wire.

However, Kerberos does not support the authorization and accounting components of AAA.

Therefore, Kerberos will not be covered in any detail in this module. While the two protocols have much in common, there are several key

differences between TACACS+ and RADIUS that set the two apart.

Page 27: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 627© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

TACACS+

TACACS+ provides the most comprehensive and flexible security configurations when using Cisco routers and switches.

TACACS+ originated from the TACACS and extended TACACS protocols.

Neither of these older protocols is seen as a viable solution. A Cisco-proprietary protocol, TACACS+ is not compatible with

TACACS or extended TACACS.

Page 28: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 628© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

FYI TACACS+

TACACS+ uses TCP to communicate between a TACACS+ server and a TACACS+ client.

Unlike RADIUS, TACACS+ separates the functions of authentication, authorization, and accounting.

Use TACACS+ to take advantage of all of the features supported by AAA.

Page 29: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 629© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

FYI RADIUS

The RADIUS protocol was developed by Livingston Enterprises as an authentication and accounting protocol for use with access servers.

RADIUS is specified in RFCs 2865, 2866, and 2868. Even though TACACS+ offers more flexible AAA configurations,

RADIUS is a popular AAA solution. RADIUS is an open standard and typically uses fewer CPU cycles. RADIUS is less memory intensive than the proprietary TACACS+. Currently, RADIUS is the only security protocol supported by emerging

wireless authentication protocols.

Page 30: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 630© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

FYI RADIUS

UDP communications between a NAS and a RADIUS server. RADIUS protocol is considered a connectionless service. RADIUS is a client/server protocol. The RADIUS client is typically a Network Access Server (NAS). The RADIUS server is usually a daemon process running on a UNIX

or Windows machine. The client passes user information to designated RADIUS servers

and acts on the response that is returned. RADIUS servers receive user connection requests, authenticate the

user, and return the configuration information necessary for the client to deliver service to the user.

A RADIUS server can act as a proxy client to other RADIUS servers or other kinds of authentication servers.

Page 31: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 631© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

FYI RADIUS

Today, the emerging Extensible Authentication Protocol (EAP) relies on RADIUS services.

EAP with RADIUS makes it possible to employ various authentication methods on a network that are not supported by the NAS.

As a result, customers can use standard support mechanisms for authentication schemes, such as token cards and public key, to strengthen end-user and device-authenticated access to their networks.

There are several variants of EAP, such as the Cisco proprietary Lightweight Extensible Authentication Protocol (LEAP) and the standards-based Protected Extensible Authentication Protocol (PEAP).

These authentication protocols provide dynamic per-user, per-session Wired Equivalent Privacy (WEP) key enhancements to decrease a variety of wireless network attacks.

Page 32: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 632© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

FYICiscoSecure Access Control Server

The CiscoSecure Access Control Server (ACS) is specialized security software that runs on Windows 2000.

The software simplifies and centralizes access control and accounting for dialup access servers, virtual private networks (VPNs) and firewalls, voice-over-IP (VoIP) solutions, broadband access, content networks, and wireless networks.

Cisco ACS uses a web-based graphical interface and can distribute the AAA information to hundreds or even thousands of access points in a

network. The CiscoSecure ACS software uses either the TACACS+ or the RADIUS protocol to provide network security and tracking.

Page 33: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 633© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

FYICiscoSecure Access Control Server

Using the Web-based interface, an administrator can log in to the CiscoSecure ACS database and easily:• create user accounts

• group accounts

• set passwords

• configure access control

Page 34: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 634© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

FYICiscoSecure Access Control Server

Each of the devices on a network can be configured to communicate with ACS.

Service providers can use ACS to centralize control of dialup access. With a CiscoSecure ACS, system administrators may use a variety of

authentication methods that are aligned with a varying degree of authorization privileges.

CiscoSecure ACS also acts as a central repository for accounting information.

This accounting information can be used for billing, capacity planning, and security audits.

Page 35: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 635© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Authentication

Authentication provides a method to handle: User identification Login and password dialog Challenge and response Messaging Encryption

Page 36: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 636© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Authorization

Authorization provides the method for remote access control. Remote access control includes:

• One-time authorization or

• Authorization for each service on a per-user account list or a user group basis.

Uses RADIUS or TACACS+ security servers.

Page 37: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 637© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Configuring Authentication Variety of login authentication methods. First use aaa new-model command to initialize AAA. Use aaa authentication login command to enable

AAA login authentication. With aaa authentication login command, configure

one or more lists of authentication methods. The login authentication line {default | list-name} method1 [method2...] command defines the list name and the authentication methods in order, such as TACACS+ or RADIUS.

The login authentication {default | list-name} command applies the authentication list to an input line.

Page 38: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 638© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

AAA Authentication Example

Switch(config)# aaa new-modelSwitch(config)# aaa authentication login TEST tacacs+Switch(config)# tacacs-server host 192.168.100.100Switch(config)# line vty 0 4Switch(config-line)# login authentication TEST

Page 39: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 639© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Enabling password protection at the privileged level

The aaa authentication enable command enables AAA authentication for privileged EXEC mode access.

This authentication method is applied when a user issues the enable command in user EXEC mode as follows.

A named list cannot be specified with the aaa authentication enable command because authentication for privileged EXEC mode is the same for all users on all lines.

The default list is the only privileged mode method list that can exist. Therefore, the privileged mode method list does not need to be applied to

a line or interface.

Router(config)#aaa authentication enable default method1 [...[method4]]

Page 40: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 640© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

The commands create a method list that first tries to contact a TACACS+ server.

If neither server can be contacted, AAA tries to use the enable password.

This attempt may return an error because no enable password is configured on RTA.

However, the user is allowed access with no authentication.

TACACS+

Page 41: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 641© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

RADIUS

The default list is applied to the console (con 0), all TTY lines including the auxiliary line or AUX port, and all VTY lines.

To override the default method list, apply a named list to one or more of these lines.

RTB is configured with the radius-server host and radius-server key commands because the named method list relies on RADIUS.

The aaa authentication login default local command configures the default method as the local username/password database.

This method is applied to all TTYs, VTYs, and the console by default.

Page 42: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 642© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

RADIUS

The aaa authentication login PASSPORT group radius local none command creates a named method list called PASSPORT.

The first method in this list is the group of RADIUS servers. If RTB cannot contact a RADIUS server, then RTB will try and contact

the local username/password database. Finally, the none keyword assures that if no usernames exist in the local

database, the user is granted access.

Page 43: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 643© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Accounting

Accounting provides the method for collecting and sending security server information used for billing, auditing, and reporting. Includes:

• User identities

• Start and stop times

• Executed commands

• Number of packets

• Number of bytes

Page 44: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 644© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

AAA Accounting Types Supported Network accounting: Provides information for all PPP, SLIP, or ARAP

sessions, including packet and byte counts. Connection accounting: Provides information about all outbound

connections made from the network, such as Telnet and rlogin. EXEC accounting: Provides information about user EXEC terminal

sessions (user shells) on the network access server, including username, date, start and stop times, the access server IP address, and (for dial-in users) the telephone number from which the call originated.

System accounting: Provides information about all system-level events (for example, when the system reboots and when accounting is turned on or off).

Command accounting: Provides information about the EXEC shell commands for a specified privilege level executed on a network access server.

Resource accounting: Provides start and stop record support for calls that have passed user authentication.

Page 45: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 645© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

AAA Accounting Configuration Use the command:aaa accounting {system | network | exec | connection | commands level} {default | list-name} {start-stop | stop-only | none} [method1 [method2...]]

Apply the accounting method to an interface or lines using the command: accounting {arap | commands level | connection | exec} {default | list-name}

Page 46: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 646© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

AAA Accounting Example This configuration example illustrates configuring AAA

authorization for users via VTY access for shell commands.

Switch(config)# aaa new-modelSwitch(config)# aaa accounting exec default start-stop group tacacs+Switch(config)# line vty 0 4Switch(config-line)# accounting exec default

Page 47: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 647© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Security Using IEEE 802.1X Port-Based Authentication

The IEEE 802.1X standard defines a port-based access control and authentication protocol that restricts unauthorized workstations from connecting to a LAN through publicly accessible switch ports.

The authentication server authenticates each workstation that is connected to a switch port before making available any services offered by the switch or the LAN.

Until the workstation is authenticated, 802.1X access control enable only Extensible Authentication Protocol over LAN (EAPOL) traffic through the port to which the workstation is connected.

After authentication succeeds, normal traffic can pass through the port.

Page 48: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 648© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Security Using IEEE 802.1X Port-Based Authentication

• When configured for 802.1X port-based authentication, the port starts in the unauthorized state.

While in this state, the port disallows all ingress and egress traffic except for 802.1X protocol packets.

When a client is successfully authenticated, the port transitions to the authorized state, allowing all traffic for the client to flow normally.

If the switch requests the client identity (authenticator initiation) and the client does not support 802.1X, the port remains in the unauthorized state, and the client is not granted access to the network.

In contrast, when an 802.1X-enabled client connects to a port and the client initiates the authentication process (supplicant initiation) by sending the EAPOL-start frame to a switch that is not running the 802.1X protocol, no response is received, and the client begins sending frames as if the port is in the authorized state.

Page 49: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 649© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

802.1X Roles

■ Client (or supplicant): The device that requests access to LAN and switch services and then responds to requests from the switch. • The workstation must be running 802.1X-compliant client software.

■ Authentication server: Performs the actual authentication of the client. • The authentication server validates the identity of the client and notifies the switch whether the

client is authorized to access the LAN and switch services.

• The RADIUS security system with EAP extensions is the only supported authentication server.

■ Switch (or authenticator): Controls physical access to the network based on the authentication status of the client. • The switch acts as an intermediary (proxy) between the client and the authentication server,

requesting identifying information from the client, verifying that information with the authentication server, and relaying a response to the client.

Page 50: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 650© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

802.1X Port Authorization State (1) You control the port authorization state by using the

interface configuration command :

dot1x port-control {auto | force-authorized | force-unauthorized}

The force-authorized keyword disables 802.1X port-based authentication and causes the port to transition to the authorized state without any authentication exchange required.

The port transmits and receives normal traffic without 802.1X-based authentication of the client.

This is the default setting. This configuration mode supports any non-dot1x-enabled

client.

Page 51: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 651© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

802.1X Port Authorization State (2) You control the port authorization state by using the

interface configuration command :dot1x port-control {auto | force-authorized | force-unauthorized}

The force-unauthorized keyword causes the port to remain in the unauthorized state, ignoring all attempts by the client to authenticate.

The switch cannot provide authentication services to the client through the interface.

This configuration mode can be enabled to prevent connections from any users from unauthorized ports.

Page 52: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 652© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

802.1X Port Authorization State (3) You control the port authorization state by using the interface configuration

command :dot1x port-control {auto | force-authorized | force-unauthorized}

The auto keyword enables 802.1X port-based authentication and causes the port to begin in the unauthorized state, enabling only EAPOL frames to be sent and received through the port.

The authentication process begins when the link state of the port transitions from down to up (authenticator initiation) or when an EAPOL-start frame is received (supplicant initiation).

The switch requests the identity of the client and begins relaying authentication messages between the client and the authentication server.

The switch uniquely identifies each client attempting to access the network by using the client MAC address.

This configuration mode can be used on ports that connect to a 802.1X client.

Page 53: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 653© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Configuring IEEE 802.1X Step 1. Enable AAA:Switch(config)# aaa new-model

Step 2. Create an 802.1X port-based authentication method list:Switch(config)# aaa authentication dot1x {default} method1 [method2...]

Step 3. Globally enable 802.1X port-based authentication:Switch(config)# dot1x system-auth-control

Step 4. Enter interface configuration mode and specify the interface to be enabled for 802.1X port-based authentication:Switch(config)# interface type slot/port

Step 5. Enable 802.1X port-based authentication on the interface:Switch(config-if)# dot1x port-control auto

Page 54: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 654© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

IEEE 802.1X Configuration Example

sw(config)# aaa new-modelsw(config)# radius-server host 10.1.1.50 auth-port 1812 key xyz123sw(config)# aaa authentication dot1x default group radiussw(config)# dot1x system-auth-controlsw(config)# interface fa0/1sw(config-if)# description Access Portsw(config-if)# switchport mode accesssw(config-if)# dot1x port-control auto

Page 55: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 655© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Switch Security Considerations

Page 56: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 656© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Organizational Security Policies Provides a process for auditing existing network security. Provides a general security framework for implementing

network security. Defines disallowed behaviors toward electronic data. Determines which tools and procedures are needed for the

organization. Communicates consensus among a group of key decision

makers and defines responsibilities of users and administrators.

Defines a process for handling network security incidents. Enables an enterprise-wide, all-site security implementation

and enforcement plan.

Page 57: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 657© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Securing Switch Devices and Protocols Configure strong system passwords. Restrict management access using ACLs. Secure physical access to the console. Secure access to vty lines. Configure system warning banners. Disable unneeded or unused services. Trim and minimize the use of CDP/LLDP. Disable the integrated HTTP daemon (where appropriate). Configure basic system logging (syslog). Secure SNMP. Limit trunking connections and propagated VLANs. Secure the spanning-tree topology.

Page 58: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 658© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Configuring Strong System Passwords Use the enable secret command instead of using the enable password command.

Because the enable secret command simply implements an MD5 hash on the configured password, that password remains vulnerable to dictionary attacks.

Therefore, standard practice in selecting a feasible password applies.

Try to pick passwords that contain letters, numbers, and special characters.

An example of a feasible password is “$pecia1$” – that is, the word “specials” where each “s” has been replaced by “$” and the letter “l” has been replaced with the numeral “1”.

Page 59: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 659© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Restricting Management Access Using ACL’s Subnet 10.1.2.0/24 is used for accessing all network devices for management

purposes. This subnet does not pass user data traffic. Access to this subnet is limited to system administrators in the 10.1.3.0/24

subnet.<output omitted>interface Vlan600description User LANip address 10.1.1.1 255.255.255.0!interface Vlan601description Management VLANip address 10.1.2.1 255.255.255.0ip access-group 100 in!interface Vlan602description IT LANip address 10.1.3.1 255.255.255.0!access-list 100 permit ip 10.1.3.0 0.0.0.255 10.1.2.0 0.0.0.255access-list 100 deny ip any any log!<output omitted>

Page 60: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 660© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Securing Physical Access to the Console Physical security of switches or routers is often overlooked

but is a valuable security precaution. Console access requires a minimum level of security both

physically and logically. An individual who gains console access to a system gains

the ability to recover or reset the passwords or to reload the system, thereby enabling that individual to bypass all other security measures implemented on that system.

It is imperative to physically secure access to the console by using security personnel, closed circuit television, card-key entry systems, locking cabinets, access logging, or other means to control physical access as standard practice.

Page 61: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 661© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Securing Access to vty Lines Apply ACLs on all vty lines to limit in-band access only to

management stations from specific subnets. Configure strong passwords for all configured vty lines. Use Secure Shell (SSH) instead of Telnet to access the

device remotely.

Page 62: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 662© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Configuring System Warning Banners For both legal and administrative purposes, configuring a

system warning banner to display prior to login is a convenient and effective way of reinforcing security and general usage policies.

Clearly stating the ownership, usage, access, and protection policies prior to a login aids in stronger prosecution if unauthorized access occurs.

Use the global configuration banner command to configure system banner messages.

Page 63: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 663© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Disabling Unneeded or Unused Services TCP Small Servers (Echo, Chargen, Discard, Daytime) UDP Small Servers (Echo, Discard, Chargen) Finger Auto config Packet Assembler and Disassembler (PAD) BOOTP server Identification service NTP without authentication Source routing IP Proxy-ARP ICMP unreachables ICMP redirects Directed broadcast forwarding Maintenance Operation Protocol (MOP)

Page 64: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 664© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Trimming and Minimizing Use of CDP/LLDP

Disable CDP/LLDP on a per-interface basis. Run CDP/LLDP only for administrative purposes, such as

on inter-switch connections and interfaces where IP phones reside.

Confine CDP/LLDP deployment to run between devices under your control.

Page 65: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 665© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Disabling Integrated HTTP Daemon Use the no ip http server command in Cisco IOS to

disable HTTP server access on a switch. If HTTP access is needed, it is recommended to change the

default TCP port number (80) using the ip http port port-no command. Secure HTTP is recommended over HTTP access.

Secure HTTP can be enabled via the ip http secure-server command.

svs-san-msfc# configure terminalEnter configuration commands, one per line. End with CNTL/Z.svs-san-msfc(config)# no ip http serversvs-san-msfc(config)# end

Page 66: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 666© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Configuring Basic System Logging To assist and simplify both problem troubleshooting and

security investigations, monitor switch subsystem information received from the logging facility.

Page 67: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 667© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Limiting Trunking Connections and Propagated VLAN’s

By default, specific models of Catalyst switches that are running Cisco IOS automatically negotiate trunking capabilities.

To prevent unauthorized trunks, disable automatic negotiation of trunking on host and access ports.

In addition, remove unused VLANs from trunks manually or by using VTP.

Page 68: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 668© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Securing the Spanning-Tree Topology Inadvertent or malicious introduction of STP BPDUs

potentially overwhelms a device or creates a DoS. Set the root bridge BPDU Guard Root Guard

Page 69: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 669© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Mitigating Issues Sourced from a Switch Enter the shutdown command on all unused ports and

interfaces. Place all unused ports in a “parking-lot” VLAN used

specifically to group unused ports until they are proactively placed into service.

Configure all unused ports as access ports, disallowing automatic trunk negotiation.

Page 70: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 670© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Troubleshooting Performance and Connectivity

Page 71: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 671© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Techniques to Enhance Performance (1)

Critical performance-management issues are: User/application performance: For most users, response

time is the critical performance success factor. Capacity planning: The process of determining future

network resource requirements to prevent a performance or availability impact on business-critical applications.

Proactive fault management: Involves both responding to faults as they occur and implementing solutions that prevent faults from affecting performance.

Page 72: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 672© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Techniques to Enhance Performance (2)

Critical success tasks for performance management are: Gather a baseline for both network and application data. Perform a what-if analysis on your network and

applications. Perform exception reporting for capacity issues. Determine the network management overhead for all

proposed or potential network management services. Analyze the capacity information. Periodically review capacity information, baseline, and

exceptions for the network and applications. Maintain upgrade or tuning procedures set up to handle

capacity issues on both a reactive and longer-term basis.

Page 73: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 673© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Monitoring Performance with SPAN and VSPAN

The switch copies all traffic transmitted to and from Port 3/1 (the source port) to Port 3/5 (the destination port).

A workstation running a packet-capturing application on Port 3/5 thus receives all network traffic received and transmitted on port 3/1.

Page 74: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 674© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Local SPAN Guidelines

Both Layer 2 switched ports (LAN ports configured with the switchport command) and Layer 3 ports (LAN ports configured with the no switchport command) can be configured as source or destination ports in Cisco IOS–based switches.

A port can act as the destination port for only one SPAN session. A port cannot be configured as a destination port if it is a source port of

a span session. Port channel interfaces (EtherChannel) can be configured as source

ports but not a destination port for SPAN.

Page 75: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 675© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Configuring Local SPAN

The source interface is FastEthernet 3/1, and the destination interface is FastEthernet 3/5.

4506(config)# monitor session 1 source interface FastEthernet 3/14506(config)# monitor session 1 destination interface FastEthernet 3/54506(config)# end4506# show monitor session 1Session 1-----Type : Local SessionSource Ports :Both : Fa3/1Destination Ports : Fa3/5Encapsulation : NativeIngress : Disable

Page 76: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 676© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

VSPAN Scenario (1)

The administrator needs to troubleshoot the traffic flow between a client in VLAN 10 and server in VLAN 20.

She configures a VSPAN session on a Cisco IOS–based Catalyst switch with rx-only traffic for VLAN 10 and tx-only traffic for VLAN 20 and destination port interface FastEthernet 3/4.

Page 77: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 677© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

VSPAN Scenario (2)

cat4k(config)# monitor session 1 source vlan 10 rxcat4k(config)# monitor session 1 source vlan 20 txcat4k(config)# monitor session 1 destination interface FastEthernet 3 /4cat4k# show monitor session 1Session 1-----Type : Local SessionSource VLANs :

RX Only : 10TX Only : 20

Destination Ports : Fa3/4Encapsulation : Native

Ingress : Disabled

Page 78: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 678© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Using SPAN to Monitor the CPU Interface To configure a SPAN to monitor the CPU traffic on Catalyst 4500 switches, use the

keyword cpu in the monitor session source configuration. Ie. BPDUs, SNMP traffic, telnet, broadcasts, and so on. Normal switch traffic is not forwarded to the CPU and is handled via hardware switching. It could help to identify any DoS attack on the Switch CPU.

4506(config)# monitor session 1 source cpu ?both Monitor received and transmitted trafficqueue SPAN source CPU queuerx Monitor received traffic onlytx Monitor transmitted traffic only<cr>4506(config)# monitor session 1 destination interface fastEthernet 3/214506(config)# end4506# show monitor session 1Session 1-----Type : - Source Ports :Both : CPU Destination Ports : Fa3/21Encapsulation : NativeIngress : Disabled

Page 79: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 679© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Monitoring Performance with RSPAN Remote SPAN (RSPAN) is similar to SPAN, but it supports

source ports, source VLANs, and destination ports on different switches.

Page 80: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 680© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Configuring RSPAN (1) Step 1. Configure the RSPAN VLAN in the VTP server. This VLAN is then dedicated for RSPAN. Step 2. Configure the RSPAN session in the source and

destination switches and ensure that the intermediate switches carry the RSPAN VLAN across respective VLAN trunks.

Page 81: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 681© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Configuring RSPAN (2)

On the source switch: monitor session session source {interface interface-id | vlan vlan-id} [,][-] {rx | tx | both}

monitor session session destination remote vlan vlan-id

On the destination switch: monitor session session source remote vlan vlan-id

monitor session session destination interface interface-id [encapsulation {dot1q | isl}] [ingress vlan vlan-id]

Page 82: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 682© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

RSPAN Configuration Example (2)

2950-1(config)# vlan 1002950-1(config-vlan)# remote-span2950-1(config-vlan)# exit2950-1(config)# monitor session 1 source interface FastEthernet 0/12950-1(config)# monitor session 1 destination remote vlan 100 reflector-port FastEthernet 0/22950-1(config)# interface FastEthernet 0/22950-1(config-if)# switchport mode trunk2950-1(config-vlan)# end

2950-2(config)# monitor session 2 source remote vlan 1002950-2(config)# monitor session 2 destination interface FastEthernet 0/32950-2(config)# interface FastEthernet 0/22950-2(config-if)# switchport mode trunk

Page 83: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 683© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

RSPAN Configuration Example (3)

2950-1# show monitorSession 1-----Type : Remote Source SessionSource Ports :

Both : Fa0/1Reflector Port : fa0/2Dest RSPAN VLAN : 1002950-1# show interfaces trunkPort Mode Encapsulation Status Native vlanFa0/2 on 802.1q trunking 1Port Vlans allowed on trunkFa0/2 1-4094Port Vlans allowed and active in management domainFa0/2 1-30,100Port Vlans in spanning tree forwarding state and not prunedFa0/2 1-30,100

Page 84: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 684© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

RSPAN Configuration Example (4)

2950-2# show interfaces trunkPort Mode Encapsulation Status Native vlanFa0/2 on 802.1q trunking 1Port Vlans allowed on trunkFa0/2 1-4094Port Vlans allowed and active in management domainFa0/2 1-30,100Port Vlans in spanning tree forwarding state and not prunedFa0/2 1-30,1002950-2# show monitor session 2Session 2-----Type : Remote Destination SessionSource RSPAN VLAN : 100Destination Ports : Fa0/3

Encapsulation : NativeIngress : Disabled

Page 85: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 685© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Monitoring Performance with ERSPAN Enhanced Remote SPAN (ERSPAN) is similar to RSPAN,

but it supports source ports, source VLANs, and destination ports on different switches, even across the Layer 3 boundary.

Page 86: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 686© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Configuring ERSPAN Step 1. Configure the source ERSPAN session. Step 2. Configure the destination ERSPAN session on a

different switch.

Page 87: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 687© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

ERSPAN Configuration Example

Switch1(config)# monitor session 66 type erspan-sourceSwitch1(config-mon-erspan-src)# source interface gigabitethernet 6/1Switch1(config-mon-erspan-src)# destinationSwitch1(config-mon-erspan-src-dst)# ip address 10.10.10.10Switch1(config-mon-erspan-src-dst)# origin ip address 20.20.20.200Switch1(config-mon-erspan-src-dst)# erspan-id 111

Switch2(config)# monitor session 60 type erspan-destinationSwitch2(config-erspan-dst)# destination interface gigabitethernet 8/2Switch2(config-erspan-dst)# sourceSwitch2(config-erspan-dst-src)# ip address 10.10.10.10Switch2(config-erspan-dst-src)# erspan-id 111

Page 88: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 688© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

ERSPAN Verification Example (2)

Switch1# show monitor session 66Session 66-----Type : ERSPAN Source SessionStatus : Admin EnabledSource Ports :

Both : Gi6/1Destination IP Address : 10.10.10.10Destination ERSPAN ID : 111Origin IP Address : 20.20.20.200

Switch2# show monitor session 60Session 60----------Type : ERSPAN Destination SessionStatus : Admin EnabledDestination Ports : Gi8/2Source IP Address : 10.10.10.10Source ERSPAN ID : 111

Page 89: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 689© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Troubleshooting Using L2 Traceroute Layer 2 (L2) traceroute is equivalent to the IP traceroute

command except that this trace is for Layer 2 connectivity troubleshooting based on MAC addresses.

All switches and interfaces in the network require CDP to be running and functioning properly.

All intermediate switches between the source and device in question must support the L2 traceroute feature.

Page 90: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 690© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

L2 Traceroute Example (2)

2950G# traceroute mac 0000.0000.0007 0000.0000.0011Source 0000.0000.0007 found on 45034503 (14.18.2.132) : Fa3/48 => Fa3/26500 (14.18.2.145) : 3/40 => 3/242950G (14.18.2.176) : Fa0/24 => Fa0/232948G (14.18.2.91) : 2/2 => 2/24Destination 0000.0000.0011 found on 2948G Layer 2 trace completed

Page 91: Chapter 6 1 © 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks Part 5:

Chapter 691© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

Switch Security Issues: Mitigating VLAN, Spoof, and STP Attacks

Part 5: Securing the Switch

CIS 187 Multilayer Switched Networks CCNP Rick Graziani Spring 2011