35
© 2007 Cisco Systems, Inc. All rights reserved. ISCW-Mod5_L5 1 Implementing Secure Converged Wide Area Networks (ISCW)

Implementing Secure Converged Wide Area Networks (ISCW)

  • Upload
    oceana

  • View
    40

  • Download
    0

Embed Size (px)

DESCRIPTION

Implementing Secure Converged Wide Area Networks (ISCW). Securing Cisco Router Administrative Access. Lesson 5 – Module 5 – ‘Cisco Device Hardening’. Module Introduction. - PowerPoint PPT Presentation

Citation preview

Page 1: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 1

Implementing Secure Converged Wide Area Networks (ISCW)

Page 2: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 2

Lesson 5 – Module 5 – ‘Cisco Device Hardening’

Securing Cisco Router Administrative Access

Page 3: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 3

Module Introduction

The open nature of the Internet makes it increasingly important for businesses to pay attention to the security of their networks. As organisations move more of their business functions to the public network, they need to take precautions to ensure that attackers do not compromise their data, or that the data does not end up being accessed by the wrong people.

Unauthorised network access by an outside hacker or disgruntled employee can wreak havoc with proprietary data, negatively affect company productivity, and stunt the ability to compete.

Unauthorised network access can also harm relationships with customers and business partners who may question the ability of companies to protect their confidential information, as well as lead to potentially damaging and expensive legal actions.

Page 4: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 4

Objectives

At the completion of this fifth lesson, you will be able to:

Correctly and securely set passwords on a Cisco router

Protect line access from insecure users

Protect a router against a password reset

Correctly set timeouts on router access

Describe and demonstrate how to correctly set banner messages

Page 5: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 5

Cisco Router Passwords

Strong passwords are the primary defense against unauthorised access to a router

The best way to manage passwords is to maintain them on an AAA server

Almost every router needs a locally configured password for privileged access

There may also be other password information in the configuration file

When creating passwords for routers etc, always keep these rules in mind:

Make passwords lengthy. The best practice is to have a minimum of ten characters. You can enforce the minimum length using a feature that is available in IOS routers

Page 6: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 6

Cisco Router Passwords

Passwords may include the following:Any alphanumeric character

A mix of uppercase and lowercase characters

Symbols and spaces

A combination of letters, numbers, and symbols

Passwords should NOT use dictionary words Using dictionary words makes the passwords vulnerable to dictionary attacks.

Password-leading spaces are ignored, but all spaces after the first character are NOT ignored

Change passwords as often as possibleThere should be a policy defining when and how often the passwords must be changed.

Changing passwords frequently provides two advantages. This practice limits the window of opportunity in which a hacker can crack a password and limits the window of exposure after a password has been compromised

Page 7: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 7

Cisco Router Passwords

Local rules can be added to this list, making passwords even safer One well known method of creating strong passwords is to use

passphrases A passphrase is basically a sentence or phrase that serves as a more secure password.

Use a sentence, quote from a book, or song lyric that you can easily remember as the basis of the strong password or pass phrase.

For example:“My favorite spy is James Bond 007.” would translate into MfsiJB007.

“It was the best of time, it was the worst of times.” would translate into Iwtbotiwtwot.

“Fly me to the moon. And let me play among the stars.” would translate into FmttmAlmpats.

“Tis better to be brief than tedious” (Richard III, I:4) – TbtbbttR3I4

Page 8: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 8

Initial Password Configuration

One way to perform initial router configuration tasks, including configuring a password, is to access the router console port

A console is a terminal connected to a router console port.

The terminal can be a “dumb” terminal or a PC running terminal emulation software (Hyperterm; Kermit; Teraterm etc)

Consoles are only one of the ways to obtain administrative access to configure and manage routers

Other ways to gain administrative access include:

Telnet

SSH

SNMP

Cisco SDM access using HTTP or HTTPS

Page 9: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 9

Protecting Line Access - console

To secure the router, access should be protected through the console, auxiliary, and vty lines / ports

