205
In-depth Understanding Network Security (Hardening CISCO Router/Switch)

In depth understanding network security

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: In depth understanding network security

In-depth Understanding Network Security

(Hardening CISCO Router/Switch)

Page 2: In depth understanding network security

CIS Level 1 & 2 Benchmarks and Audit Tool

for Cisco IOS Routers and PIX firewalls

Page 3: In depth understanding network security
Page 4: In depth understanding network security

IOS/PIX Benchmarks and RAT for Windows

Features of the 2.2 version of the Router Audit Tool (RAT): – Ability to score Cisco Router IOS.– Ability to score Cisco PIX firewalls.– Includes benchmark documents (PDF) for both

Cisco IOS and Cisco ASA, FWSM, and PIX security settings.

Page 5: In depth understanding network security

RAT for Windows

Page 6: In depth understanding network security

RAT for Windows

To run any RAT programs, you'll need to know the drive and pathname where RAT was installed.

You can put this directory onto your PATH:

C:\> set PATH=D:\CIS\RAT\bin;%PATH%

Page 7: In depth understanding network security

RAT for Windows

To run the rat program and see a list of its options, you could type the following:

C:\> rat --help

Page 8: In depth understanding network security

RAT for Windows

Before you use RAT, you should use the ncat_config program to create a rule file specific to your routers.

Here is how to run ncat_config:

D:\> ncat_config... lots of questions appear here ...

After all QUESTIONS we will get a template named

“D:\CIS\RAT/etc/configs/cisco-ios/local.conf"

Page 9: In depth understanding network security

RAT for Windows

1. Copy Template to Test Directory

2. Copy configuration files from your router

3. Run rat to audit your configuration file:

D:\>cd \Test

D:\Test> rat -r local.conf cisco-router-confg

Page 10: In depth understanding network security

RAT for Windows

Page 11: In depth understanding network security

RAT for Windows

Page 12: In depth understanding network security

RAT for Windows

Page 13: In depth understanding network security

RAT for Windows

Page 14: In depth understanding network security

RAT for Windows

Page 15: In depth understanding network security
Page 16: In depth understanding network security
Page 17: In depth understanding network security
Page 18: In depth understanding network security
Page 19: In depth understanding network security
Page 20: In depth understanding network security
Page 21: In depth understanding network security
Page 22: In depth understanding network security
Page 23: In depth understanding network security
Page 24: In depth understanding network security
Page 25: In depth understanding network security
Page 26: In depth understanding network security

Hardening Cisco Router

Based on NSA Router Security Configuration Guide

Page 27: In depth understanding network security
Page 28: In depth understanding network security
Page 29: In depth understanding network security
Page 30: In depth understanding network security
Page 31: In depth understanding network security

Router Security Configuration Guide of NSA’s SNAC

(Based on version 1.1c)

Page 32: In depth understanding network security
Page 33: In depth understanding network security
Page 34: In depth understanding network security
Page 35: In depth understanding network security
Page 36: In depth understanding network security

Physical Security

Network equipment, especially routers and switches, should be located in a limited access area.

This area should be under some sort of supervision 24 hours a day and 7 days a week.

A room where routers are located should be free of electrostatic and magnetic interference. The area should also be controlled for temperature and humidity.

If at all possible, all routers should be placed on an Uninterruptible Power Supply (UPS), because a short power outage can leave some network equipment in undetermined states.

Page 37: In depth understanding network security

Cisco IOS routers have the ability to define internal virtual interfaces, called loopback interfaces. It is considered best practice, in configuring Cisco routers, to define one loopback interface, and designate it as the source interface for most traffic generated by the router itself.

Cisco IOS routers have the ability to define internal virtual interfaces, called loopback interfaces. It is considered best practice, in configuring Cisco routers, to define one loopback interface, and designate it as the source interface for most traffic generated by the router itself.

Router Network Traffic and the Loopback Interface

Page 38: In depth understanding network security

Banner Rules

Page 39: In depth understanding network security

Banner Rules

Router1#configure terminal

Router1(config)#banner motd ^C

