Autosecure: Release Modification
Autosecure: Release Modification
Autosecure: Release Modification
By using a single command-line interface (CLI), the AutoSecure feature allows a user to perform the
following functions:
• Disable common IP services that can be exploited for network attacks
• Enable IP services and features that can aid in the defense of a network when under attack.
This feature also simplifies the security configuration of a router and hardens the router configuration.
Finding Support Information for Platforms and Cisco IOS Software Images
Use Cisco Feature Navigator to find information about platform support and Cisco IOS software image
support. Access Cisco Feature Navigator at http://www.cisco.com/go/fn. You must have an account on
Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at
the login dialog box and follow the instructions that appear.
Contents
• Information About AutoSecure, page 2
• How to Configure AutoSecure, page 6
• Configuration Examples for AutoSecure, page 9
• Additional References, page 12
• Command Reference, page 13
Corporate Headquarters:
Cisco Systems, Inc., 170 West Tasman Drive, San Jose, CA 95134-1706 USA
Benefits of AutoSecure
Simplified Router Security Configuration
AutoSecure is valuable to customers without special Security Operations Applications because it allows
them to quickly secure their network without thorough knowledge of all the Cisco IOS features.
This feature eliminates the complexity of securing a router by creating a new CLI that automates the
configuration of security features and disables certain features enabled by default that could be exploited
for security holes.
Note Prior to Cisco IOS Release 12.3(8)T, roll-back of the AutoSecure configuration is unavailable; thus, you
should always save the running configuration before configuring AutoSecure.
System Logging Messages capture any changes or tampering of the AutoSecure configuration that were
applied on the running configuration. That is, more detailed audit trail information is provided when
autosecure is executed.
Caution If your device is managed by a network management (NM) application, securing the management plane
could turn off some services like HTTP server and disrupt the NM application support.
The following subsections define how AutoSecure helps to secure the management plane:
• Disable Global Services
• Disable Per Interface Services
• Enable Global Services
• Secure Access to the Router
• Log for Security
Note If you are using Security Device Manager (SDM), you must manually enable the HTTP server
via the ip http server command.
• Identification Service—An unsecure protocol, defined in RFC 1413, that allows one to query a TCP
port for identification. An attacker can access private information about the user from the ID server.
• CDP—If a large number of Cisco Discovery Protocol (CDP) packets are sent to the router, the
available memory of the router can be consumed, causing the router to crash.
Caution NM applications that use CDP to discover network topology will not be able to perform discovery.
• NTP—Without authentication or access-control, Network Time Protocol (NTP) is insecure and can
be used by an attacker to send NTP packets to crash or overload the router. (If you want to turn on
NTP, you must configure NTP authentication using Message Digest 5 (MD5) and the
ntp access-group command. If NTP is enabled globally, disable it on all interfaces on which it is
not needed.)
• Source Routing—Provided only for debugging purposes, so source routing should be disabled in all
other cases. Otherwise, packets may slip away from some of the access control mechanisms that they
should have gone through.
Caution If your device is managed by an NM application, securing access to the router could turn off vital
services and may disrupt the NM application support.
After enabling this feature, the following options in which to secure access to the router are available to
the user:
• If a text banner does not exist, users will be prompted to add a banner. This feature provides the
following sample banner:
Authorized access only
This system is the property of ABC Enterprise
Disconnect IMMEDIATELY if you are not an authorized user!
Contact [email protected] +99 876 543210 for help.
• The login and password (preferably a secret password, if supported) are configured on the console,
AUX, vty, and tty lines. The transport input and transport output commands are also configured
on all of these lines. (Telnet and secure shell (SSH) are the only valid transport methods.) The
exec-timeout command is configured on the console and AUX as 10.
• When the image on the device is a crypto image, AutoSecure enables SSH and secure copy (SCP)
for access and file transfer to and from the router. The timeout seconds and authentication-retries
integer options for the ip ssh command are configured to a minimum number. (Telnet and FTP are
not affected by this operation and remain operational.)
• If the AutoSecure user specifies that their device does not use Simple Network Management
Protocol (SNMP), one of the following functionalities will occur:
– In interactive mode, the user is asked whether to disable SNMP regardless of the values of the
community strings, which act like passwords to regulate access to the agent on the router.
– In non-interact mode, SNMP will be disabled if the community string is “public” or “private.”
Note After AutoSecure has been enabled, tools that use SNMP to monitor or configure a device will
be unable to communicate with the device via SNMP.
• If authentication, authorization, and accounting (AAA) is not configured, configure local AAA.
Autosecure will prompt users to configure a local username and password on the router.
• If the TCP intercept feature is available, it can be configured on the router for connection timeout.
• If strict Unicast Reverse Path Forwarding (uRPF) is available, it can be configured on the router to
help mitigate problems that are caused by the introduction of forged (spoofed) IP source addresses.
uRPF discards IP packets that lack a verifiable IP source address.
• If the router is being used as a firewall, it can be configured for context-based access control (CBAC)
on public interfaces that are facing the Internet.
Note At the beginning of the AutoSecure dialogue, you will be prompted for a list of public interfaces
Configuring AutoSecure
To configure AutoSecure, you must perform the following tasks.
Caution Although the auto secure command helps to secure a router, it does not guarantee the complete security
of the router.
Restrictions
The AutoSecure configuration can be configured at run time or setup time. If any related configuration
is modified after AutoSecure has been enabled, the AutoSecure configuration may not be fully effective.
SUMMARY STEPS
1. enable
2. auto secure [management | forwarding] [no-interact | full] [ntp | login | ssh | firewall |
tcp-intercept]
DETAILED STEPS
SUMMARY STEPS
1. enable
2. configure terminal
3. security passwords min-length length
4. enable password {password | [encryption-type] encrypted-password}
5. security authentication failure rate threshold-rate log
DETAILED STEPS
Example:
Router# configure terminal
Step 3 security passwords min-length length Ensures that all configured passwords are at least a
specified length.
Example: • length—Minimum length of a configured
Router(config)# security passwords min-length 6 password.
Step 4 enable password {password | [encryption-type] Sets a local password to control access to various
encrypted-password} privilege levels.
Example:
Router(config)# enable password elephant
Step 5 security authentication failure rate Configures the number of allowable unsuccessful login
threshold-rate log attempts.
• threshold-rate—Number of allowable unsuccessful
Example: login attempts.
Router(config)# security authentication failure
rate 10 log • log—Syslog authentication failures if the rate
exceeds the threshold.
Verifying AutoSecure
To verify that the AutoSecure feature is working successfully, perform the following optional steps:
SUMMARY STEPS
1. enable
2. show auto secure config
DETAILED STEPS
*** AutoSecure configuration enhances the security of the router but it will not make
router absolutely secure from all security attacks ***
All the configuration done as part of AutoSecure will be shown here. For more details of
why and how this configuration is useful, and any possible side effects, please refer to
Cisco documentation of AutoSecure.
At any prompt you may enter '?' for help.
Use ctrl-c to abort this session at any prompt.
no ip redirects
no ip proxy-arp
no ip unreachables
no ip directed-broadcast
no ip mask-reply
Disabling mop on Ethernet interfaces
Enabling CEF (it might have more memory requirements on some low end
platforms)
no service finger
no service pad
no service udp-small-servers
no service tcp-small-servers
service password-encryption
service tcp-keepalives-in
service tcp-keepalives-out
no cdp run
no ip bootp server
no ip http server
no ip finger
no ip source-route
no ip gratuitous-arps
no ip identd
security passwords min-length 6
security authentication failure rate 10 log
enable secret 5 $1$CZ6G$GkGOnHdNJCO3CjNHHyTUA.
aaa new-model
aaa authentication login local_auth local
line console 0
login authentication local_auth
exec-timeout 5 0
transport output telnet
line aux 0
login authentication local_auth
exec-timeout 10 0
transport output telnet
line vty 0 4
login authentication local_auth
transport input telnet
ip domain-name cisco.com
crypto key generate rsa general-keys modulus 1024
ip ssh time-out 60
ip ssh authentication-retries 2
line vty 0 4
transport input ssh telnet
service timestamps debug datetime localtime show-timezone msec
service timestamps log datetime localtime show-timezone msec
logging facility local2
logging trap debugging
service sequence-numbers
logging console critical
logging buffered
int FastEthernet0/1
no ip redirects
no ip proxy-arp
no ip unreachables
no ip directed-broadcast
no ip mask-reply
no mop enabled
int FastEthernet1/0
no ip redirects
no ip proxy-arp
no ip unreachables
no ip directed-broadcast
no ip mask-reply
no mop enabled
int FastEthernet1/1
no ip redirects
no ip proxy-arp
no ip unreachables
no ip directed-broadcast
no ip mask-reply
no mop enabled
int FastEthernet0/0
no ip redirects
no ip proxy-arp
no ip unreachables
no ip directed-broadcast
no ip mask-reply
no mop enabled
ip cef
interface FastEthernet0/0
ip verify unicast reverse-path
ip inspect audit-trail
ip inspect dns-timeout 7
ip inspect tcp idle-time 14400
ip inspect udp idle-time 1800
ip inspect name autosec_inspect cuseeme timeout 3600
ip inspect name autosec_inspect ftp timeout 3600
Router#
Additional References
The following sections provide references related to AutoSecure.
Related Documents
Related Topic Document Title
Login functionality (such as login delays and login Cisco IOS Login Enhancements, Cisco IOS Release 12.3(4)T feature
blocking periods) module
Additional information regarding router configuration Cisco IOS Configuration Fundamentals Configuration Guide
Additional router configuration commands Cisco IOS Configuration Fundamentals Command Reference
Standards
Standards Title
None —
MIBs
MIBs MIBs Link
None To locate and download MIBs for selected platforms, Cisco IOS
releases, and feature sets, use Cisco MIB Locator found at the
following URL:
http://www.cisco.com/go/mibs
RFCs
RFCs Title
RFC 1918 Address Allocation for Private Internets
RFC 2267 Network Ingress Filtering: Defeating Denial of Service Attacks
which employ IP Source Address Spoofing
Technical Assistance
Description Link
Technical Assistance Center (TAC) home page, http://www.cisco.com/public/support/tac/home.shtml
containing 30,000 pages of searchable technical
content, including links to products, technologies,
solutions, technical tips, and tools. Registered
Cisco.com users can log in from this page to access
even more content.
Command Reference
This section documents new commands.
• auto secure
• security authentication failure rate
• security passwords min-length
• show auto secure config
auto secure
To secure the management and forwarding planes of the router, use the auto secure command in
privileged EXEC mode.
auto secure [management | forwarding] [no-interact | full] [ntp | login | ssh | firewall |
tcp-intercept]
Syntax Description management (Optional) Only the management plane will be secured.
forwarding (Optional) Only the forwarding plane will be secured.
no-interact (Optional) The user will not be prompted for any interactive configurations.
If this keyword is not enabled, the command will show the user the
noninteractive configuration and the interactive configurations thereafter.
full (Optional) The user will be prompted for all interactive questions. This is the
default.
ntp (Optional) Specifies the configuration of the Network Time Protocol (NTP)
feature in the AutoSecure command line-interface (CLI).
login (Optional) Specifies the configuration of the Login feature in the AutoSecure
CLI.
ssh (Optional) Specifies the configuration of the Secure Shell (SSH) feature in
the AutoSecure CLI.
firewall (Optional) Specifies the configuration of the firewall feature in the
AutoSecure CLI.
tcp-intercept (Optional) Specifies the configuration of the TCP-Intercept feature in the
AutoSecure CLI.
Usage Guidelines The auto secure command allows a user to disable common IP services that can be exploited for network
attacks by using a single CLI. This command eliminates the complexity of securing a router both by
automating the configuration of security features and by disabling certain features that are enabled by
default and that could be exploited for security holes.
Caution If you are using Security Device Manager (SDM), you must manually enable the HTTP server via the
ip http server command.
This command takes you through a semi-interactive session (also known as the AutoSecure dialogue) in
which to secure the management and forwarding planes. This command gives you the option to secure
just the management or forwarding plane; if neither option is selected, the dialogue will ask you to
configure both planes.
Caution If your device is managed by a network management (NM) application, securing the management plane
could turn off vital services and disrupt the NM application support.
This command also allows you to go through all noninteractive configuration portions of the dialogue
before the interactive portions. The noninteractive portions of the dialogue can be enabled by selecting
the optional no-interact keyword.
Note Prior to Cisco IOS Release 12.3(8)T, roll-back of the AutoSecure configuration is unavailable; thus, you
should always save the running configuration before configuring AutoSecure.
Examples The following example shows how to enable AutoSecure to secure only the management plane:
Router# auto secure management
Syntax Description threshold-rate Number of allowable unsuccessful login attempts. The default is 10.
log Syslog authentication failures if the rate exceeds the threshold.
Defaults The default number of failed login attempts before a 15-second delay is 10.
Usage Guidelines The security authentication failure-rate command provides enhanced security access to the router by
generating syslog messages after the number of unsuccessful login attempts exceeds the configured
threshold rate. This command ensures that there are not any continuous failures to access the router.
Examples The following example shows how to configure your router to generate a syslog message after eight
failed login attempts:
Router(config)# security authentication failure rate 8 log
Syntax Description length Minimum length of a configured password. The default is six characters.
Usage Guidelines The security passwords min-length command provides enhanced security access to the router by
allowing you to specify a minimum password length, eliminating common passwords that are prevalent
on most networks, such as “lab” and “cisco.” This command affects user passwords, enable passwords
and secrets, and line passwords. After this command is enabled, any password that is less than the
specified length will fail.
Examples The following example shows both how to specify a minimum password length of six characters and
what happens when the password does not adhere to the minimum length:
Router(config)# security password min-length 6
Router(config)# enable password lab
% Password too short - must be at least 6 characters. Password not configured.
Examples The following sample output from the show auto secure config command shows what has been enabled
and disabled via the auto secure command:
Router# show auto secure config
no service finger
no service pad
no service udp-small-servers
no service tcp-small-servers
service password-encryption
service tcp-keepalives-in
service tcp-keepalives-out
no cdp run
no ip bootp server
no ip http server
no ip finger
no ip source-route
no ip gratuitous-arps
no ip identd
security passwords min-length 6
security authentication failure rate 10 log
enable secret 5 $1$CZ6G$GkGOnHdNJCO3CjNHHyTUA.
aaa new-model
aaa authentication login local_auth local
line console 0
login authentication local_auth
exec-timeout 5 0
transport output telnet
line aux 0
login authentication local_auth
exec-timeout 10 0
transport output telnet
line vty 0 4
login authentication local_auth
transport input telnet
ip domain-name cisco.com
ip ssh authentication-retries 2
line vty 0 4
transport input ssh telnet
service timestamps debug datetime localtime show-timezone msec
service timestamps log datetime localtime show-timezone msec
logging facility local2
logging trap debugging
service sequence-numbers
logging console critical
logging buffered
interface FastEthernet0/1
no ip redirects
no ip proxy-arp
no ip unreachables
no ip directed-broadcast
no ip mask-reply
no mop enabled
!
interface FastEthernet1/0
no ip redirects
no ip proxy-arp
no ip unreachables
no ip directed-broadcast
no ip mask-reply
no mop enabled
!
interface FastEthernet1/1
no ip redirects
no ip proxy-arp
no ip unreachables
no ip directed-broadcast
no ip mask-reply
no mop enabled
!
interface FastEthernet0/0
no ip redirects
no ip proxy-arp
no ip unreachables
no ip directed-broadcast
no ip mask-reply
no mop enabled
!
ip cef
interface FastEthernet0/0
ip verify unicast reverse-path
ip inspect audit-trail
ip inspect dns-timeout 7
ip inspect tcp idle-time 14400
ip inspect udp idle-time 1800
ip inspect name autosec_inspect cuseeme timeout 3600
ip inspect name autosec_inspect ftp timeout 3600
ip inspect name autosec_inspect http timeout 3600
ip inspect name autosec_inspect rcmd timeout 3600
ip inspect name autosec_inspect realaudio timeout 3600
ip inspect name autosec_inspect smtp timeout 3600
ip inspect name autosec_inspect tftp timeout 30
ip inspect name autosec_inspect udp timeout 15
ip inspect name autosec_inspect tcp timeout 3600
access-list 100 deny ip any any
interface FastEthernet0/0
ip inspect autosec_inspect out
ip access-group 100 in
CCSP, the Cisco Square Bridge logo, Follow Me Browsing, and StackWise are trademarks of Cisco Systems, Inc.; Changing the Way We Work, Live,
Play, and Learn, and iQuick Study are service marks of Cisco Systems, Inc.; and Access Registrar, Aironet, ASIST, BPX, Catalyst, CCDA, CCDP, CCIE,
CCIP, CCNA, CCNP, Cisco, the Cisco Certified Internetwork Expert logo, Cisco IOS, Cisco Press, Cisco Systems, Cisco Systems Capital, the Cisco
Systems logo, Cisco Unity, Empowering the Internet Generation, Enterprise/Solver, EtherChannel, EtherFast, EtherSwitch, Fast Step, FormShare,
GigaDrive, GigaStack, HomeLink, Internet Quotient, IOS, IP/TV, iQ Expertise, the iQ logo, iQ Net Readiness Scorecard, LightStream, Linksys,
MeetingPlace, MGX, the Networkers logo, Networking Academy, Network Registrar, Packet, PIX, Post-Routing, Pre-Routing, ProConnect, RateMUX,
ScriptShare, SlideCast, SMARTnet, StrataView Plus, SwitchProbe, TeleRouter, The Fastest Way to Increase Your Internet Quotient, TransPath, and VCO
are registered trademarks of Cisco Systems, Inc. and/or its affiliates in the United States and certain other countries.
All other trademarks mentioned in this document or Website are the property of their respective owners. The use of the word partner does not imply a
partnership relationship between Cisco and any other company. (0501R)