By default, the Cisco router console ports allow a hard BREAK signal (within 60s of a reboot) to interrupt the normal boot sequence and give the console user complete control of the router

The hard BREAK sequence may be disabled using the no service password-recovery command

If a router is configured with the no service password-recovery command, all access to the ROM Monitor (ROMMON) is disabled.

By default, the console port does not require a password for console administrative access. However, a console port line-level password should always be configured

There are two ways to configure a console line password:

Enter the password during the initial configuration dialog, or

Use the password command in the console line configuration mode.

Page 10: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 10

Protecting vty Line Access #1

(Virtual TeletYpe) A command line interface created in a router for a Telnet session

Cisco routers support multiple Telnet sessions (up to five simultaneous sessions, by default—more can be added), each serviced by a logical vty.

By default, Cisco routers do NOT have any line-level passwords configured for these vty lines.

If password checking is enabled, a vty password must also be configured before attempting to access the router using Telnet. If a vty password is NOT configured and password checking is enabled for vty, an error message similar to the following will be produced:

Telnet 10.0.1.2Trying 10.0.1.2 ….. openPassword required, but none set[Connection to 10.0.1.2 closed by foreign host]

Page 11: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 11

Protecting vty Line Access #2

There are two ways to configure a vty password:

1. enter the password during the initial configuration dialog, or

2. use the password command in line vty configuration mode.

The following are more things to consider when securing Telnet connections to a Cisco router:

If an enable mode password is NOT set for the router, privileged-EXEC mode can NOT be accessed using Telnet.

Use either the enable password or enable secret password command to set the enable password

Page 12: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 12

Protecting vty Line Access #3

Telnet access should be limited only to specified systems by building a simple access control list (ACL) that performs the following:

1. Allows Telnet access from specific hosts only

2. Implicitly or explicitly blocks access from untrusted hosts

3. Ties the ACL to the vty lines using the access-class command

This example shows ACL 30 restricting Telnet access only from host 10.0.1.1 and implicitly denying access from all other hosts for vty 0 to 4:

Perth(config)#access-list 30 permit 10.0.1.1 0.0.0.0Perth(config)#line vty 0 4Perth(config-line)#access-class 30 in

Passwords must be configured for all of the vty lines on the router

Remember that more vty lines can be added to the router

The default vty lines 0 to 4 and any additional lines MUST be protected

Page 13: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 13

Protecting Auxiliary Line Access

By default, Cisco router auxiliary ports do not require a password for remote administrative access. Administrators sometimes use auxiliary ports to remotely configure and monitor the router using a dialup modem connection

Unlike console and vty passwords, the auxiliary password is not configured during the initial configuration dialog and should be configured using the password command in auxiliary line configuration mode

If you want to turn off the EXEC process for the aux port, use the no exec command within the auxiliary line configuration mode

Setting the auxiliary line-level password is only one of several steps that must be completed when configuring a router auxiliary port for remote dial-in access

Page 14: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 14

Additional Password Security

IOS software provides a number of enhanced features that allow increasing the security of system passwords. These features include setting a minimum password length, encrypting your passwords, and encrypting usernames

Page 15: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 15

Password Minimum Length Enforcement

router(config)#

security passwords min-length length

• Sets the minimum length of all Cisco IOS passwords

Perth(config)#security passwords min-length 10

Page 16: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 16

The service password-encryption Command

service password-encryption

• Encrypts all passwords in the router configuration file

router(config)#

Perth(config)#service password-encryptionPerth(config)#exitPerth#show running-configenable password 7 06020026144A061E!line con 0password 7 0956F57A109A!line vty 0 4password 7 034A18F366A0!line aux 0password 7 7A4F5192306A

Page 17: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 17

Enhanced Username Password Security

router(config)#

username name secret {[0] password | 5 encrypted-secret}

• Uses MD5 hashing for strong password protection

• Better than the type 7 encryption found in service password-encryption command

Perth(config)#username rtradmin secret 0 Curium96Perth(config)#username rtradmin secret 5 $1$feb0$a104Qd9UZ./Ak007