*************************************************************!! ONLY AUTHORIZED USERS ARE ALLOWED TO LOGON UNDER PENALTY OF LAW !!This is a private computer network and may be used only bydirect permission of its owner(s). The owner(s) reserves the right to monitor use of this network to ensure network security and to respond to specific allegations of misuse. Use of this network shall constitute consent to monitoring for these and any other purposes. In addition, the owner(s) reserves the right to consent to a valid law enforcement request to search the network for evidence of a crime stored within this network.*************************************************************^C

Page 40: In depth understanding network security

Stopping SYN Flooding Attacks

Page 41: In depth understanding network security

(config)#normal TCP 3-Way Handshake

Page 42: In depth understanding network security

TCP SYN flooding attack

Attack Demonstration:

E(config)#nough illegitimate TCBs are in SYN-RECEIVED that a legitimate connection can(config)#not be initiated.

Attack Demonstration:

E(config)#nough illegitimate TCBs are in SYN-RECEIVED that a legitimate connection can(config)#not be initiated.

Page 43: In depth understanding network security

Countermeasures: TCP SYN flooding attack

You can configure a router to protect your servers against TCP SYN attacks by enabling the ip tcp intercept command:

Router1#configure terminal

Router1(config)#access-list 109 permit ip any host 192.168.99.2

Router1(config)#ip tcp intercept list 109

Router1(config)#ip tcp intercept max-incomplete high 10

Router1(config)#ip tcp intercept one-minute high 15

Router1(config)#ip tcp intercept max-incomplete low 5

Router1(config)#ip tcp intercept one-minute low 10

Router1(config)#end

Router1#

You can configure a router to protect your servers against TCP SYN attacks by enabling the ip tcp intercept command:

Router1#configure terminal

Router1(config)#access-list 109 permit ip any host 192.168.99.2

Router1(config)#ip tcp intercept list 109

Router1(config)#ip tcp intercept max-incomplete high 10

Router1(config)#ip tcp intercept one-minute high 15

Router1(config)#ip tcp intercept max-incomplete low 5

Router1(config)#ip tcp intercept one-minute low 10

Router1(config)#end

Router1#

Page 44: In depth understanding network security

TCP Intercept feature

When you enable the TCP Intercept feature, the router doesn't forward the initial SYN packet to the server.

Instead, it responds directly to the client with a SYN-ACK packet, as if it were the server.

If the client is legitimate and begins the TCP session, then the router quickly opens a session to the server, knits the two ends of the connection together, and steps into its more usual role of simply forwarding packets.

When you enable the TCP Intercept feature, the router doesn't forward the initial SYN packet to the server.

Instead, it responds directly to the client with a SYN-ACK packet, as if it were the server.

If the client is legitimate and begins the TCP session, then the router quickly opens a session to the server, knits the two ends of the connection together, and steps into its more usual role of simply forwarding packets.

Page 45: In depth understanding network security

TCP Intercept feature

Router1(config)#access-list 109 permit ip any host 192.168.99.2 Router1(config)#ip tcp intercept list 109

Page 46: In depth understanding network security

TCP Intercept feature

By default, the router allows 1,100 half-open sessions before going into aggressive mode.

Configure this value using the ip tcp intercept max-incomplete high command.

Router1(config)#ip tcp intercept max-incomplete high 10

When we deliberately initiate a series of half-open sessions, we see this log message:

(config)#nov 15 13:56:38.944: %TCP-6-INTERCEPT: getting aggressive, count (10/10) 1 min 0

A short time later, the attack ended, and the router went back into its (config)#normal mode:

(config)#nov 15 13:58:14.367: %TCP-6-INTERCEPT: calming down, count (0/5) 1 min 11

By default, the router allows 1,100 half-open sessions before going into aggressive mode.

Configure this value using the ip tcp intercept max-incomplete high command.

Router1(config)#ip tcp intercept max-incomplete high 10

When we deliberately initiate a series of half-open sessions, we see this log message:

(config)#nov 15 13:56:38.944: %TCP-6-INTERCEPT: getting aggressive, count (10/10) 1 min 0

A short time later, the attack ended, and the router went back into its (config)#normal mode:

