SlideShare a Scribd company logo
In-depth Understanding
Network Security
(Hardening CISCO Router/Switch)
CIS Level 1 & 2 Benchmarks
and Audit Tool
for Cisco IOS Routers and PIX firewalls
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.
RAT for Windows
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:CISRATbin;%PATH%
RAT for Windows
To run the rat program and see a list of its
options, you could type the following:
C:> rat --help
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:CISRAT/etc/configs/cisco-ios/local.conf"
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
RAT for Windows
RAT for Windows
RAT for Windows
RAT for Windows
RAT for Windows
In depth understanding network security
In depth understanding network security
In depth understanding network security
In depth understanding network security
In depth understanding network security
In depth understanding network security
In depth understanding network security
In depth understanding network security
In depth understanding network security
In depth understanding network security
In depth understanding network security
Hardening Cisco Router
Based on
NSA Router Security Configuration Guide
In depth understanding network security
In depth understanding network security
In depth understanding network security
In depth understanding network security
Router Security Configuration
Guide of NSA’s SNAC
(Based on version 1.1c)
In depth understanding network security
In depth understanding network security
In depth understanding network security
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.
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
Banner Rules
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 by
direct 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
Stopping SYN Flooding
Attacks
(config)#normal TCP 3-Way Handshake
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.
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#
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.
TCP Intercept feature
Router1(config)#access-list 109 permit ip any host 192.168.99.2
Router1(config)#ip tcp intercept list 109
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
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.
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
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
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
Other IP stack Tune-ups
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
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
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
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?
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
“Enable” Passwords
Demo: Crack Password
Line Authentication (VTY, CON, AUX)
Use Access List to control VTY access
access-list 1 permit host 10.1.1.2
line vty 0 4
password 7 12552D23830F94
exec-timeout 5 0
access-class 1 in
login
transport input telnet ssh
Control CON access
line con 0
password 7 12552D23830F94
exec-timeout 5 0
login
Control AUX access
line aux 0
no exec
exec-timeout 0 0
no login
transport input none
transport output none
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
AAA Example for TACACS/RADIUS
Secure user logins with AAA on all ports,
virtual and physical
aaa new-model
aaa authentication login default group tacacs+|radius local
aaa authorization exec default group tacacs+|radius local
username backup privilege 7 password 0 backup
tacacs-server host 171.68.118.101
tacacs-server key cisco
radius-server host 171.68.118.101
radius-server key cisco
privilege configure level 7 snmp-server host
privilege configure level 7 snmp-server enable
privilege configure level 7 snmp-server
privilege exec level 7 ping
privilege exec level 7 configure terminal
privilege exec level 7 configure
Demo: Crack RADIUS KEY
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
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]
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
VTYs and Remote Administration
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.
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.
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.
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
HTTP Server with Access Control
(Not Recommended)
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
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.
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.
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.
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.
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
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.
Forbid NTP Service
Forbid SNMP Services
Disable Router Name and DNS Name
Resolution
Configure DNS Server
Set a default DNS domain name
(needed for SSH)
Disable Unused Interfaces
Filtering Traffic to the Router
Itself
Remote Login (Telnet) Service
SNMP Service
(Recommend only SNMPv3 AuthNoPriv
& AuthPriv)
Routing Service
Filtering Traffic through the
Router
IP Address Spoof Protection (Inbound
Traffic)
IP Address Spoof Protection (Outbound
Traffic)
Exploits Protection
TCP SYN Attack
Limiting External Access with TCP
Intercept (If your IOS support it.)
Land Attack
Land Attack
Smurf Attack
ICMP Message Types and Traceroute
Distributed Denial of Service (DDoS)
Attacks
Routing Protocol Security
OSPF MD5 Authentication
RIP MD5 Authentication
EIGRP MD5 Authentication
EIGRP MD5 Authentication
Disabling unneeded routing-
related services
Passive Interfaces (OSPF)
Using filters to block routing
updates
First Define Access Control List
Filter Distributed List (OSPF)
Filter Distributed List (RIP)
Not enable OSPF on certain interfaces,
Passive Interfaces (RIP)
Audit and Management
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
Logging Types
 Console logging
 Terminal Line logging
 Buffered logging
 Syslog logging
 SNMP trap logging