router(config)#

username name password {[0] password | 7 hidden-password}

• Traditional user configuration with plaintext password

Page 18: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 18

username secret Parameters

Parameter Description

name The username

0 (Optional) Indicates that the following clear text password will be hashed using MD5

password The plaintext password to be hashed using MD5

5 Indicates that the following encrypted secret password was hashed using MD5

encrypted-secret The MD5 encrypted secret password that is stored as the encrypted user password

Page 19: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 19

Protecting Your Router by Securing ROMMON

By default, Cisco IOS routers allow a break sequence during power up, which forces the router into ROM Monitor (ROMMON) mode.

Once the router is in ROMMON mode, anyone can choose to enter a new enable secret password using the well-known Cisco password recovery procedure.

This procedure, if performed correctly, leaves the router configuration intact. This scenario presents a potential security breach because anyone who gains physical access to the router console port can enter ROMMON, reset the enable secret password, and discover the router configuration.

You can mitigate this potential security breach by using the no service password-recovery global configuration command. The no service password-recovery command has no arguments or keywords.

Page 20: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 20

Setting Login Failure Rates and Conditions

Cisco IOS software provides a number of features to secure routers against unauthorised logins by setting login failure rates and conditions

Page 21: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 21

Authentication Failure Rate with Loginrouter(config)#

security authentication failure rate threshold-rate log

• Configures the number of allowable unsuccessful login attempts

• By default, router allows 10 login failures before initiating a 15-second delay

• Generates a syslog message when login failure rate is exceeded

Perth(config)#security authentication failure rate 10 log

Parameter Description

threshold-rate This is the number of allowable unsuccessful login attempts. The default is 10 (the range is 2 to 1024).

log The log keyword is required. This keyword results in a generated syslog event.

Page 22: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 22

Setting a Login Failure Blocking Period

router(config)#

login block-for seconds attempts tries within seconds

• Blocks access for a quiet period after a configurable number of failed login attempts within a specified period

• Must be entered before any other login command

• Mitigates DoS and break-in attacks

Perth(config)#login block-for 100 attempts 2 within 100

Page 23: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 23

Logging of Login Requests During Quiet Periods

Quiet-mode logging message:

Normal mode logging message:

00:04:07:%SEC_LOGIN-1-QUIET_MODE_ON:Still timeleft for watching failures is 158 seconds, [user:sfd] [Source:10.4.2.11] [localport:23] [Reason:Invalid login], [ACL:22] at 16:17:23 UTC Wed Feb 26 2003

00:09:07:%SEC_LOGIN-5-QUIET_MODE_OFF:Quiet Mode is OFF, because block period timed out at 16:22:23 UTC Wed Feb 26 2003

Page 24: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 24

Excluding Addresses from Login Blocking

router(config)#

login quiet-mode access-class {acl-name | acl-number}

• Specifies an ACL that is applied to the router when it switches to the quiet mode

• If not configured, all login requests will be denied during the quiet mode

• Excludes IP addresses from failure counting for login block-for command

Perth(config)#login quiet-mode access-class myacl

Page 25: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 25

Setting a Login Delay

router(config)#

login delay seconds

• Configures a delay between successive login attempts

• Helps mitigate dictionary attacks

• If not set, a default delay of one second is enforced after the login block-for command is configured

Perth(config)#login delay 30

Page 26: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 26

Verifying Login

router#

show login [failures]

• Displays login parameters and failures

Perth(config)#show login A default login delay of 1 seconds is applied.No Quiet-Mode access list has been configured.All successful login is logged and generate SNMP traps.All failed login is logged and generate SNMP traps.Router enabled to watch for login Attacks.If more than 15 login failures occur in 100 seconds or less, logins

will be disabled for 100 seconds.Router presently in Watch-Mode, will remain in Watch-Mode for 95

seconds.Present login failure count 5.

Page 27: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 27

Verifying Login Failures

Perth(config)#show login failures

Information about login failure's with the device

Username   Source IPAddr lPort Count  TimeStamp

