Is the device going to be connected to the Internet?
How many interfaces are connected to the Internet?
What are the names of the interfaces connected to the Internet?
What will be your local username and password?
What will be the switch hostname and domain name?
Restrictions for AutoSecure
Because there is no command to undo configuration changes made by AutoSecure, always save your running configuration before configuring AutoSecure.
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.
After AutoSecure has been enabled, tools that use SNMP to monitor or configure a device will be unable to communicate with the device using SNMP.
If your device is managed by a network management (NM) application, securing the management plane could turn off some services such as HTTP server and disrupt the NM application support.
If you are using Security Device Manager (SDM), you must manually enable the HTTP server using the
ip http server
NM applications that use CDP to discover network topology will not be able to perform discovery.
Use the AutoSecure feature to secure the switch without understanding all the security features. AutoSecure is a simple security configuration process that disables nonessential system services and enables a basic set of recommended security policies to ensure secure networking services.
Simplified Switch Security Configuration
AutoSecure automates a thorough configuration of security features of the switch. AutoSecure disables certain features that are enabled by default that could be exploited for security holes. You can execute AutoSecure in either of two modes, depending on your individual needs:
Interactive mode—Prompts with options to enable and disable services and other security features, suggesting a default setting for each option.
Noninteractive mode—Automatically executes the recommended Cisco default settings.
Enhanced Password Security Enabled by AutoSecure
You can specify a required minimum password length, which can eliminate weak passwords that are prevalent on most networks, such as “lab” and “cisco.”
To configure a minimum password length, use the
security passwords min-length
You can cause a syslog message to be generated after the number of unsuccessful login attempts exceeds the configured threshold.
To configure the number of allowable unsuccessful login attempts (the threshold rate), use the
security authentication failure rate
System Logging Message Support
System logging messages capture any subsequent changes to the AutoSecure configuration that are applied on the running configuration. As a result, a more detailed audit trail 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 such as the HTTP server and disrupt the NM application support.
Management Plane Security Overview
AutoSecure provides protection for the switch management interfaces (the management plane) and the data routing and switching functions (the forwarding plane, described in the “Forwarding Plane Security Enabled by AutoSecure” section.) Securing the management plane is done by turning off certain global and interface services that can be potentially exploited for security attacks and turning on global services that help minimize the threat of attacks. Secure access and secure logging are also configured for the switch.
Global Services Disabled by AutoSecure
Finger—Collects information about the system (reconnaissance) before an attack.
PAD—Enables all packet assembler and disassembler (PAD) commands and connections between PAD devices and access servers.
Small servers—Causes TCP and User Datagram Protocol (UDP) diagnostic port attacks: a sender transmits a volume of fake requests for UDP diagnostic services on the switch, consuming all CPU resources.
Bootp server—Bootp is an insecure protocol that can be exploited for an attack.
HTTP server—Without secure-HTTP or authentication embedded in the HTTP server with an associated ACL, the HTTP server is insecure and can be exploited for an attack. (If you must enable the HTTP server, you will be prompted for the proper authentication or access list.)
Note If you are using Security Device Manager (SDM), you must manually enable the HTTP server using the ip http server command.
Identification service—An unsecure protocol (defined in RFC 1413) that allows an external host 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 switch, the available memory of the switch can be consumed, which causes the switch to crash.
Note 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 switch.
If you require NTP, you must configure NTP authentication using Message Digest 5 (MD5) and the
command. If NTP is enabled globally, disable it on all interfaces on which it is not needed.
Source routing—Source routing is provided only for debugging purposes, and should be disabled in all other cases. Otherwise, packets may avoid some of the access control mechanisms of the switch.
Per-Interface Services Disabled by AutoSecure
ICMP redirects—Disabled on all interfaces. Does not add a useful functionality to a correctly configured network, but could be used by attackers to exploit security holes.
ICMP unreachables—Disabled on all interfaces. Internet Control Management Protocol (ICMP) unreachables are a known method for some ICMP-based denial of service (DoS) attacks.
ICMP mask reply messages—Disabled on all interfaces. ICMP mask reply messages can give an attacker the subnet mask for a particular subnetwork in the internetwork.
Proxy-arp—Disabled on all interfaces. Proxy-arp requests are a known method for DoS attacks because the available bandwidth and resources of the switch can be consumed in an attempt to respond to the repeated requests sent by an attacker.
Directed broadcast—Disabled on all interfaces. Potential cause of SMURF attacks for DoS.
Maintenance Operations Protocol (MOP) service—Disabled on all interfaces.
Global Services Enabled by AutoSecure
command—Prevents passwords from being visible in the configuration.
commands—Ensures that abnormally terminated TCP sessions are removed.
Switch Access Secured by AutoSecure
Caution If your device is managed by an NM application, securing access to the switch could turn off vital services and may disrupt the NM application support.
If a text banner does not exist, you 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@example.com +1 408 5551212 for help.
The login and password (preferably a secret password, if supported) are configured on the console, AUX, vty, and tty lines. The
are also configured on all of these lines. (Telnet and secure shell (SSH) are the only valid transport methods.) The
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 switch. The
options for the
command are configured to a minimum number. (Telnet and FTP are not affected by this operation and remain operational.)
If the user specifies that the switch 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 switch.
– In noninteractive 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 using SNMP.
If authentication, authorization, and accounting (AAA) is not configured, AutoSecure configures local AAA. AutoSecure will prompt the user to configure a local username and password on the switch.
Logging Options Enabled by AutoSecure
Sequence numbers and time stamps for all debug and log messages. This option is useful when auditing logging messages.
Logging messages for login-related events. For example, the message “Blocking Period when Login Attack Detected” will be displayed when a login attack is detected and the switch enters quiet mode. (Quiet mode means that the switch will not allow any login attempts using Telnet, HTTP, or SSH.)
logging console critical
command, which sends system logging (syslog) messages to all available TTY lines and limits messages based on severity.
command, which copies logging messages to an internal buffer and limits messages logged to the buffer based on severity.
logging trap debugging
command, which allows all commands with a severity higher than debugging to be sent to the logging server.
Forwarding Plane Security Enabled by AutoSecure
Strict Unicast Reverse Path Forwarding (uRPF) can be configured 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.
Hardware rate limiting—AutoSecure will enable hardware rate-limiting of the following types of traffic without prompting the user:
– IP errors
– RPF failures
– ICMP no-route messages
– ICMP acl-drop messages
– IPv4 multicast FIB miss messages
– IPv4 multicast partially switch flow messages
AutoSecure will provide the option for hardware rate-limiting of the following types of traffic:
– ICMP redirects
– TTL failures
– MTU failures
– IP unicast options
– IP multicast options
– Ingress and egress ACL bridged packets
Note Rate-limiting of ingress and egress ACL bridged packets can interfere with ACL logging and can increase session setup rates for hardware accelerated features such as TCP intercept, NAT, and Layer 3 WCCP.
command guides you through a semi-interactive session (also known as the AutoSecure session) to secure the management and forwarding planes. You can use this command to secure just the management plane or the forwarding plane; if neither option is selected in the command line, you can choose to configure one or both planes during the session.
This command also allows you to go through all noninteractive configuration portions of the session before the interactive portions. The noninteractive portions of the session can be enabled by selecting the optional
At any prompt you may enter a question mark (?) for help or Ctrl-C to abort the session.
In interactive mode, you will be asked at the end of the session whether to commit the generated configuration to the running configuration of the switch. In noninteractive mode, the changes will be automatically applied to the running configuration.
Note There is no undo command for configuration changes made by AutoSecure. You should always save the running configuration before executing the auto secure command.
To execute the AutoSecure configuration process, beginning in privileged EXEC mode, perform this task:
Executes the AutoSecure session for configuring one or both planes of the switch.
—Only the management plane will be secured.
—Only the forwarding plane will be secured.
—The user will not be prompted for any interactive configurations.
—The user will be prompted for all interactive questions. This is the default.
Configures the number of allowable unsuccessful login attempts.
—Number of allowable unsuccessful login attempts. The range is 1 to 1024.
—Syslog authentication failures if the number of failures in one minute exceeds the threshold.
The following example shows how to configure the switch for a minimum password length of 10 characters and a threshold of 3 password failures in one minute. The example also shows how to set a hidden local password.