Cisco Log Message Severity Levels
Format of a Cisco IOS Log Message
Turning on logging services
Setting up Console and Buffered
Logging
Buffered logging
Setting up Terminal Line Logging
Setting up Syslog Logging
A Small Syslog Configuration
server host
Centralized Syslog Configuration
Syslog and access list
SNMP Trap Logging
Time Services, Network Time
Synchronization and NTP
Setting the Time Manually
The NTP Hierarchy
Configuring Basic NTP Service
NTP and access-list
Configuring NTP Authentication
SNMP Security
SNMPv3 Security
Configuring SNMP - Getting Started
SNMPv3 with limited view
Cisco IOS Software Updates
Show version
Update Procedure
 TFTP
 See Cisco web sites concerning particular
model of router or switch
Router Status and
Configuration Commands
show logging
show ip protocol summary
show arp
show users
show host
show ip interface brief.
show ip socket
Viewing the current configuration
 show startup-config
 show running-config
Viewing currently running processes
 show process
Router Throughput and Traffic
Commands
Clear counter
Viewing IP Protocol Statistics
 show ip traffic.
Viewing SNMP Protocol Statistics
configure debugging and turn on
debugging messages for ICMP.
Security for Router Network
Access Services
AAA
 Authentication
 Authorization
 Accounting
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.
 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.
 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
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.
Method Lists and Server Groups
Authentication
The authentication commands used for
defining messages
The default method list designates
RADIUS
RADIUS security server
Authorization
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.
In depth understanding network security
Accounting
Configuration of TACACS+ accounting:
Configuration of RADIUS accounting
Security Server Protocols
RADIUS
TACACS+
Hardening Cisco Switch
(Based on NSA Cisco IOS
Switch Security Configuration
Guide)
In depth understanding network security
In depth understanding network security
In depth understanding network security
In depth understanding network security
Port Security
Restricting a port statically on a
Catalyst 3550 switch.
A strict security
“unused” macro
A strictA strict
security “host”security “host”
macromacro
Configure access ports of the switch
Virtual Local Area Networks
(VLAN)
Create the out-of-band management
VLAN.
Create a management IP address
Assign the management VLAN to the
dedicated interface.
Ensure all trunk ports will not carry the
management VLAN
Assigned the following name for VLAN
1.
Assign all inactive interfaces to an
unused VLAN (not VLAN1)
Virtual Trunking Protocol (VTP)
If VTP could be disabled
If VTP is necessary
Trunk Auto-Negotiation
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.
DTP-related security issues
DTP-related security issues
VLAN Hopping
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.
In depth understanding network security
Spanning Tree Protocol
STP Portfast Bridge Protocol Data Unit
(BPDU) Guard
STP Root Guard
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 msec
logging x.x.x.x
logging trap debugging
logging source loopback0
logging buffered 64000 debugging
ntp authentication-key 10 md5 <key>
ntp authenticate
ntp trusted-key 10
ntp server x.x.x.x [key 10]
ntp access-group peer 20
access-list 20 permit host x.x.x.x
access-list 20 deny any
(config)#no (config)#service
(config)#no (config)#service
(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

More Related Content

PDF
LDAP Theory
PPTX
Computer network updated
DOCX
client-server communication using socket IPC
PDF
Backup para MySQL
PDF
MySQL/MariaDB Proxy Software Test
PPTX
SITE TO SITE IPSEC VPN TUNNEL B/W CISCO ROUTERS
PPTX
Apic dc api deep dive
ODP
An Introduction to PC-Lint
LDAP Theory
Computer network updated
client-server communication using socket IPC
Backup para MySQL
MySQL/MariaDB Proxy Software Test
SITE TO SITE IPSEC VPN TUNNEL B/W CISCO ROUTERS
Apic dc api deep dive
An Introduction to PC-Lint

Viewers also liked (8)

PPTX
PACE-IT: Network Hardening Techniques (part 1)
PPT
CCNA Discovery 2 - Chapter 9
PPTX
Pace IT - Troubleshooting Security
PPT
CCNA Discovery 1 - Chapter 9
PPTX
PACE-IT, Security+3.6: Security Enhancement Techniques
PPTX
TechWiseTV Workshop: Cisco TrustSec
PDF
Splunk Enterprise for IT Troubleshooting Hands-On
PPT
The Basics of Network Troubleshooting
PACE-IT: Network Hardening Techniques (part 1)
CCNA Discovery 2 - Chapter 9
Pace IT - Troubleshooting Security
CCNA Discovery 1 - Chapter 9
PACE-IT, Security+3.6: Security Enhancement Techniques
TechWiseTV Workshop: Cisco TrustSec
Splunk Enterprise for IT Troubleshooting Hands-On
The Basics of Network Troubleshooting
Ad

Similar to In depth understanding network security (20)

PPT
PPT
managing your network environment
DOCX
Router Commands Overview
PDF
Cisco Internetworking Operating System (ios)
PPTX
CCNA_LAB_MANUAL_part1.pptx
DOCX
Telnet configuration
PPTX
Network Design on cisco packet tracer 6.0
PPT
cisco Network Associates Notes +++++++++
PPT
4040187-Ccna-Notes.pptslide share scam side
PPT
4040187-Ccna-Notes.pptnotew for all users
PPT
Intro to router_config
PPT
Intro to router_config
PDF
CCNA CheatSheet
PDF
General lab documentation~cisco router configuration
PPT
CCNA presentation.
PPTX
Detailed explanation of Basic router configuration
PPTX
ITN_Module_10.pptx gfhfdgsrfryrenikerrtvbter
PDF
Advanced RAC troubleshooting: Network
PDF
TCP Intercept
PPTX
CCNA at a glance
managing your network environment
Router Commands Overview
Cisco Internetworking Operating System (ios)
CCNA_LAB_MANUAL_part1.pptx
Telnet configuration
Network Design on cisco packet tracer 6.0
cisco Network Associates Notes +++++++++
4040187-Ccna-Notes.pptslide share scam side
4040187-Ccna-Notes.pptnotew for all users
Intro to router_config
Intro to router_config
CCNA CheatSheet
General lab documentation~cisco router configuration
CCNA presentation.
Detailed explanation of Basic router configuration
ITN_Module_10.pptx gfhfdgsrfryrenikerrtvbter
Advanced RAC troubleshooting: Network
TCP Intercept
CCNA at a glance
Ad

Recently uploaded (20)

PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Spectroscopy.pptx food analysis technology
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
KodekX | Application Modernization Development
PDF
cuic standard and advanced reporting.pdf
PPT
Teaching material agriculture food technology
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Spectroscopy.pptx food analysis technology
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Encapsulation_ Review paper, used for researhc scholars
Mobile App Security Testing_ A Comprehensive Guide.pdf
MYSQL Presentation for SQL database connectivity
Review of recent advances in non-invasive hemoglobin estimation
sap open course for s4hana steps from ECC to s4
Building Integrated photovoltaic BIPV_UPV.pdf
Encapsulation theory and applications.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Unlocking AI with Model Context Protocol (MCP)
“AI and Expert System Decision Support & Business Intelligence Systems”
KodekX | Application Modernization Development
cuic standard and advanced reporting.pdf
Teaching material agriculture food technology
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
20250228 LYD VKU AI Blended-Learning.pptx

In depth understanding network security

  • 2. CIS Level 1 & 2 Benchmarks and Audit Tool for Cisco IOS Routers and PIX firewalls
  • 4. 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.
  • 6. 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:CISRATbin;%PATH%
  • 7. RAT for Windows To run the rat program and see a list of its options, you could type the following: C:> rat --help
  • 8. 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:CISRAT/etc/configs/cisco-ios/local.conf"
  • 9. 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
  • 26. Hardening Cisco Router Based on NSA Router Security Configuration Guide
  • 31. Router Security Configuration Guide of NSA’s SNAC (Based on version 1.1c)
  • 36. 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.
  • 37. 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
  • 39. 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 by direct 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
  • 42. 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.
  • 43. 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#
  • 44. 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.
  • 45. TCP Intercept feature Router1(config)#access-list 109 permit ip any host 192.168.99.2 Router1(config)#ip tcp intercept list 109
  • 46. 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
  • 47. 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.
  • 48. 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
  • 49. 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
  • 50. 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
  • 51. Other IP stack Tune-ups
  • 52. 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
  • 53. 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
  • 54. 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
  • 55. 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?
  • 56. 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
  • 59. Line Authentication (VTY, CON, AUX) Use Access List to control VTY access access-list 1 permit host 10.1.1.2 line vty 0 4 password 7 12552D23830F94 exec-timeout 5 0 access-class 1 in login transport input telnet ssh Control CON access line con 0 password 7 12552D23830F94 exec-timeout 5 0 login Control AUX access line aux 0 no exec exec-timeout 0 0 no login transport input none transport output none
  • 60. 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
  • 61. AAA Example for TACACS/RADIUS Secure user logins with AAA on all ports, virtual and physical aaa new-model aaa authentication login default group tacacs+|radius local aaa authorization exec default group tacacs+|radius local username backup privilege 7 password 0 backup tacacs-server host 171.68.118.101 tacacs-server key cisco radius-server host 171.68.118.101 radius-server key cisco privilege configure level 7 snmp-server host privilege configure level 7 snmp-server enable privilege configure level 7 snmp-server privilege exec level 7 ping privilege exec level 7 configure terminal privilege exec level 7 configure
  • 63. 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
  • 64. 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]
  • 65. 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
  • 66. VTYs and Remote Administration
  • 67. 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.
  • 68. 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.
  • 69. 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.
  • 70. 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
  • 71. HTTP Server with Access Control (Not Recommended)
  • 72. 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
  • 73. 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.
  • 74. 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.
  • 75. 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.
  • 76. 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.
  • 77. 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
  • 78. 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.
  • 81. Disable Router Name and DNS Name Resolution
  • 83. Set a default DNS domain name (needed for SSH)
  • 85. Filtering Traffic to the Router Itself
  • 87. SNMP Service (Recommend only SNMPv3 AuthNoPriv & AuthPriv)
  • 90. IP Address Spoof Protection (Inbound Traffic)
  • 91. IP Address Spoof Protection (Outbound Traffic)
  • 94. Limiting External Access with TCP Intercept (If your IOS support it.)
  • 98. ICMP Message Types and Traceroute
  • 99. Distributed Denial of Service (DDoS) Attacks
  • 107. Using filters to block routing updates
  • 108. First Define Access Control List
  • 111. Not enable OSPF on certain interfaces,
  • 114. 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
  • 115. Logging Types  Console logging  Terminal Line logging  Buffered logging  Syslog logging  SNMP trap logging
  • 116. Cisco Log Message Severity Levels
  • 117. Format of a Cisco IOS Log Message
  • 118. Turning on logging services
  • 119. Setting up Console and Buffered Logging
  • 121. Setting up Terminal Line Logging
  • 122. Setting up Syslog Logging
  • 123. A Small Syslog Configuration server host
  • 127. Time Services, Network Time Synchronization and NTP
  • 128. Setting the Time Manually
  • 135. Configuring SNMP - Getting Started
  • 137. Cisco IOS Software Updates
  • 139. Update Procedure  TFTP  See Cisco web sites concerning particular model of router or switch
  • 142. show ip protocol summary
  • 146. show ip interface brief.
  • 148. Viewing the current configuration  show startup-config  show running-config
  • 149. Viewing currently running processes  show process
  • 150. Router Throughput and Traffic Commands
  • 152. Viewing IP Protocol Statistics  show ip traffic.
  • 153. Viewing SNMP Protocol Statistics
  • 154. configure debugging and turn on debugging messages for ICMP.
  • 155. Security for Router Network Access Services
  • 157. 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.
  • 158.  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.
  • 159.  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
  • 160. 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.
  • 161. Method Lists and Server Groups
  • 163. The authentication commands used for defining messages
  • 164. The default method list designates RADIUS
  • 167. 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.
  • 170. Configuration of TACACS+ accounting:
  • 171. Configuration of RADIUS accounting
  • 173. RADIUS
  • 175. Hardening Cisco Switch (Based on NSA Cisco IOS Switch Security Configuration Guide)
  • 181. Restricting a port statically on a Catalyst 3550 switch.
  • 183. A strictA strict security “host”security “host” macromacro
  • 184. Configure access ports of the switch
  • 185. Virtual Local Area Networks (VLAN)
  • 186. Create the out-of-band management VLAN.
  • 187. Create a management IP address
  • 188. Assign the management VLAN to the dedicated interface.
  • 189. Ensure all trunk ports will not carry the management VLAN
  • 190. Assigned the following name for VLAN 1.
  • 191. Assign all inactive interfaces to an unused VLAN (not VLAN1)
  • 193. If VTP could be disabled
  • 194. If VTP is necessary
  • 196. 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.
  • 200. 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.
  • 203. STP Portfast Bridge Protocol Data Unit (BPDU) Guard
  • 205. 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 msec logging x.x.x.x logging trap debugging logging source loopback0 logging buffered 64000 debugging ntp authentication-key 10 md5 <key> ntp authenticate ntp trusted-key 10 ntp server x.x.x.x [key 10] ntp access-group peer 20 access-list 20 permit host x.x.x.x access-list 20 deny any (config)#no (config)#service (config)#no (config)#service (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