(config)#nov 15 13:58:14.367: %TCP-6-INTERCEPT: calming down, count (0/5) 1 min 11

Page 47: In depth understanding network security

TCP Intercept feature

you can also set thresholds on the number of TCP sessions initiated per minute:

Router1(config)#ip tcp intercept one-minute high 15

The conditions for returning to (config)#normal mode are defined by these two commands:

Router1(config)#ip tcp intercept max-incomplete low 5

Router1(config)#ip tcp intercept one-minute low 10

The first command sets the low-water mark for the total number of half-open sessions, while the second command sets the low-water mark for the number of session-initiation attempts per minute.

you can also set thresholds on the number of TCP sessions initiated per minute:

Router1(config)#ip tcp intercept one-minute high 15

The conditions for returning to (config)#normal mode are defined by these two commands:

Router1(config)#ip tcp intercept max-incomplete low 5

Router1(config)#ip tcp intercept one-minute low 10

The first command sets the low-water mark for the total number of half-open sessions, while the second command sets the low-water mark for the number of session-initiation attempts per minute.

Page 48: In depth understanding network security

TCP Intercept feature

By default, the router will allow a TCP session to be inactive for 24 hours (86,400 seconds).

However, you can change this using the ip tcp intercept connection-timeout command, which accepts an argument in seconds. Here we set a maximum value of one hour:

Router1(config)#ip tcp intercept connection-timeout 3600

By default the aggressive mode of the TCP Intercept feature will drop the oldest half-open connection each time it receives a new connection attempt.

However, you can instead configure it to drop a randomly selected connection out of the table:

Router1(config)#ip tcp intercept drop-mode random

By default, the router will allow a TCP session to be inactive for 24 hours (86,400 seconds).

However, you can change this using the ip tcp intercept connection-timeout command, which accepts an argument in seconds. Here we set a maximum value of one hour:

Router1(config)#ip tcp intercept connection-timeout 3600

By default the aggressive mode of the TCP Intercept feature will drop the oldest half-open connection each time it receives a new connection attempt.

However, you can instead configure it to drop a randomly selected connection out of the table:

Router1(config)#ip tcp intercept drop-mode random

Page 49: In depth understanding network security

TCP Intercept feature

You can configure how long the router will watch a session, waiting for it to complete the TCP session initiation.

By default, it waits 30 seconds, but you can change this value with the following command, which specifies this timeout value in seconds:

Router1(config)#ip tcp intercept watch-timeout 15

You can configure how long the router will watch a session, waiting for it to complete the TCP session initiation.

By default, it waits 30 seconds, but you can change this value with the following command, which specifies this timeout value in seconds:

Router1(config)#ip tcp intercept watch-timeout 15

Page 50: In depth understanding network security

TCP Intercept feature

And one final option allows you to set whether the router actively intercepts and responds to TCP SYN packets, or instead allows these packets to pass through (config)#normally, but watches the session to ensure that it connects properly.

By default the router will completely protect the server by taking over all responsibility for setting up the session. You can configure it to let the server handle the call, and only step in if there is a problem by configuring watch mode:

Router1(config)#ip tcp intercept mode watch

And one final option allows you to set whether the router actively intercepts and responds to TCP SYN packets, or instead allows these packets to pass through (config)#normally, but watches the session to ensure that it connects properly.

By default the router will completely protect the server by taking over all responsibility for setting up the session. You can configure it to let the server handle the call, and only step in if there is a problem by configuring watch mode:

Router1(config)#ip tcp intercept mode watch

Page 51: In depth understanding network security

Other IP stack Tune-ups

Page 52: In depth understanding network security

Nagle congestion control algorithm

The Nagle Algorithm prevents excessive bandwith utilization by applications that send many small packets.

It allows slight delays before sending individual small packets in order to combine them into a single larger packet.

Router1#configure terminal

Router1(config)#(config)#service nagle

Page 53: In depth understanding network security

Limit embryonic TCP connections

To help limit the vulnerability to TCP SYN-Flood attacks, use the global configuration ip tcp synwait-time command to limit the seconds that the router spends waiting for the ACK before giving up on a half-open connection

