Cisco Router Password Recovery
Cisco Router의 Password를 잊어 먹으셨다고요...
그럼 알아내야지요. Cisco Router에서는 Password를 복구하는 방법이 Router 종류에 따라서 조금씩 다르다. 먼저 부팅중 ctrl-Break를 눌러서 >가 떨어지는 것이있고 rommon>으로 떨어지는 것이있다. 물론 복구하는 것은 비슷하지만 약간의 차이가 있다.
> 로 떨어지는 것:
2000series, 2500series, 3000series, 400ries0series, 7000se
rommon> 로 떨어지는 것
1003, 1600series, 3600series, 4500series, 7200series, 7500series, AS5200 and AS5300 platforms
먼저 복구하는 순서는 다음과 같다.(여기서는 >로 떨어지는 것을 예로 다루겠습니다.)
1. Terminal & PC를 이용하여 Router console port에 접속을 한다.
2. Router를 booting(Power off -->on)을 시키고, 이때 break(or ctrl-Break) key를 누른다.
3. diagmode로 떨어진다.(>)
4. 여기서 enable password를 skip할 수 있는 config register value를 넣어준다. (> o/r 0x42 or 0x41)
5. 부팅을 시킨다. (> i)
6. Router>가 떨어지면 en을 주면 password없이 privileges mode로 넘어간다.
7. show config 로 password를 확인하거나 원하는 enable password로 바꿔준다. 물론 여기서는 secret password는 encryption되어있기 때문에 암호화되어 보이질 않는다. 물론 이것 때문에 영향을 받는다면 바꿔주어야 한다.
만약 encryption되어 있는 암호를 바꿔주고 싶다면, 약간의 조심스러운 작업이 필요하다. 현재의 상태는 NVRAM상의 config를 적용시키지 않고 booting된 상태이므로 Router를 움직이는 running-config상의 아무 내용도 없는 상태이다.
1. 먼저 startup-config를 running-config로 적용시킨다. (copy start running) 원하는 password를 바꿔주고 저장한다.
2. Configure를 copy(notepad)상으로 받고 Router를 초기화(> o/r -> > I/r, Router# erase start)시킨다음 부팅한다. 그런 다음 copy 받은 configure를 encryption 부분만 지우고 tftp로 넣어준다. 부팅을 시킨다음 원하는 password를 넣어주면 된다.
8. 부팅을 시킨다.
9. 다시 break key를 눌러 diagmode로 들어간다.
10 . 다시 원래의 config-register 값을 넣어 주고 부팅을 시킨다.
다음은 이것의 cisco 2501을 이용하여 예제를 만든 것이다. 참고가 되길.....
%SYS-5-RELOAD: Reload requested System Bootstrap, Version 5.2(8a), RELEASE SOFTWARE Copyright (c) 1986-1995 by cisco Systems 2500 processor with 2048 Kbytes of main memory
Abort at 0x10205A6 (PC) <--ctrl-break > o/r0x142 (or o/r0x42) > i <-- booting
부팅중 나오는 메시지 생략
Would you like to enter the initial configuration dialog? [yes]: no Press RETURN to get started! Router>enable <--여기서는 password없이 넘어감 Router# Router#sh config Using 466 out of 32762 bytes ! version 10.2 service tcp-small-servers ! hostname Router ! enable secret 5 $1$bSYh$oaLy2N7xy1WnajhYTELZj1 enable password abcd ! ! interface Ethernet0 ip address 203.248.27.1 255.255.255.0 no ip route-cache no mop enabled ! interface Serial0 ip address 203.248.28.1 255.255.255.0 no ip route-cache ! interface Serial1 ip address 203.248.29.1 255.255.255.0 no ip route-cache ! ! line con 0 line aux 0 transport input all line vty 0 4 password 1234 login ! end Router# Router#copy start running Enter configuration commands, one per line. End with CNTL/Z. Router(config)# Rotuer(config)#enable password 1234abcd <--원하는 password가 있을때 Router(config)#ctrl-z Router(config)#enable secret 0 passwd <--secret password를 바꿀때 Router#write memory Router# Router#reload Proceed with reload? [confirm?] %SYS-5-RELOAD: Reload requested System Bootstrap, Version 5.2(8a), RELEASE SOFTWARE Copyright (c) 1986-1995 by cisco Systems 2500 processor with 2048 Kbytes of main memory
Abort at 0x102018E (PC) <--ctrl-break > o/r0x2102 <--원래의 register 값 >i
|
|
|