Cisco Router Review
Cisco Router Review
1.1 Remote vty, con, or aux terminal access should require a user to login
All remotely accessible terminals (vty, con, aux)should have login checking turned on (require EXEC
password). Any modem or network device that gives access to the Cisco console port must provide a
password challenge. All access to the router (be it remote or direct) should be password controlled. All
remote management should be performed using SSH to ensure traffic is encrypted esp. password. Anyone
with network visibility to the router can gain command prompt access, if the login directive is not given in
the Cisco configuration.
1.2 To gain command prompt access, all routers should require a password to be supplied
All remotely accessible terminals should have passwords implemented. No one will be allowed access to a
router through an interface, if the login directive is applied to the interface and no password has been
assigned to that interface.
1.5 Hosts that can access the login prompt should be restricted by use of access lists
Review the access lists implemented on each vty, con or aux terminal access for appropriateness. The risk
of unauthorised access is increased if anyone on the network is allowed access to the login prompt.
1.6 Non-default SNMP community strings should be used on all routers being monitored by SNMP.
Routers not being monitored by SNMP should have SNMP disabled. SNMP community strings should
have been changed from the default of ‘public’ and ‘private’. If at all possible, you should avoid using the
same community strings for all network devices; use a different string or strings for each device, or at least
for each area of the network. Do not make a read-only string the same as a read-write string. If possible,
periodic SNMP version 1 polling should be done with a read-only community string; read-write strings
should be used only for actual write operations. Read-only and read-write SNMP access to a Cisco router
can allow an intruder to gain unauthorized access to the Cisco router. Default SNMP strings, such as
'public' and 'private' or 'read' and 'write, are easily guessed by potential intruders.
If at all possible, use SNMP version 2 which uses an MD5-based digest authentication scheme, and allows
for restricted access to various management data. SNMP version 1 uses a very weak authentication scheme.
In most networks, legitimate SNMP messages will come only from certain management stations. If this is
true in your network, you should probably use the access list number option on the snmp-server
community command to restrict SNMP version 1 access to only the IP addresses of the management
stations. Do not use the snmp-server community command for any purpose in a pure SNMP version 2
environment; this command implicitly enables SNMP version 1.
For SNMP version 2, configure digest authentication with the authentication and md5 keywords of the
snmp-server party configuration command. If possible, use a different MD5 secret value for each router.
SNMP management stations often have large databases of authentication information, such as community
strings. This information may provide access to many routers and other network devices. This
concentration of information makes the SNMP management station a natural target for attack, and it should
be secured accordingly.
1.8 Ensure that appropriate controls are applied on all lines, including both VTY lines and TTY lines
Administrators should make sure that logins on all lines are controlled using some sort of authentication
mechanism. This is especially important for VTY lines and for lines connected to modems or other remote
access devices.
Interactive logins may be completely prevented on any line by configuring it with the login and no
password commands. This is the default configuration for VTYs, but not for TTYs.
Restrict Telnet access to specific workstations on the internal network side of the router only.
Complete VTY protection can be provided by disabling all non-IP-based remote access protocols, and
using IPSec encryption for all remote interactive connections to the router.
1.16 Where possible use TACACS+ or RADIUS authentication and authorisation should be used
Where possible use TACACS+ or RADIUS authentication and authorisation to allow telnet, ftp, http or serial
access to router consoles. Ensure that a difficult to guess secret key is in place for communication between
the router and the authentication server and that the traffic is encrypted. Also configure accounting on router.
Achieved by using the console option in the command aaa authentication and specifying the appropriate
access and prompt options (serial, telnet, enable).
Use aaa authentication and aaa authorisation. The aaa-server command gives the encryption option for
traffic between the server and the router. This command provides options to encrypt traffic to the
authentication server.
Use aaa accounting <acctg_service> for any services requiring accounting. Server designated by the
command aaa-server will receive the logs.
Logical access to the router console should be restricted to authorised personnel. By using strong secret
keys, the possibility of an unauthorised authentication server communication with the router is reduced.
It may be difficult to track intrusions if user authentication is not logged.
User names and other security related information can be disclosed to unauthorised users by default router
services, such as finger or tcp/udp small servers.
TCP intercept mode should be active on all routers. TCP intercept mode actively intercepts or watches
each incoming connection request and is used to prevent denial of service attacks such as SYN floods.
Routers configured for CEF perform well under SYN floods (directed at hosts, not at the routers
themselves) than do routers using the traditional cache. CEF is recommended when available.
When a Cisco router is fast-switching a large number of packets, it is possible for the router to spend so
much time responding to interrupts from the network interfaces that no other work gets done. Some very
fast packet floods can cause this condition. The effect can be reduced by using the scheduler interval
command, which instructs the router to stop handling interrupts and attend to other business at regular
intervals. A typical configuration might include the command scheduler interval 500, which indicates that
process-level tasks are to be handled no less frequently than every 500 milliseconds.
Many newer Cisco platforms use the command scheduler allocate instead of scheduler interval. The
scheduler allocate command takes two parameters: a period in microseconds for the system to run with
interrupts enabled, and a period in microseconds for the system to run with interrupts masked. If your
system doesn't recognize the scheduler interval 500 command, try scheduler allocate 3000 1000.
Ensure that appropriate filtering is in place
3.1 Inbound and outbound traffic should be filtered using Cisco access lists
Assess the access lists for appropriateness. Restricting the traffic entering a network greatly minimises the
risk of intruder attacks. For instance, if a particular machine only requires HTTP traffic, then all other
traffic should be blocked. This would greatly reduce the risk of attacks as attackers only have one protocol
to use.
Determine a lockdown rule has been placed at the beginning of the rule base. The lockdown rule protects
the router, ensuring that whatever other rules you put in later will not inadvertently compromise your
router. If administrative access is required then a rule should be placed before the lockdown rule. All other
rules should go after the lockdown rule going from most restrictive to general rules. Review the remaining
rules.
Ensure all interfaces have access lists applied to them. All traffic is allowed to pass through an interface if
an access list is created, but not applied to the interface as the access list is not used.
All incoming traffic that have a source address of that of the internal network should be dropped by the
router. Any outgoing traffic that has a source address of that of the external networks should be dropped.
This should be controlled using lines in the access lists that drop this type of traffic. It maybe possible that
unauthorised traffic may bypass access control lists on the router by claiming that the traffic came from the
internal network, if IP spoofing is allowed.
In general, anti-spoofing filters must be built with input access lists; that is, packets must be filtered at the
interfaces through which they arrive at the router, not at the interfaces through which they leave the router.
This is configured with the ip access-group list in interface configuration command.
When anti-spoofing access lists exist, they should always reject datagrams with broadcast or multicast
source addresses, and datagrams with the reserved "loopback" address as a source address. It's usually also
appropriate for an anti-spoofing access list to filter out all ICMP redirects, regardless of source or
destination address. Appropriate commands would be:
If your router has a real-time clock or is running NTP, you will probably want to time-stamp
log entries using service timestamps log datetime msecs.
Log packets that violate your filtering criteria. Older Cisco IOS software versions support
logging using the log keyword, which causes logging of the IP addresses and port numbers associated
with packets matching an access list entry. Newer versions provide the log-input keyword, which adds
information about the interface from which the packet was received, and the MAC address of the host
that sent it.
Is the date and time correct on the router? Ensure the accuracy with the show clock command.
Which time zone is it set for? This helps to determine exactly when an event occurred.
Is the Network Time Protocol (NTP) used to keep accurate time? Enabling NTP will help to
prevent hackers from attacking based on time (expired time blocks, etc.). Configure NTP to allow
updates from the internal time servers only. Disable NTP on the Internet interface inbound and
outbound. Synchronising your Internet Access Router time with the rest of your network will be
invaluable in the event an attackers does break into your network.
4.1 Ensure protection against password sniffing for logon over the Internet
If at all possible, you should avoid logging in to your router using any unencrypted protocol over any
untrusted network. If your router software supports it, it's a good idea to use an encrypted login protocol such
as SSH or Kerberized Telnet. Another possibility is to use IPSec encryption for all router management
traffic, including Telnet, SNMP, and HTTP.
If you don't have access to an encrypted remote access protocol, another possibility is to use a one-time
password system such as S/KEY or OPIE, together with a TACACS+ or RADIUS server, to control both
interactive logins and privileged access to your router.
If you absolutely must send passwords over cleartext Telnet sessions, you should change your passwords
frequently, and pay close attention to the path traversed by your sessions.
Ensure appropriate administration policies have been documented, adequate physical and
environmental controls are in place, and appropriate disaster recovery arrangements have been made
Tools – Solarwinds Engineers Toolkit, Data Sniffer- buttsniff (use a public share to load, use-L to
find interface)
RIP Spoofing – rprobe –v xxx.xxx.xxx.xxx, capture return traffic with sniffer
RIP Spoofing
o Redirect traffic through your system so you can sniff it
Use prior sniffing to know internal network addresses
Add a route on spoofed router (use srip)
Ip address 10.0.50.01
Netmask 255.255.255.255
Gateway mymachineaddress
Metric 1
Send the packet on to normal destination
Add ip forwarding onto our machine
Vi /proc/sys/net/ipv4/ip_forward 1
Changing 0 to the above metric 1
Start your sniffer(more info find ripar.txt)
!
version 12.0
service timestamps debug datetime localtime
service timestamps log datetime localtime
service password-encryption (1.4)
!
hostname unknown
!
logging buffered 4096 debugging
enable secret 5 askjhfncka (1.3)
!
memory-size iomem 10
ip subnet-zero
no ip source-route (2.2)
no ip finger (2.1)
no small-tcp-servers (2.1)
no small-udp-servers (2.1)
clock timezone ABC
clock summer-time ABC
!
!
!
interface Ethernet0/0
no ip address
no ip directed-broadcast (2.3)
shutdown
!
interface Serial0/0
no ip address
no ip directed-broadcast (2.3)
encapsulation frame-relay
!
interface Serial0/0.1 point-to-point
description PVC to Internet Service Provider(Internet)
bandwidth 1920
ip address 203.97.41.2 255.255.255.252
ip access-group 100 in (3.2) (3.3)
no ip directed-broadcast (2.3)
frame-relay interface-dlci 51 IETF
!
interface Ethernet0/1
ip address 144.66.236.94 255.255.255.252
no ip directed-broadcast (2.3)
!
interface Serial0/1
no ip address
no ip directed-broadcast (2.3)
shutdown
!
ip classless
ip route 0.0.0.0 0.0.0.0 203.97.41.1
ip route 134.251.0.0 255.255.0.0 144.66.236.93
ip route 144.66.0.0 255.255.0.0 144.66.236.93
ip route 203.167.232.176 255.255.255.240 144.66.236.93
!
access-list 5 permit 134.251.0.0 0.0.255.255 (3.1)
access-list 95 permit 134.251.37.253 (3.1)
access-list 95 permit 134.251.37.243 (3.1)
access-list 100 deny ip 144.66.0.0 0.0.255.255 any log (3.1/3.4)
access-list 100 deny ip 134.251.0.0 0.0.255.255 any log (3.1/3.4)
access-list 100 deny ip 203.167.232.176 0.0.0.15 any log (3.1/3.4)
access-list 100 deny ip 127.0.0.0 0.0.0.255 any log (3.1/3.4)
access-list 100 deny ip any host 203.167.232.177 log (3.1/3.4)
access-list 100 deny ip any host 203.167.232.178 log (3.1/3.4)
access-list 100 permit icmp any host 203.97.41.2 echo (3.1)
access-list 100 permit icmp any host 203.97.41.2 echo-reply (3.1)
access-list 100 permit icmp any 203.167.232.176 0.0.0.15 echo (3.1)
access-list 100 permit icmp any 203.167.232.176 0.0.0.15 echo-reply (3.1)
access-list 100 permit tcp any 203.167.232.176 0.0.0.15 eq www (3.1)
access-list 100 permit tcp any 203.167.232.176 0.0.0.15 eq 443 (3.1)
access-list 100 permit tcp any 203.167.232.176 0.0.0.15 eq 1494 (3.1)
access-list 100 deny ip any any log (3.4)
no cdp run (2.1)
snmp-server community fred RO 95 (1.6)
snmp-server community wally RW 95 (1.6)
snmp-server packetsize 8192
snmp-server enable traps snmp
snmp-server host 134.251.37.253 traps XXXXXXXXXX
!
line con 0
transport input none (1.9/1.10)
line aux 0
line vty 0 4
access-class 5 in (1.5) (1.10)
exec-timeout 5 0 (1.7)
password 7 asdkjncankca (1.2)
login (1.1)
!
ntp clock-period 17208436 (2.1)
ntp server 134.251.37.254 (2.1)
end
Useful Security Related Command List
Use To
Control which protocols can be used by remote users to connect interactively to the
transport input
router's VTYs or to access its TTY ports.
Control which IP addresses can connect to TTYs or VTYs. Reserve one VTY for
ip access-class
access from an administrative workstation.
service tcp-keepalives-in Detect and delete "dead" interactive sessions, preventing them from tying up VTYs.
Save logging information in a local RAM buffer on the router. With newer software,
logging buffered buffer-size
the buffer size may be followed with an urgency threshold.
ip verify unicast rpf Discard "spoofed" IP packets in symmetric routing environments with CEF only.
no ip source-route Prevent IP source routing options from being used to spoof traffic.
access-list number action
criteria log
Enable logging of packets that match specific access list entries. Use log-input if it's
access-list number action available in your software version.
criteria log-input
scheduler-interval
Prevent fast floods from shutting down important processing.
scheduler allocate
snmp-server party... Configure MD5-based SNMP version 2 authentication. Enable SNMP only if it's
authentication md5 secret ... needed in your network.
ip http authentication
Authenticate HTTP connection requests (if you've enabled HTTP on your router).
method
Further control HTTP access by restricting it to certain host addresses (if you've
ip http access-class list
enabled HTTP on your router).
banner login Establish a warning banner to be displayed to users who try to log into the router.
Reference:
http://www.cisco.com/warp/public/707/21.html