Router1#configure terminal

Router1(config)#ip tcp synwait-time 10

Page 54: In depth understanding network security

TCP selective acknowledgment

The TCP selective acknowledgment mechanism helps overcome these limitations.

The receiving TCP returns selective acknowledgment packets to the sender, informing the sender about data that has been received. The sender can then retransmit only the missing data segments.

Router1#configure terminal

Router1(config)#ip tcp selective-ack

Page 55: In depth understanding network security

Access

Before deciding how to control router access, ask these questions?• Who needs access?• When do they need access?• From where do they need

access?• During what time schedule

do they need access?

Page 56: In depth understanding network security

Basic Authentication

Basic authentication stores passwords as clear text Use(config)#service password-encryption

– Encrypts passwords using a Vigenere cipher.– Can be cracked relatively easily– Does not encrypt SNMP community strings– no enable password

Use (config)# enable secret <password>

– Encrypts passwords using a MD5 hash

Page 57: In depth understanding network security

“Enable” Passwords

Page 58: In depth understanding network security

Demo: Crack Password

Page 59: In depth understanding network security

Line Authentication (VTY, CON, AUX)

Use Access List to control VTY accessaccess-list 1 permit host 10.1.1.2line vty 0 4 password 7 12552D23830F94 exec-timeout 5 0 access-class 1 in login transport input telnet ssh

Control CON accessline con 0 password 7 12552D23830F94 exec-timeout 5 0 login

Control AUX accessline aux 0 no exec exec-timeout 0 0 no login transport input none transport output none

Page 60: In depth understanding network security

AAA

Secure user logins with AAA on all ports, virtual and physical

– Local AAA (username)– RADIUS (Steel Belted Radius)– TACACS+ (Cisco Secure ACS)

Use privilege levels to control granular access to commands

Page 61: In depth understanding network security

AAA Example for TACACS/RADIUS

Secure user logins with AAA on all ports, virtual and physical

aaa new-modelaaa authentication login default group tacacs+|radius localaaa authorization exec default group tacacs+|radius localusername backup privilege 7 password 0 backuptacacs-server host 171.68.118.101tacacs-server key ciscoradius-server host 171.68.118.101radius-server key ciscoprivilege configure level 7 snmp-server hostprivilege configure level 7 snmp-server enableprivilege configure level 7 snmp-serverprivilege exec level 7 pingprivilege exec level 7 configure terminalprivilege exec level 7 configure

Page 62: In depth understanding network security

Demo: Crack RADIUS KEY

Page 63: In depth understanding network security

You can do with the Cisco IOS service command

The TCP keepalive capability

allows a router to detect when the host with which it is communicating experiences a system failure, even if data stops being transmitted (in either direction). This is most useful on incoming connections.

For example, if a host failure occurs while talking to a printer, the router might never notice, because the printer does not generate any traffic in the opposite direction. If keepalives are enabled, they are sent once every minute on otherwise idle connections. If five minutes pass and no keepalives are detected, the connection is closed.

(config)#service tcp-keepalives-in

(config)#service tcp-keepalives-out

Page 64: In depth understanding network security

You can do with the Cisco IOS service command

service timestamps

You can use the service timestamps command to create timestamps on the router’s log files.

Since version 11.3, the Cisco IOS has enabled certain timestamps by default, so most of us have this on.

However, there are additional timestamps options that you can enable as well as places where timestamps are probably off by default.

(config)#service timestamps message-type [uptime]

(config)#service timestamps message-type datetime [msec] [localtime] [show-timezone]

Page 65: In depth understanding network security

Verify that the EXEC process is disabled on the auxiliary (aux) port

Unused ports should be disabled, if not required, since they provide a potential access path for attackers.

The auxiliary port is primarily used for dial-up administration, which is rarely used, via an external modem.

Verify that the EXEC process is disabled on the auxiliary (aux) port

Unused ports should be disabled, if not required, since they provide a potential access path for attackers.

The auxiliary port is primarily used for dial-up administration, which is rarely used, via an external modem.

Disable Login Through AUX Port

Page 66: In depth understanding network security

