Password Recovery – Cisco IOS Routers
In this post I want to cover how to recover passwords on a Cisco IOS Router. This is helpful in lab environments as well as production environments. Although this method can be used the correct "legal" way you can also use this method to break into these devices "illegally" if you have physical console access to the device. However to get into it physical power must be turned off first causing a disruption in the environment, let get started!
So I have a router called R2-D2 at ACME Corp, I have been given permission to recover the password and access the device. I have tried some passwords that where written down but all failed.
R2-D2 con0 is now available
Press RETURN to get started.
************************************************************************
* LEGAL NOTICE *
************************************************************************
* *
* You must have explicit permission to access or configure this device.*
* All activities performed on this device are logged, and violations *
* of this policy may result in criminal prosecution. *
* *
* This system is for the use of authorized users only. Individuals *
* using this computer system without authority, or in excess of their *
* authority, are subject to having all of their activities monitored *
* and recorded by system personnel. *
* *
* Anyone using this system expressly consents to such monitoring and *
* is advised that if such monitoring reveals possible evidence of *
* criminal activity, system personnel may provide the evidence to law *
* enforcement officials. *
************************************************************************
User Access Verification
Username: admin
Password:
% Login invalid
Username: admin
Password:
% Login invalid
System Bootstrap, Version 12.4(13r)T, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 2006 by Cisco Systems, Inc.
Initializing memory for ECC...
c2811 platform with 262144 Kbytes of main memory
Main memory is configured to 64-bit mode with ECC enabled
Upgrade ROMMON initialized
PC = 0xbfcd0d54, Cause = 0x2000, Status Reg = 0x3040a803
rommon 1 > confreg 0x2142
!! Comment: Setting configuration register to 0x2142 to bypass the startup configuration.
You must reset or power cycle for new config to take effect
rommon 2 >
DRAM configuration is 64 bits wide with parity enabled.
239K bytes of non-volatile configuration memory.
125440K bytes of ATA CompactFlash (Read/Write)
--- System Configuration Dialog ---
Would you like to enter the initial configuration dialog? [yes/no]: no
Press RETURN to get started!
--- Output Omitted ---
Router#copy startup-config running-config
Destination filename [running-config]?
2341 bytes copied in 0.288 secs (8128 bytes/sec)
R2-D2#
R2-D2(config)#username admin password $%^cisco
R2-D2(config)#enable secret !!@@cisco
I hope this information was helpful some may ask what do those config-resister values do? Well there is some documention on Cisco's website and it goes over the Use of the Configuration Register on All Cisco Routers and if you have other questions comment below!
Related articles
- Basic Cisco ASA Overview (ryansrealm.com/ciscoskills)
- Upgrade ASA IOS via ASDM (ryansrealm.com/ciscoskills)
- CCNA Security - 640-554 (ryansrealm.com/ciscoskills)
- Basics of cisco switch administration (slideshare.net)