Cisco密码恢复与破解

1.在路由器加电60S内,在超级终端按<ctrl>+<Break>3-5s ,可以进入rommon模式。提示符如下:rommon1>
2.rommon1>confreg 0x2142
3.rommon2>reset
4.router>en
Router#copy startup-config running-config

2.Cisco路由器用户名密码破解





那天用户名密码忘了,怎么也想不起来了,一直做系统,网络的设备都忘记了。然后网上找来一份。


以下是配置步骤(已经测试过了)


1、将路由器Console端口连接到PC机的串口(如COM1或COM2)上。


2、启动超级终端,把配置设为9600波特率。8个数据位、无奇偶校验、2个停止位。


3、 在“>” 提示符下,用Show Version命令查看登记码(一般为OX2102或Oxl02),记住此登记码在第9步要将此登记码还原。


4、查看登记码,如果中断屏蔽(即登记码的第4位为1),则重启路由器,并在开机后起30秒钟内按Ctrl+Break键;如果中断未屏蔽,则发送中断(Cisco公司提供的技术手册注明要在开机后60秒内按Berak键)。


5、根据路由器系列不同,分别进行如下配置:


*如路由器是2000、2500、3000、680×0 based 4000、7000系列,IOS版本为10.0以下或出现“>”提示符,则键入以下命令:


>o/r 0×42


> i


*如路由器是1003、1004、3600、4500、4700、72XX、75XX系列或出现“ROMMOM>”提示符则键入以下命令:


ROMMON>confreg 0×42


ROMMON>reset


6、当提示是否进入配置对话框时(Would you like to enter the initial confinguration dialong?[yes]:),回答"NO"(如误输入"YES",立刻按Cter+C键退出)。在出现"Press RETURN to get started!"提示时,按回车键,进入ROM模式"Router>"。


7、键入enable命令进入EXEC状态,键入Router#show config查看原路由器配置和未加密口念,建议此时立刻做一个文本备份文件,以免误操作将原路由器配置丢失;再键入ROUTER#configuration memory,将NVRM模式中的参数表装入内存。


8、键入Router#configure terminal 命令进行配置,从配置表中找出(或改写)忘记的有效口令;更改完毕后一定要写入NVRAM中(Router#write memory(copy runing-config startup-config)),否则会丢失路由器原配置,并且会使改写的口令无效。


9、将第3步查到的登记码还原,一般为0×2102(即从闪存正常启动,并屏蔽中断),并激活所有端口(系统会将所有端口自动关闭):


Router(config)#config-register 0×2102


Router(config)#interface ××


Router(config-if)#no shutdown


Router#Ctrl-Z


10、重新启动路由器:


Router#reload


 

 经过以上步骤,即可以在不丢失原有路由器配置的情况下找到或更改口令。
清除密码
简介:本文详
细描述了对于2900xl/3500xl/2950/3550系列交换机的enable密码恢复流程
一、将一台终端或装有超级终端软件的PC接到交换机的console口上。终端参数设置如下:
速率:9600bps
检较位:无
数据位:8
停止位:1
流控:无
二、拨掉电源
三、按住前面板的mode键不放,插上电源,等3-5秒后松开mode键。你会看到如下提示:
The system has been interrupted prior to initializing the flash file system.
The following commands will initialize the flash file system, and finish loading
the operating system software:
flash_init
load_helper
boot
四、输入flash_init
五、输入load _helper
六、输入dir flash:
注意,不要少了flash后面的冒号,屏幕出现如下提示。
Directory of flash:
2 -rwx 843947 Mar 01 1993 00:02:18 C2900XL-c3h2s-mz-12.1-WC5.bin
4 drwx 3776 Mar 01 1993 01:23:24 html
66 -rwx 130 Jan 01 1970 00:01:19 env_vars
68 -rwx 1296 Mar 01 1993 06:55:51 config.text
1728000 bytes total (456704 bytes free)
七、输入rename flash:config.text flash:config.old
八、输入boot引导系统。
九、当出现如下提示时,输入N:
Continue with the configuration dialog? [yes/no] : N
十、用en进入enable状态,并将文件config.old改回config.text,命令如下:
rename flash:config.old flash:config.text
十一、将原配置装入内存,命令如下:
2900# copy flash:config.text system:running-config
十二、修改密码:
2900xl#conf t
2900xl(config)#no enable secret
2900xl(config)#enable secret ultra
2900xl(config)#exit
十三、telnet到交换机上,验证密码是否修改成功
十四、将配置写入nvram
2900xl#wr mem
以上步骤中,第十一、十二步需要特别注意,前者是为了保留配置,后者需要注意的是如果不使用no enable secret的话,新密码将不起作用。
以上是转的路由/交换技术版的精华里的内容,它好象也是翻译的cisco的文档,不过在实际*作过程中我发现可以不用输load _helper,要是单纯的想清空密码和配置的话,输了
flash_init后直接敲del flash:config.text就好了






