IT Security-Ch2-Securing Network Devices
IT Security-Ch2-Securing Network Devices
Net Security
C. Leghris
2.0 Introduction ;
2.1 Securing Device Access ;
2.2 Assigning Administrative Roles ;
2.3 Monitoring and Managing Devices ;
2.4 Using Automated Security Features ;
2.5 Securing the Control Plane ;
2.6 Summary ;
2
Upon completion of this section, you should be able to:
• Explain how to secure a network perimeter ;
3
4
• Securing the network infrastructure is critical to overall network security ;
o The network infrastructure includes routers, switches, servers, endpoints, and
other devices ;
5
Single Router Approach
All security policies are
configured on this device
DMZ Approach
The DMZ can be used for
servers that must be
accessible from the
Internet or some other
external network
6
7
• Securing administrative access is an extremely important security task ;
o If an unauthorized person gains administrative access to a router, that person could
alter routing parameters, disable routing functions, or discover and gain access to
other systems within the network.
o Authenticate access ;
o Authorize actions ;
8
Local Access Remote Access Using Telnet
9
Dedicated Management Network
10
11
Guidelines:
• Use a password length of 10 or more characters ;
• Include a mix of uppercase and lowercase letters, numbers, symbols, and spaces ;
12
• There are multiple router configuration
commands that can be used to increase
password security
13
Guidelines:
• Configure all secret passwords using type 8 or type 9 passwords ;
14
By default :
• The console and auxiliary ports do not require a password for administrative
access ;
• The password command configured on the console, vty, and auxiliary lines
can only use type 7;
15
16
Virtual login security enhancements :
• Implement delays between successive login attempts ;
17
• Disabling logins after a specified
number of failed login attempts ;
18
Command Syntax: login block-for
19
Generate Login Syslog Messages
20
21
Example SSH Configuration
• To connect from PC :
PC> ssh –l SSHadmin 192.168.3.1
22
• We can modify the default SSH timeout interval and the number of
authentication tries ;
• Use the ”ip ssh time-out seconds” global configuration mode command to
modify the default 120-second timeout interval ;
23
Two ways to connect:
• Enable SSH and use a Cisco router as an SSH server or SSH client :
o As a server, the router can accept SSH client connections ;
o As a client, the router can connect via SSH to another SSH-enabled router ;
24
Upon completion of this section, you should be able to:
• Configure administrative privilege levels to control command availability ;
25
26
Privilege levels: Levels of access commands:
• Level 0: Predefined for user-level access privileges. • User EXEC mode (privilege level 1)
Lowest EXEC mode user privileges
• Level 1: Default level for login with the router prompt.
Only user-level command available at the router> prompt
• Level 2-14: May be customized for user-level privileges.
• Privileged EXEC mode (privilege level 15)
• Level 15: Reserved for the enable mode privileges.
All enable-level commands at the router# prompt
27
Two methods for assigning passwords to the different privilege levels :
• To a user that is granted a specific privilege level :
username name privilege level secret password ;
• To the privilege level :
enable secret level level password
28
The configured different privilege levels :
29
The use of privilege levels has its limitations :
• No access control to specific interfaces, ports, logical interfaces, and slots
on a router ;
• Commands available at lower privilege levels are always executable at
higher privilege levels ;
• Commands specifically set at higher privilege levels are not available for
lower privilege users ;
• Assigning a command with multiple keywords allows access to all
commands that use those ;
o Example : Allowing access to show ip route allows the user access to all show and show
ip commands.
30
31
For example:
• Security operator privileges :
o Configure AAA ;
o Issue show commands ;
o Configure Firewall ;
o Configure IDS/IPS ;
o Configure NetFlow.
32
• Role-based CLI provides three types :
o Root View ;
o View ;
o Superview.
33
Step 1 :
• Create a view. Root one is
without name (enabling pwd ) ;
• Before, Enable AAA with the aaa
new-model ;
Step 2 ;
• This create and enables
the view configuration
mode
Step 3 :
• Assign a secret password to
the view using command
secret encrypted-password view
Step 4 :
• Assign commands to the
selected view using
commands parser-mode
34
Example of a tree Views config :
35
• Configure a superview is same to configuring a CLI view
o Except that the view view-name command is used to assign commands to the superview;
• The administrator must be in root view to configure a superview ;
o Use either “enable view” or ”enable view root” command ;
Step 1 :
Step 2 :
Step 3 :
36
• Enable Root View and Verify All Views
37
Upon completion of this section, you should be able to:
• Use the Cisco IOS resilient configuration feature to secure the Cisco IOS
image and configuration files ;
• Compare in-band and out-of band management access ;
38
39
40
• Allows for faster recovery if someone maliciously or unintentionally reformats
flash memory or erases the startup configuration file in NVRAM ;
• Maintains a secure working copy of the router IOS image file and a copy of the
running configuration file. These secure files cannot be removed by the user
and are referred to as the primary bootset.
41
• To secure the IOS image and enable Cisco IOS image resilience:
Router(config)# secure boot-image.
• To take a snapshot of the router running configuration and securely archive it :
Router(config)# secure boot-config
• To verify the existence of the
archive (could not use dir) :
Router# show secure bootset
42
• The Cisco IOS Resilient feature provides a method for securing the IOS image
and configuration files locally on the device.
• SCP(Secure Copy Protocol) feature is used to remotely copy these files ;
43
44
1. Connect to the console port ;
2. Record the configuration register setting ;
3. Power cycle the router ;
4. Issue the break sequence ;
5. Change the default configuration register with the confreg 0x2142 command ;
6. Reboot the router ;
7. Press Ctrl-C to skip the initial setup procedure ;
8. Put the router into privileged EXEC mode ;
9. Copy the startup configuration to the running configuration ;
10. Verify the configuration ;
11. Change the enable secret password ;
12. Enable all interfaces ;
13. Change the config-register with the config-register
configuration_register_setting ;
14. Save the configuration changes.
45
Disable Password Recovery
Password Recovery
Functionality is Disabled
46
47
• The most common method of accessing system messages from networking
devices is to use a protocol called syslog (RFC 5424) ;
• Syslog uses UDP, with port 514, to send event notification messages across IP
networks to event message collectors.
• The syslog logging service provides three primary functions:
48
49
• Syslog implementations always contain two types of systems :
o Syslog servers - Also known as log hosts, these systems accept and process log
messages from syslog clients ;
o Syslog clients - Routers or other types of equipment that generate and forward log
messages to syslog servers.
50
Step 1 : Set the destination logging host
51
52
• Simple Network Management Protocol (SNMP) was developed to allow
administrators to manage devices on an IP network ;
• It enables network administrators to monitor network performance, manage
network devices, troubleshoot network problems, and plan for network growth;
• SNMP consists of 3 elements :
o SNMP manager ;
o SNMP agents (managed node) ;
53
Cisco MIB
Hierarchy
54
• Several versions of SNMP are available:
o SNMPv1 - Defined in RFC 1157; provided no authentication or encryption
mechanism ;
o SNMPv2c - Defined in RFCs 1901 to 1908; improved upon SNMPv1 but provided no
authentication or encryption mechanism ;
55
• SNMP is vulnerable to attack precisely because SNMP agents can be polled
with get requests and accept configuration changes with set requests ;
• Example ;
o A set request can cause a router to reboot ;
56
• SNMPv3 provides three security features :
o Transmissions from manager to agent may be authenticated to guarantee the
identity of the sender and the integrity and timeliness of a message ;
Encryption
Access control
57
• SNMPv3 can be secured with only a few commands
58
59
60
• The date and time settings on the router can be set using one of two methods:
o Manually edit the date and time ;
o Configure the Network Time Protocol (NTP) ;
61
Sample NTP Topology
Sample NTP
Configuration on R1
Sample NTP
Configuration on R2
62
• NTP version 3 (NTPv3), and later, supports a cryptographic authentication
mechanism between NTP peers ;
• Three commands are used on the NTP master and the NTP client:
o ntp authenticate ;
o ntp authentication-key key-number md5 key-value ;
o ntp trusted-key key-number ;
63
Upon completion of this section, you should be able to:
• Use security audit tools to determine IOS-based router vulnerabilities.
64
65
• Some of services can make the device vulnerable to attack if security is not
enabled ;
• The Link Layer Discovery Protocol (LLDP) is an open standard that can be
enabled on devices ;
o LLDP configuration and verification is similar to CDP (Cisco Discovery Protocol) ;
• The output for show lldp neighbors detail will reveal a device’s address,
platform, and operating system details.
o Available software, such as CDP Monitor, can be used also to gain the information ;
66
• Attackers choose services and protocols that make the network
more vulnerable to malicious exploitation ;
• Additional recommended practices to ensure a device is secure :
o Disable unnecessary services and interfaces ;
o Disable and restrict commonly configured management services ;
o Disable probes and scans. Ensure terminal access security ;
o Disable gratuitous and proxy ARPs ;
o Disable IP-directed broadcasts.
67
68
• Cisco AutoSecure is a feature that executes a script, from CLI ;
• It first makes recommendations for fixing security vulnerabilities and then
modifies the security configuration of the router ;
• It can lock down the management plane functions and the forwarding plane
services and functions of a router ;
69
• To enable AutoSecure feature setup : Router# auto secure
70
When the auto secure command is initiated, a CLI wizard steps the administrator
through the configuration of the device. User input is required :
1. The auto secure command is entered ;
5. AutoSecure prompts for passwords and enables password and login features
71
Upon completion of this section, you should be able to:
• Configure a routing protocol authentication ;
72
73
• Spoofing routing information may generally be used to cause systems to
misinform (lie to) each other, cause a DoS attack, or cause traffic to
follow a path it would not normally follow.
• Consequences of protocol
spoofing :
o Redirect traffic to create
routing loops ;
o Redirect traffic so it can be
monitored on an insecure
link ;
o Redirect traffic to discard it.
74
• OSPF supports routing protocol authentication using MD5. MD5 authentication
can be enabled globally for all interfaces or on a per interface basis.
• Enable MD5 authentication on a per interface basis :
o ip ospf message-digest-key key md5 password .
o ip ospf authentication message-digest
75
• D5 is now considered vulnerable to attacks and should only be used when
stronger authentication is not available ;
• Cisco IOS release 15.4(1)T added support for OSPF SHA authentication (RFC
5709) ;
• OSPF SHA authentication includes two major steps :
76
Chapter Objectives:
• Configure secure administrative access.
77
Thank you.