路由器型号不同,破解也不同:
大体的方法一致:
进入监控模式:1.加电60秒内ctrl+break 2,寄存器的值为0X0开头,直接进入监控模式
修改寄存器的值为0x2142,直接加载IOS,不加载配置文件。
总结步骤:
1.重启 ctrl +break
2.confreg 0x2142 修改寄存器值为0x2142
reset 重启
3.copy startup-config running-config 把开机拷贝到运行信息中
4.enable password 123 设置密码
5.Router(config)#config-register 0x2102 还原寄存的值
6.copy run start =write
试验步骤如下图:
Self decompressing the image :
######
monitor: command "boot" aborted due to user interrupt
rommon 1 > confreg 0x2142
rommon 2 > reset
System Bootstrap, Version 12.1(3r)T2, RELEASE SOFTWARE (fc1)
Copyright (c) 2000 by cisco Systems, Inc.
cisco 2811 (MPC860) processor (revision 0x200) with 60416K/5120K bytes of memory
Self decompressing the image :
########################################################################## [OK]
Restricted Rights Legend
Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.
cisco Systems, Inc.
170 West Tasman Drive
San Jose, California 95134-1706
Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M), Version 12.4(15)T1, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2007 by Cisco Systems, Inc.
Compiled Wed 18-Jul-07 06:21 by pt_rel_team
Image text-base: 0x400A925C, data-base: 0x4372CE20
This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to
cisco 2811 (MPC860) processor (revision 0x200) with 60416K/5120K bytes of memory
Processor board ID JAD05190MTZ (4292891495)
M860 processor: part number 0, mask 49
2 FastEthernet/IEEE 802.3 interface(s)
239K bytes of non-volatile configuration memory.
62720K bytes of ATA CompactFlash (Read/Write)
Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M), Version 12.4(15)T1, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2007 by Cisco Systems, Inc.
Compiled Wed 18-Jul-07 06:21 by pt_rel_team
--- System Configuration Dialog ---
Continue with configuration dialog? [yes/no]:no
Router>enable
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#enable password 123
Router(config)#config-register 0x2102
Router(config)#exit
Router#write
Building configuration...
[OK]
Router#
破解之后根据如下密码策略进行密码的设置:
创建cisco的路由器口令,应该注意一下几点:
1.口令长度1-25字符;数字,字母,字符
2.口令的首写字母不能是数字
3.口令中的空格将被忽略,
4.基于安全策略定期更改口令
为了防止字典攻击,cisco建议使用强口令策略
1.最少10个字符
2.混合大小写字母
3.字母,数字,字符混合
4.不使用用户名或者单词
5.不使用字典单词
6.随机生成口令
密码设置的时候也可以按用户设定一定权限。
参考配置如下:这些是我做的基本账户安全试验。
Router(config)#security authentication failure rate 2 log 设置尝试登陆次数
Router(config)#security password min-length 8 设置密码长度
Router(config)#enable password 123
% Password too short - must be at least 8 characters. Password configuration failed 提示密码设置太短
Router(config)#enable password 12345678 设置简单的密码
Router(config)#no enable password 去掉特权密码(由用户到特权的密码)
Router(config)#enable password 8@1#163.com 设置复杂度较高的密码
Router(config)#line vty 0 4
Router(config-line)#password 3$%#@hotmail
Router(config-line)#login
Router(config-line)#exit
Router(config)#line console 0
Router(config-line)#password 6^&*yaho.com
Router(config-line)#exit
Router(config)#line aux 0
Router(config)#line aux 0
Router(config-line)#modem inOut
Router(config-line)#speed 9600
Router(config-line)#transport input all
Router(config-line)#flowcontrol hardware
Router(config-line)#password 79()$123ghs
Router(config-line)#login
Router(config-line)#exit
Router(config)#service password-encryption 密码描述
除了enable secret口令外,其他所有路由器默认是明文保存在路由器配置上的,使用show running-config 能看到这些口令,使用TFTP在一个不可信的网络连接中传输配置文件,sniffer也能得到这些口令。
Service passwor-encryption 可以加密路由器配置文件的口令。基于vigenere算法,配置文件中用数字7来表示,cisco的专用算法。没MD5安全,单会减慢用户口令跟被发现的过程。这个算法是一种简单的字符替换方法,最早源于16世纪。这种算法可以使用简单的脚本程序破解。可以放置通过屏幕和打印文件形式的偷看口令。
Router(config)#username jintian secret password 123 (对本地账户进行MD5加密)
service password-recovery 实现,对ROMMON的保护,放置本地路由器密码的破解
Router(config-line)#exec-timeout 3 设置控制台在无人或者状态为休止时超时时间为3分钟
设置特权级别:设备可以为管理员设置特定的级别,不同级别的具有不同的访问权限。0―15级,16个级别。
Level 0 :用户模式下,支持5个命令,disable,enable,exit,help,logout
Level1:用户模式下的命令
Level2-level14 可以用定制权限
Level15:配置和监控权利
1-14 就是监控权利
Router(config)#privilege exec level 2 ping 设定该级别下的命令关联
Router(config)#enable secret level 2 santian 设定该级别的密码
不过话说回来,从安全策略上讲,linux和cisco的设备不如微软的windows做的好,同类产品不如H3C、华为的产品好。个人感觉啊,至少cisco和linux在这些方面实现起来,不是很人性化。