VTYs and Remote Administration

Page 67: In depth understanding network security

Forbid CDP (Cisco Discovery Protocol) Run Globally

The Cisco Discovery Protocol is a proprietary protocol that Cisco devices use to identify each other on a LAN segment.

It is useful only in specialized situations, and is considered a security risk.

There have been published denial-of-service (DoS) attacks that use CDP. CDP should be completely disabled unless there is a need for it.

The Cisco Discovery Protocol is a proprietary protocol that Cisco devices use to identify each other on a LAN segment.

It is useful only in specialized situations, and is considered a security risk.

There have been published denial-of-service (DoS) attacks that use CDP. CDP should be completely disabled unless there is a need for it.

Page 68: In depth understanding network security

Forbid tcp-small-servers, udp-small-servers

TCP small services: echo, chargen and daytime (including UDP versions) are rarely used.

Services that are not needed should be turned off because they present potential avenues of attack and may provide information that could be useful for gaining unauthorized access.

TCP small services: echo, chargen and daytime (including UDP versions) are rarely used.

Services that are not needed should be turned off because they present potential avenues of attack and may provide information that could be useful for gaining unauthorized access.

Page 69: In depth understanding network security

Forbid Finger Service

Finger is used to find out which users are logged into a device.

This service is rarely used in practical environments and can potentially provide an attacker with useful information.

Additionally, the finger service can exposed the device Finger of Death denial-of-service (DoS) attack.

Page 70: In depth understanding network security

The HTTP server allows remote management of routers.

Unfortunately, it uses simple HTTP authentication which sends passwords in the clear.

This could allow unauthorized access to, and [mis]management of the router.

The HTTP server allows remote management of routers.

Unfortunately, it uses simple HTTP authentication which sends passwords in the clear.

This could allow unauthorized access to, and [mis]management of the router.

Forbid IP HTTP Server

Page 71: In depth understanding network security

HTTP Server with Access Control(Not Recommended)

Page 72: In depth understanding network security

the async line BOOTP service should be disabled on your system if you do not have a need for it in your network the async line BOOTP service should be disabled on your system if you do not have a need for it in your network

Disable Bootp Server

Page 73: In depth understanding network security

Forbid Remote Startup Configuration

Service config allows the device to autoload its startup configuration from a remote device (e.g. a tftp server).

The protocols used to transfer configurations files. Since these methods are insecure, an attacker could potentially compromise or spoof the remote configuration service enabling malicious reconfiguration of the device.

Service config allows the device to autoload its startup configuration from a remote device (e.g. a tftp server).

The protocols used to transfer configurations files. Since these methods are insecure, an attacker could potentially compromise or spoof the remote configuration service enabling malicious reconfiguration of the device.

Page 74: In depth understanding network security

PAD Service(The packet assembler/disassembler service supports X.25 links)

To not accept incoming/outgoing X.25 Packet Assembler/Disassembler (PAD) connections this global configuration command should be used.

It is important to make sure this is disabled by default.

To not accept incoming/outgoing X.25 Packet Assembler/Disassembler (PAD) connections this global configuration command should be used.

It is important to make sure this is disabled by default.

Page 75: In depth understanding network security

Forbid IP source-route

Source routing is a feature of IP whereby individual packets can specify routes. This feature is used in several kinds of attacks.

Cisco routers normally accept and process source routes. Unless a network depends on source routing, it should be disabled.

Source routing is a feature of IP whereby individual packets can specify routes. This feature is used in several kinds of attacks.

Cisco routers normally accept and process source routes. Unless a network depends on source routing, it should be disabled.

Page 76: In depth understanding network security

Forbid IP Proxy ARP

Proxy ARP breaks the LAN security perimeter, effectively extending a LAN at layer 2 across multiple segments.

Disable proxy ARP on all interfaces.

Proxy ARP breaks the LAN security perimeter, effectively extending a LAN at layer 2 across multiple segments.

Disable proxy ARP on all interfaces.

Page 77: In depth understanding network security

Forbid IP Unreachable, Redirects, Mask Replies

• Disable translation of directed to physical broadcasts on the same interface. This configuration prevents against “smurf” attacks.

