Bypass the password of privileged mode on a Cisco router

Here are the steps to follow when we have lost our Cisco router’s password.

 

  1. Restart the router
  2. While the router restarts, we must go in console mode
  3. Modification of the redister value of the config from 0x2102 to 0x2142
    This bypass the startup config file
  4. Reset
  5. the router restart and doesn’t use the startup-config
  6. Refuse the configuration assistant
  7. R>
    the router seems empty of all configuration, the running-config is empty.
    We go on privileged mode and we enable the startup config.
  8. We do R# copy startup-config running-config
  9. We modify the password
  10. We modify the register value to it original value 0x2102.

 

Router>enable
Router#enable secret sdfofmgmjgfjmlgf
^
% Invalid input detected at ‘^’ marker.Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#enable secret sofsmlsf5
Router(config)#host TOKYO
TOKYO(config)#exit
TOKYO#
*Mar 27 12:56:17.807: %SYS-5-CONFIG_I: Configured from console by console
TOKYO#copy runn
TOKYO#copy running-config star
TOKYO#copy running-config startup-config
Destination filename [startup-config]?
Building configuration…
[OK]
TOKYO#

 

We reload the router

 

program load complete, entry point: 0x8000f000, size: 0x1223454
Self decompressing the image : ############################################################[OK]
PC = 0xbfcd0d54, Cause = 0x2000, Status Reg = 0x3040a803monitor: command “boot” aborted due to user interrupt
rommon 1 > confreg 0x2142
rommon 1 > Reset

 

We reload the router, this one will boot without configuration

 

Router>enable
Router#conf t
Router#copy startup-config runn
Router#copy startup-config running-config
Destination filename [running-config]?746 bytes copied in 0.320 secs (2331 bytes/sec)
TOKYO#conf t
Enter configuration commands, one per line. End with CNTL/Z.
TOKYO(config)#enable secret azerty
TOKYO(config)#config-register 0x2102
TOKYO(config)#do write
Building configuration…
[OK]
TOKYO(config)#

 

Leave a Reply

Your email address will not be published. Required fields are marked *