1、Cisco ASA 的密码恢复过程很像路由器了,也是通过修改配置寄存器的值来实现。就不要密码恢复文件了。1,密码恢复准备东东A,PC 机B,ASA 配置线我们需要通过配置线把 PC 机的 COM 口与 ASA 的控制接口相连。2,密码恢复程序首先,我们打开 PC 机的超级终端,然后启动 ASA 后迅速按 ESC 或 CTRL+BREAK 键进入 Rommon 状态。You can press the Esc (Escape) key after “Use BREAK or ESC to interrupt boot“ is shown. This will take you into ROMM
2、ON mode, as follows:rommon #0然后我们打入命令 confreg,进行配置寄存器值的修改,有两种方法,一种是通过输入 ConfReg 命令一步一步回答菜单如下:rommon #1 confregCurrent Configuration Register: 0x00000011Configuration Summary:boot TFTP image, boot default image from Flash on netboot failureDo you wish to change this configuration? y/n n: y所有都按照默认回答,在
3、问“disable system configuration?“ 的时候, 选择 y.这里将 0X11 启动模式转变到 0X41 模式.第二种方法就是直接使用命令 ConfReg 0x41 修改配置寄存器的值。如下:rommon #1 confreg 0x41Update Config Register (0x41) in NVRAM.修改后,就可以重启rommon #2 boot启动成功进入 ASA 以后,enable 密码为空.ciscoasa enablePassword:ciscoasa# copy startup-config running-configciscoasa# conf
4、igure terminal设置新的密码ciscoasa(config)# password PIXPa55ciscoasa(config)# enable password PIXp455ciscoasa(config)# username BluShin password Goodp455修改会原来的配置寄存器的值ciscoasa(config)# config-register 0x11保存配置文件,切记,否则新密码无效ciscoasa(config)# copy running-config startup-config后记=有时候我们为了加强安全性,打入了 no service pa
5、ssword-recovery 命令。这时候进行密码恢复时,就不能通过修改配置寄存器的值来实现了,而只能删除所有文件来实现,当然删除的文件会包括配置文件和 OS 文件。ciscoasa(config)# no service password-recoveryWARNING: Saving “no service password-recovery“ in the startup-config will disable password recovery via the PIX Password Lockout Utility. The only means of recovering fro
6、m lost or forgotten passwords will be for the PIX Password Lockout Utility to erase all file systems including configuration files and images.You should make a backup of your configuration and have a mechanism to restore images from the Monitor Mode command line.提示两点:1、恢复的时候会清除所有配置2、需要保存配置文件,并有一种方式从
7、 Monitor Mode command line 得到恢复的 IMAGES密码恢复过程:建立物理 CONSOLE 连接,RELOAD(命令)设备press the Esc (Escape) key after “Use BREAK or ESC to interrupt boot“ is shown提示:a new image must be downloaded via ROMMON.Erase all file systems? y/n n: yesDisk1: is not present.Enabling password recovery.rommon #0rommon #0 A
8、DDRESS=192.168.10.1rommon #1 SERVER=192.168.10.250rommon #3 interface GigabitEthernet0/0GigabitEthernet0/0MAC Address: 000f.f775.4b54rommon #4 file asa702.binrommon #5 tftpdnldtftp sa702.bin192.168.10.250 !NoteThe security appliance downloads the system image file in memory and boots up the device.
9、However, the downloaded system image is not stored in flash.这里提示只在 MEMORY 而不保存到 FLASH 中。此时可以进入:ciscoasa enableciscoasa# copy tftp: running-configAddress or name of remote host ? 192.168.10.250Source filename ? CiscoASA.conf需要将以前保存的配置文件载入到设备中然后重设密码,并保存即可这里有两个安全提高:1、IMEGE 保存在 TFTP、备份文件也保存在另外的位置2、擦除了使用
10、的配置文件注意:如果 TFTP 不在同一网段,则:rommon #2 GATEWAY 192.168.10.100注意:TFTP 的参数是需要预先配置好的,为密码恢复做准备,示例如下:是在 rommon 中完成的Example 4-49. Setting Up TFTP Parametersrommon #0 ADDRESS 192.168.10.1rommon #1 SERVER 192.168.10.250rommon #2 interface GigabitEthernet0/0GigabitEthernet0/0MAC Address: 000f.f775.4b54rommon #3 file ASA702.binrommon #4 set 检查参数rommon #5 tftpdnld 开始下载tftp ASA702.bin192.168.10.250 !