• Don’t allow redirect messages to pass through the router. ICMP redirects should be disabled

• Make it more difficult for someone to scan for valid IP addresses by turning off ip unreachables on all interfaces.

• To prevent the Cisco IOS software from responding to Internet Control Message Protocol (ICMP) mask requests by sending ICMP mask reply messages

• Disable translation of directed to physical broadcasts on the same interface. This configuration prevents against “smurf” attacks.

• Don’t allow redirect messages to pass through the router. ICMP redirects should be disabled

• Make it more difficult for someone to scan for valid IP addresses by turning off ip unreachables on all interfaces.

• To prevent the Cisco IOS software from responding to Internet Control Message Protocol (ICMP) mask requests by sending ICMP mask reply messages

Page 78: In depth understanding network security

Forbid MOP

The Maintenance Operations Protocol (MOP) was used for system utility services in the DECnet protocol suite.

The Maintenance Operations Protocol (MOP) was used for system utility services in the DECnet protocol suite.

Page 79: In depth understanding network security

Forbid NTP Service

Page 80: In depth understanding network security

Forbid SNMP Services

Page 81: In depth understanding network security

Disable Router Name and DNS Name Resolution

Page 82: In depth understanding network security

Configure DNS Server

Page 83: In depth understanding network security

Set a default DNS domain name (needed for SSH)

Page 84: In depth understanding network security

Disable Unused Interfaces

Page 85: In depth understanding network security

Filtering Traffic to the Router Itself

Page 86: In depth understanding network security

Remote Login (Telnet) Service

Page 87: In depth understanding network security

SNMP Service(Recommend only SNMPv3 AuthNoPriv & AuthPriv)

Page 88: In depth understanding network security

Routing Service

Page 89: In depth understanding network security

Filtering Traffic through the Router

Page 90: In depth understanding network security

IP Address Spoof Protection (Inbound Traffic)

Page 91: In depth understanding network security

IP Address Spoof Protection (Outbound Traffic)

Page 92: In depth understanding network security

Exploits Protection

Page 93: In depth understanding network security

TCP SYN Attack

Page 94: In depth understanding network security

Limiting External Access with TCP Intercept (If your IOS support it.)

Page 95: In depth understanding network security

Land Attack

Page 96: In depth understanding network security

Land Attack

Page 97: In depth understanding network security

Smurf Attack

Page 98: In depth understanding network security

ICMP Message Types and Traceroute

Page 99: In depth understanding network security

Distributed Denial of Service (DDoS) Attacks

Page 100: In depth understanding network security

Routing Protocol Security

Page 101: In depth understanding network security

OSPF MD5 Authentication

Page 102: In depth understanding network security

RIP MD5 Authentication

Page 103: In depth understanding network security

EIGRP MD5 Authentication

Page 104: In depth understanding network security

EIGRP MD5 Authentication

Page 105: In depth understanding network security

Disabling unneeded routing-related services

Page 106: In depth understanding network security

Passive Interfaces (OSPF)

Page 107: In depth understanding network security

Using filters to block routing updates

Page 108: In depth understanding network security

First Define Access Control List

Page 109: In depth understanding network security

Filter Distributed List (OSPF)

Page 110: In depth understanding network security

Filter Distributed List (RIP)

Page 111: In depth understanding network security

Not enable OSPF on certain interfaces,

Page 112: In depth understanding network security

Passive Interfaces (RIP)

Page 113: In depth understanding network security

Audit and Management

Page 114: In depth understanding network security

Overview and Motivations for Logging

Recording router configuration changes and reboots

Recording receipt of traffic that violates access lists

Recording changes in interface and network status

Recording router cryptographic security violations

Page 115: In depth understanding network security

Logging Types

Console logging Terminal Line logging Buffered logging Syslog logging SNMP trap logging

Page 116: In depth understanding network security

Cisco Log Message Severity Levels

Page 117: In depth understanding network security

Format of a Cisco IOS Log Message

Page 118: In depth understanding network security

Turning on logging services

Page 119: In depth understanding network security

Setting up Console and Buffered Logging