这是第二种方法,本人没有亲自试验,仅供参考:

一、将一台终端或装有超级终端软件的PC接到交换机的console口上。终端参数设置如下:
速率:9600bps
检较位:无
数据位:8
停止位:1
流控:无
二.接上电源线,打开电源开关
三.在路由器加电后的60秒内按中断键(ctrl+break或其他),使路由器进入ronmon模式
四.在rommon 1>后输入confreg 0x2142将寄存器值修改为2142,使路由器从flash启动但是忽略nvram里保存的配置
五.在rommon 2>后输入reset 命令重新启动
六.输入no或按ctrl+c跳

过初始化配置的过程
七.在router>后输入enable进入特权模式
如果仅仅想清楚密码和当前配置的话,输入erase star然后直接进入
就可以了
如果要保存
当前的配置文件并进行恢复密码则按以下步骤进行
八.输入show star,如果密码没有加密的话可以在直接看到未加密过的密码了
如果用了enable secret 命令加密过的话呢,则按照下面步骤进行
九.输入config terminal进入全局配置模式
十.在router<config>#后输入enable secret new_password将密码修改为新密码
十一.在router<config>#后输入config-terminal 0x2102将寄存器值修改为2102或其他你需要的值
十二.输入end退出配置模式
十三.使用copy run star 或 write memory 命令保存设置




rommon 1 > confreg


Configuration Summary
(Virtual Configuration Register: 0x2102)
enabled are:
load rom after netboot fails
console baud: 9600
boot: image specified by the boot system commands
or default to: cisco2-c2801

do you wish to change the configuration? y/n [n]: y
enable "diagnostic mode"? y/n [n]: n
enable "use net in IP bcast address"? y/n [n]: n
disable "load rom after netboot fails"? y/n [n]: n
enable "use all zero broadcast"? y/n [n]: n
enable "break/abort has effect"? y/n [n]: n
enable "ignore system config info"? y/n [n]: y
change console baud rate? y/n [n]: n
change the boot characteristics? y/n [n]: y
enter to boot:
0 = ROM Monitor
1 = the boot helper image
2-15 = boot system
[2]: 2


Configuration Summary
(Virtual Configuration Register: 0x2142)
enabled are:
load rom after netboot fails
ignore system config info
console baud: 9600
boot: image specified by the boot system commands
or default to: cisco2-c2801

do you wish to change the configuration? y/n [n]: n



7.27:

3550-24

The system has been interrupted, or encountered an error
during initializion of the flash filesystem. The following
commands will initialize the flash filesystem, and finish
loading the operating system software:

flash_init
boot

switch: flash_init
Initializing Flash...
flashfs[0]: 403 files, 6 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 15998976
flashfs[0]: Bytes used: 7778816
flashfs[0]: Bytes available: 8220160
flashfs[0]: flashfs fsck took 9 seconds.
...done Initializing Flash.
switch: load_helper
switch: dir flash:
Directory of flash:/

2 -rwx 348 <date> system_env_vars
3 -rwx 2072 <date> multiple-fs
4 -rwx 616 <date> vlan.dat
6 -rwx 2012 <date> private-config.text
87 drwx 128 <date> c3550-ipbasek9-mz.122-25.SEE2
7 -rwx 31854 <date>

config.text
8 -rwx 0 <date> env_vars

8220160 bytes available (7778816 bytes used)
switch: rename flash:config.text flash:https://www.360docs.net/doc/f711848891.html,
switch: boot







相关文档
最新文档