使用者實際環境中的一台思科4506交換機無法登入,由于維護人員也不記得修改後的密碼,隻能對系統進行破解。
環境:
Cisco Catalyst 4506E交換機,引擎為WS-X45-SUP8-E,系統版本是cat4500es8-UNIVERSAL-M
破解步驟:
重新開機交換機,按ctrl+c中止交換機的啟動過程,如下所示:
Verifying FPGA (P) Signature ...................... PASSED
Verifying ROMMON (P) Signature ......... PASSED
************************************************************
* *
* Rom Monitor *
* Copyright (c) 2012-2013 by Cisco Systems, Inc. *
* All rights reserved. *
Rom Monitor (P) Version 15.1(1r)SG1
Compiled Wed 14-Aug-13 17:15 [RLS]
System : WS-X45-SUP8-E Slot [1]
Chassis : WS-C4506*E Mod [3][6]
Revision : CPU 2.1 BOARD 4.0 FPGA 3.15F2.9155
Memory : 4096 MB
Date : Sun Mar 05 21:32:01 2017
Type Control-C to prevent autobooting....
[CTRL-C]
Autoboot cancelled.........!!!
rommon 0 >
通過set指令檢視系統目前的環境變量如下所示:
rommon 0 >set
PS1=rommon ! >
Fa1Enable=1
RommonVer=15.1(1r)SG1
ConfigReg=0x2101
BOOT=bootflash:cat4500es8-universal.SPA.03.03.00.XO.151-1.XO.bin,1;
DiagMonitorAction=Normal
RET_2_RTS=14:59:24 GMT Sat Aug 27 2016
RET_2_RCALTS=
BootedFileName=flash1:/USER/cat4500es8-universal.SPA.03.03.00.XO.151-1.XO.bin
ConsecPostPassedCnt=34
注意寄存器值是0x2101
使用confreg指令對系統進行配置,如下所示:
rommon 1 >confreg
Configuration Summary :
=> load rom after netboot fails
=> console baud: 9600
=> autoboot from: the first file from internal flash device
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]:
disable "load rom after netboot fails"? y/n [n]:
enable "use all zero broadcast"? y/n [n]:
enable "break/abort has effect"? y/n [n]:
enable "ignore system config info"? y/n [n]: y
change console baud rate? y/n [n]:
change the boot characteristics? y/n [n]:
=> ignore system config info
do you wish to save this configuration? y/n [n]: y
You must reset or power cycle for new configuration to take effect
其它選項可以直接回車,配置完之後提示必須重新開機才能生效,不過重新開機前可以用set指令再次檢視一下環境變量,如下所示:
rommon 2 >set
PS1=rommon ! >
Fa1Enable=1
RommonVer=15.1(1r)SG1
BOOT=bootflash:cat4500es8-universal.SPA.03.03.00.XO.151-1.XO.bin,1;
DiagMonitorAction=Normal
RET_2_RTS=14:59:24 GMT Sat Aug 27 2016
RET_2_RCALTS=
BootedFileName=flash1:/USER/cat4500es8-universal.SPA.03.03.00.XO.151
-1.XO.bin
ConsecPostPassedCnt=34
ConfigReg=0x2141
此時會發現前後寄存器的值已經發生了變化,可以通過boot指令重新開機系統
重新開機後:
Press RETURN to get started!
Switch>
此時可以看到系統繞過了配置檔案,後面我們可以通過
switch#copy startup-config running-config
将配置加載到系統中,然後通過指令直接修改密碼即可,當然在完成後我們必須修改寄存器值
config-register 0x2101
重新啟動系統,會發現密碼已經破解完成。
*************************************************************************
其實sup8引擎的密碼破解與其它系列引擎的密碼破解方法相似,可以參照官方的文檔進行檢視,但是如果是兩台系統做的VSS,那麼密碼破解過程就會有些不同,不過官方也給出了相應的文檔,具體請查閱。
本文轉自 彎月樓主 51CTO部落格,原文連結:http://blog.51cto.com/05wylz/1904156,如需轉載請自行聯系原作者