Page 120: In depth understanding network security

Buffered logging

Page 121: In depth understanding network security

Setting up Terminal Line Logging

Page 122: In depth understanding network security

Setting up Syslog Logging

Page 123: In depth understanding network security

A Small Syslog Configurationserver host

Page 124: In depth understanding network security

Centralized Syslog Configuration

Page 125: In depth understanding network security

Syslog and access list

Page 126: In depth understanding network security

SNMP Trap Logging

Page 127: In depth understanding network security

Time Services, Network Time Synchronization and NTP

Page 128: In depth understanding network security

Setting the Time Manually

Page 129: In depth understanding network security

The NTP Hierarchy

Page 130: In depth understanding network security

Configuring Basic NTP Service

Page 131: In depth understanding network security

NTP and access-list

Page 132: In depth understanding network security

Configuring NTP Authentication

Page 133: In depth understanding network security

SNMP Security

Page 134: In depth understanding network security

SNMPv3 Security

Page 135: In depth understanding network security

Configuring SNMP - Getting Started

Page 136: In depth understanding network security

SNMPv3 with limited view

Page 137: In depth understanding network security

Cisco IOS Software Updates

Page 138: In depth understanding network security

Show version

Page 139: In depth understanding network security

Update Procedure

TFTP See Cisco web sites concerning particular

model of router or switch

Page 140: In depth understanding network security

Router Status and Configuration Commands

Page 141: In depth understanding network security

show logging

Page 142: In depth understanding network security

show ip protocol summary

Page 143: In depth understanding network security

show arp

Page 144: In depth understanding network security

show users

Page 145: In depth understanding network security

show host

Page 146: In depth understanding network security

show ip interface brief.

Page 147: In depth understanding network security

show ip socket

Page 148: In depth understanding network security

Viewing the current configuration

show startup-config show running-config

Page 149: In depth understanding network security

Viewing currently running processes

show process

Page 150: In depth understanding network security

Router Throughput and Traffic Commands

Page 151: In depth understanding network security

Clear counter

Page 152: In depth understanding network security

Viewing IP Protocol Statistics

show ip traffic.

Page 153: In depth understanding network security

Viewing SNMP Protocol Statistics

Page 154: In depth understanding network security

configure debugging and turn on debugging messages for ICMP.

Page 155: In depth understanding network security

Security for Router Network Access Services

Page 156: In depth understanding network security

AAA

Authentication Authorization Accounting

Page 157: In depth understanding network security

Types of accounting

There are several types of accounting which can be enabled and configured separately: exec, network, connection, command, system.

All types are supported by TACACS+, but RADIUS does not support command or system.

Page 158: In depth understanding network security

network accounting– Provides information for PPP, SLIP, and ARAP

protocols. The information includes the number of packets and bytes.

EXEC accounting– Provides information about user EXEC sessions

on the router. The information includes the username, date, start and stop times, IP address of access server, and telephone number the call originated from for dial-in users.

Connection accounting– Provides information about all outbound

connections made from the network access server. This includes telnet, rlogin, etc.

Page 159: In depth understanding network security

Command accounting– This applies to commands which are entered in an EXEC

shell. This option will apply accounting to all commands issued at the specified privilege level. If accounting is turned on for level 15 and user logged in at enable level 15 runs a level 1 exec command no accounting event will be generated. Account records are generated based upon the level of the command not the level of the user. Accounting records will include the command, date, time, and the user. Cisco IOS does not support command acccounting with RADIUS.

System– Provides information about system-level events. This

would include information like system reboots, accounting being turned on or off, etc. Note that system accounting will only use the default list. Cisco’s implementation of RADIUS does not support system accounting.

Page 160: In depth understanding network security

AAA accounting requirement

AAA accounting requires that – AAA is enabled, – security servers are defined, and – that a security server is specified for each

accounting type which is desired.

Page 161: In depth understanding network security

Method Lists and Server Groups

Page 162: In depth understanding network security

Authentication

Page 163: In depth understanding network security

The authentication commands used for defining messages

Page 164: In depth understanding network security

The default method list designates RADIUS