try1       10.1.1.1      23    1    21:52:49 UTC Sun Mar 9 2003

try2       10.1.1.2      23    1    21:52:52 UTC Sun Mar 9 2003

Page 28: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 28

Setting Timeouts

By default, an administrative interface stays active (and logged on) for ten minutes after the last session activity. After that time, the interface times out and logs out of the session. Fine-tune these timers to limit the amount of time from two or three minutes maximum.

Setting the exec-timeout value to 0 means that there will be no timeout and the session will stay active for an unlimited time. Do not set the value to 0!

These timers can be adjusted by using the exec-timeout command in line configuration mode for each of the line types used.

Page 29: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 29

Setting Multiple Privilege Levels

Cisco routers allow configuration at various privilege levels for administrators. Different passwords can be configured to control who has access to the various privilege levels. This ability is especially helpful in a help desk environment where certain administrators are allowed to configure and monitor every part of the router (level 15) while other administrators may be restricted to only monitoring (customised levels 2 to 14).

Privileges are assigned to levels 2 to 14 using the privilege command from global configuration mode.

Page 30: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 30

privilege Parameters

Parameter Description

Mode This command specifies the configuration mode.

Level This command enables setting a privilege level with a specified command.

Level This is the privilege level that is associated with a command. You can specify up to 16 privilege levels, using numbers 0 to 15.

Command This sets the command that the privilege level is associated with.

Reset This command resets the privilege level of a command.

Command This is the command that you want to reset the privilege level for.

Page 31: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 31

Router Configuration Modes

Configuration Mode Description

accept-dialin Virtual private dialup network (VPDN) group accept dialin configuration mode

accept-dialout VPDN group accept dialout configuration mode

address-family Address family configuration mode

atm-bm-config ATM bundle member configuration mode

atm-bundle-config ATM bundle configuration mode

atm-vc-config ATM virtual circuit configuration mode

atmsig_e164_table_mode ATMSIG E164 table

cascustom Channel associated signaling (CAS) custom configuration mode

configure Global configuration mode

controller Controller configuration mode

crypto-map Crypto map configuration mode

dhcp DHCP pool configuration mode

dspfarm Digital signal processor (DSP) farm configuration mode

exec EXEC mode

Page 32: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 32

Router Configuration Modes (Cont.)

Configuration Mode Description

flow-cache Flow aggregation cache configuration mode

interface Interface configuration mode

interface-dlci Frame Relay data-link connection identifier (DLCI) configuration mode

ip-vrf Configure IP VPN routing and forwarding (VRF) parameters

line Line configuration mode

map-class Map class configuration mode

map-list Map list configuration mode

null-interface Null interface configuration mode

preaut AAA preauth definitions

request-dialin VPDN group request dialin configuration mode

request-dialout VPDN group request dialout configuration mode

route-map Route map configuration mode

router Router configuration mode

vpdn-group VPDN group configuration mode

voipdialpeer Dial peer configuration mode

Page 33: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 33

Configuring Banner Messages

Banner messages should be used to warn would-be intruders that they are not welcome on your network. Banners are important, especially from a legal perspective. Intruders have been known to win court cases because they did not encounter appropriate warning messages when accessing router networks

Choosing what to place in banner messages is extremely important and should be reviewed by lawyers and /or legal counsel before placing the messages on your routers.

Never use the word “welcome” or any other familiar or similar greeting that may be misconstrued as an invitation to use the network

Page 34: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 34

Configuring Banner Messages

There are four valid tokens that you can use within the message section of the banner command:

1. $(hostname): Displays the hostname for the router

2. $(domain): Displays the domain name for the router

3. $(line): Displays the vty or tty (asynchronous) line number

4. $(line-desc): Displays the description attached to the line

Perth(config)#banner motd %WARNING: You are connected to $(hostname) on the Cisco Systems, Incorporated network. Unauthorized access and use of this network will be vigorously prosecuted. %

Page 35: Implementing Secure Converged Wide Area Networks (ISCW)

© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod5_L5 35