Editor's Notes

  • #39: As a general practice banners should contain the following information and warnings: Only authorized personnel should gain access System logs are being maintained and could be used as evidence in criminal and/or civil court Unauthorized access is unlawful and is subject to civil and/or criminal penalties Be sure banners comply with corporate policies, so that the verbiage does (config)#not conflict with policies. Consider having banners reviewed by corporate legal counsel. Things (config)#not to put in a banner Do (config)#not mention company name, physical device location. Never use the word ‘welcome’. Different banner messages may be used in different network locations. Border routers may use a message such as this one. Internal routers may include warnings regarding disciplinary actions in addition to or instead of criminal/civil actions.
  • #57:   enable secret The enable secret command is used to set the password that grants privileged administrative access to the IOS system. An enable secret password should always be set. The enable secret should be used, not the older enable password. enable password uses a weak encryption algorithm (see the description of the &quot;service password-encryption&quot; command).   If no enable secret is set, and a password is configured for the console TTY line, the console password may be used to get privileged access, even from a remote VTY session. This is almost certainly not wanted, and is another reason to be certain to configure an enable secret. service password-encryption (and its limitations) The service password-encryption command directs the IOS software to encrypt the passwords, CHAP secrets, and similar data that are saved in its configuration file. This is useful for preventing casual observers from reading passwords, for example, when they happen to look at the screen over an administrator&apos;s shoulder.   However, the algorithm used by service password-encryption is a simple Vigenere cipher; any competent amateur cryptographer could easily reverse it in at most a few hours. The algorithm was not designed to protect configuration files against serious analysis by even slightly sophisticated attackers, and should not be used for this purpose. Any Cisco configuration file that contains encrypted passwords should be treated with the same care used for a clear text list of those same passwords. This weak encryption warning does not apply to passwords set with the enable secret command, but it does apply to passwords set with enable password.   The enable secret command uses MD5 for password hashing. The algorithm has had considerable public review, and is not reversible. It is, however, subject to dictionary attacks (a &quot;dictionary attack&quot; is having a computer try every word in a dictionary or other list of candidate passwords).   It&apos;s therefore wise to keep your configuration file out of the hands of untrusted sources, especially if you&apos;re not sure your passwords are well chosen. More information about password encryption is available on Cisco&apos;s Web site at http://www.cisco.com/warp/public/701/64.html .   The following global configuration command encrypts passwords in the written router configurations. Therefore, if the router configuration is copied and listed, the passwords do not appear in the clear-text configuration.   service password-encryption line aux 0 access-class 2 in transport input all line vty 0 4 access-class 1 in password 7 xxxxxxxxxxxxx login ! Add access-lists: ! Allow only specific hosts to telnet into router: access-list 1 permit 169.254.92.39 ! Block access to aux. access-list 2 deny 0.0.0.0 255.255.255.255
  • #61: Console Port It&apos;s important to remember that the console port of an IOS device has special privileges. In particular if a BREAK signal is sent to the console port during the first few seconds after a reboot, the password recovery procedure can easily be used to take control of the system. This means that attackers who can interrupt power or induce a system crash, and who have access to the console port via a hardwired terminal, a modem, a terminal server, or some other network device, can take control of the system, even if they do not have physical access to it or the ability to log in to it normally.   It follows that any modem or network device that gives access to the Cisco console port must itself be secured to a standard comparable to the security used for privileged access to the router. At a bare minimum, any console modem should be of a type that can require the dialup user to supply a password for access, and the modem password should be carefully managed.   Also, set a timeout for the console session so that it will time out and require an authenticated login to regain console access. This following command sets the timeout to 5 minutes:   line con 0 exec-timeout 5 0   AUX Port The use of the AUX port on the border router is not recommended. It is recommended that all access to this port be disabled by using a “no exec” command. The following shows an example of doing this.   line aux 0 no exec   VTYs Defining access-classes to limit access to the vty interfaces on routers is recommended. The following access list is used to limit vty (i.e. telnet) access to the border router(s) to addresses from [Client]. Telnet connections originating from outside of [Client] will be ignored.   access-list 1 permit 12.xx.xx.0 0.0.1.255 access-list 1 deny any any line vty 0 4 access-class 1 in   It is recommended that [Client] use TACACS or RADIUS for login authentication. Here is an example of how TACACS might be configured. These commands are pending getting a TACACS server up and running to be able to authenticate router logins.   tacacs-server host w.x.y.z tacacs-server last-resort succeed line vty 0 4 login tacacs   It would be beneficial if there were multiple levels of access to the routers for operations and engineering personnel. This can be accomplished with privilege levels. Below is an example of how to enable this on the routers.   enable password level 10 password10 privilege exec level 10 show startup-config privilege exec level 10 copy run tftp   To change to the appropriate privilege level, run the following command.   enable level   It is also possible to use commands like the following to show the current privilege level and exit out of a privilege level.   show privilege disable level Notes from Scott Hogg: put access-class on its own slide and describe more how it works - it doesn&apos;t work for con, aux ports Expand the discussion about RADIUS and TACACS - talk about the pros-cons of each in a Cisco shop
  • #62: privilege level 1 = non-privileged (prompt is router&gt;), the default level for login privilege level 15 = privileged (prompt is router#), the level after going into enable mode privilege level 0 = seldom-used, but includes 5 commands: disable, enable, exit, help, and logout http://www.cisco.com/en/US/tech/tk583/tk547/technologies_tech_note09186a008009465c.shtml
  • #64: (config)#service password-encryption To encrypt passwords, use the (config)#service password-encryption command in global configuration mode. To restore the default, use the (config)#no form of this command. (config)#service password-encryption 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 (config)#notice, because the printer does (config)#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 (config)#no keepalives are detected, the connection is closed. The connection is also closed if the host replies to a keepalive packet with a reset packet. This will happen if the host crashes and comes back up again. To generate keepalive packets on idle incoming network connections (initiated by the remote host), use the (config)#service tcp-keepalives-in global configuration command. To disable the keepalives, use the (config)#no form of this command. (config)#service tcp-keepalives-in To generate keepalive packets on idle outgoing network connections (initiated by a user), use the (config)#service tcp-keepalives-out global configuration command. To disable the keepalives, use the (config)#no form of this command. (config)#service tcp-keepalives-out To configure the system to time-stamp debugging or logging messages, use one of the (config)#service timestamps global configuration commands. To disable this (config)#service, use the (config)#no form of this command. (config)#service timestamps message-type [ uptime ] (config)#service timestamps message-type datetime [ msec ] [ localtime ] [ show-timezone ] (config)#no (config)#service timestamps type