Page 165: In depth understanding network security

RADIUS security server

Page 166: In depth understanding network security

Authorization

Page 167: In depth understanding network security

Authorization

There are two primary scenarios where authorization is useful.

First, if the router is used for dial in access, authorization is useful for controlling who can access network services, etc. and who can access and configure the router.

Second, authorization can control different administrators who have access to different privilege levels on the router.

Page 168: In depth understanding network security
Page 169: In depth understanding network security

Accounting

Page 170: In depth understanding network security

Configuration of TACACS+ accounting:

Page 171: In depth understanding network security

Configuration of RADIUS accounting

Page 172: In depth understanding network security

Security Server Protocols

Page 173: In depth understanding network security

RADIUS

Page 174: In depth understanding network security

TACACS+

Page 175: In depth understanding network security

Hardening Cisco Switch(Based on NSA Cisco IOS

Switch Security Configuration Guide)

Page 176: In depth understanding network security
Page 177: In depth understanding network security
Page 178: In depth understanding network security
Page 179: In depth understanding network security
Page 180: In depth understanding network security

Port Security

Page 181: In depth understanding network security

Restricting a port statically on a Catalyst 3550 switch.

Page 182: In depth understanding network security

A strict security “unused” macro

Page 183: In depth understanding network security

A strict A strict security security

“host” macro“host” macro

Page 184: In depth understanding network security

Configure access ports of the switch

Page 185: In depth understanding network security

Virtual Local Area Networks(VLAN)

Page 186: In depth understanding network security

Create the out-of-band management VLAN.

Page 187: In depth understanding network security

Create a management IP address

Page 188: In depth understanding network security

Assign the management VLAN to the dedicated interface.

Page 189: In depth understanding network security

Ensure all trunk ports will not carry the management VLAN

Page 190: In depth understanding network security

Assigned the following name for VLAN 1.

Page 191: In depth understanding network security

Assign all inactive interfaces to an unused VLAN (not VLAN1)

Page 192: In depth understanding network security

Virtual Trunking Protocol (VTP)

Page 193: In depth understanding network security

If VTP could be disabled

Page 194: In depth understanding network security

If VTP is necessary

Page 195: In depth understanding network security

Trunk Auto-Negotiation

Page 196: In depth understanding network security

Dynamic Trunking Protocol (DTP)

A port may use the Dynamic Trunking Protocol (DTP) to automatically negotiate which trunking protocol it will use, and how the trunking protocol will operate.

Page 197: In depth understanding network security

DTP-related security issues

Page 198: In depth understanding network security

DTP-related security issues

Page 199: In depth understanding network security

VLAN Hopping

Page 200: In depth understanding network security

VLAN Hopping

In certain situations it is possible to craft a packet in such a way that a port in trunking mode will interpret a native VLAN packet as though it were from another VLAN, allowing the packet to become a member of a different VLAN.

This technique is known as VLAN hopping.

Page 201: In depth understanding network security
Page 202: In depth understanding network security

Spanning Tree Protocol

Page 203: In depth understanding network security

STP Portfast Bridge Protocol Data Unit (BPDU) Guard

Page 204: In depth understanding network security

STP Root Guard

Page 205: In depth understanding network security

205

(config)#no ip bootp server(config)#no tcp-small-servers(config)#no udp-small-servers

(config)#service time log datetime localtime show-timezone msec(config)#service time debug datetime localtime show-timezone mseclogging x.x.x.xlogging trap debugginglogging source loopback0logging buffered 64000 debugging

ntp authentication-key 10 md5 <key>ntp authenticatentp trusted-key 10ntp server x.x.x.x [key 10]ntp access-group peer 20access-list 20 permit host x.x.x.xaccess-list 20 deny any

(config)#no (config)#service finger(config)#no (config)#service pad(config)#no ip http server(config)#no ip source-route

(config)#no cdp run(config)#no boot network(config)#no (config)#service config(config)#no ip subnet-zero

(config)#no ip identd(config)#no ip finger(config)#service nagle

Configuration basics (1)

Turn off all the unneeded (config)#services

Use syslog

Use (authenticated) NTP