Seguridad y Redes

Tips, Video Tutoriales, Wifislax, VMware, Linux, GNS3, Eve-NG, CCNA, Cisco Routers, Switches

Password Recovery en un Switch Cisco

By 10:14 , ,

Para realizar esto debemos de tener acceso físico al dispositivo cisco. Lo primero que haremos es conectar nuestro equipo al puerto de consola del Switch, después desconectamos el cable de alimentación de Switch.

En el siguiente paso lo que haremos es volver a conectar el cable de alimentación del Switch y enseguida mantendremos pulsado el botón MODE durante al menos dos segundos en la parte frontal del Switch

Dejamos de pulsar el boton MODE y el LED SYST se encontrara parpadeando en color verde. Aqui el proceso de inicializacion se ha interrumpido.
User Access Verification
Password:

C2950 Boot Loader (C2950-HBOOT-M) Version 12.1(11r)EA1, RELEASE SOFTWARE (fc1)
Compiled Mon 22-Jul-02 18:57 by antonino
WS-C2950-12 starting...
Base ethernet MAC Address: 00:09:e8:c7:63:40
Xmodem file system is available.

The system has been interrupted prior to initializing the
flash filesystem.  The following commands will initialize
the flash filesystem, and finish loading the operating
system software:

flash_init
load_helper
boot

switch:
Ahora lo que haremos es teclear los siguientes comandos para iniciar el sistema de archivos flash.
switch: flash_init
Initializing Flash...
flashfs[0]: 17 files, 2 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 7741440
flashfs[0]: Bytes used: 5397504
flashfs[0]: Bytes available: 2343936
flashfs[0]: flashfs fsck took 8 seconds.
...done initializing flash.
Boot Sector Filesystem (bs:) installed, fsid: 3
Parameter Block Filesystem (pb:) installed, fsid: 4
En el paso siguiente escribimos el comando load_helper y el comando dir flash: para mostrar el contenido de la memoria flash.
switch: load_helper
switch: dir flash:
Directory of flash:/

2    -rwx  3721946                  c2950-i6k2l2q4-mz.121-22.EA13.bin
3    -rwx  736                      vlan.dat
4    -rwx  108                      info
5    -rwx  986                      config.text
6    -rwx  24                       private-config.text
7    drwx  640                      html
18   -rwx  108                      info.ver
19   -rwx  314                      env_vars

2343936 bytes available (5397504 bytes used)
Ahora cambiamos el nombre del archivo de configuracion, este archivo contiene la contraseña.
switch: rename flash:config.text flash:config.old
Tecleamos el comando boot para iniciar el Switch.
switch: boot

Loading "flash:c2950-i6k2l2q4-mz.121-22.EA13.bin"...#####################################################################################################################################################################################################################################

File "flash:c2950-i6k2l2q4-mz.121-22.EA13.bin" uncompressed and installed, entry point: 0x80010000
executing...

         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 Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6K2L2Q4-M), Version 12.1(22)EA13, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2009 by cisco Systems, Inc.
Compiled Fri 27-Feb-09 22:20 by amvarma
Image text-base: 0x80010000, data-base: 0x80680000

Initializing flashfs...
flashfs[1]: 17 files, 2 directories
flashfs[1]: 0 orphaned files, 0 orphaned directories
flashfs[1]: Total bytes: 7741440
flashfs[1]: Bytes used: 5397504
flashfs[1]: Bytes available: 2343936
flashfs[1]: flashfs fsck took 8 seconds.
flashfs[1]: Initialization complete.
Done initializing flashfs.
POST: System Board Test : Passed
POST: Ethernet Controller Test : Passed
ASIC Initialization Passed

POST: FRONT-END LOOPBACK TEST : Passed
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:
https://www.cisco.com/wwl/export/crypto/tool/stqrg.html

If you require further assistance please contact us by sending email to
export@cisco.com.

cisco WS-C2950-12 (RC32300) processor (revision E0) with 19912K bytes of memory.
Processor board ID FHK0625X0BJ
Last reset from system-reset
Running Standard Image
12 FastEthernet/IEEE 802.3 interface(s)

32K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address: 00:09:E8:C7:63:40
Motherboard assembly number: 73-5782-10
Power supply part number: 34-0965-01
Motherboard serial number: FOC06240ADH
Power supply serial number: PHI062103UU
Model revision number: E0
Motherboard revision number: B0
Model number: WS-C2950-12
System serial number: FHK0625X0BJ

    --- System Configuration Dialog ---
En este paso nos iniciara la configuracion de dialogo, introducimos N o no para saltar el paso.
Would you like to enter the initial configuration dialog? [yes/no]: no
Press RETURN to get started!
Ingresamos al modo privilegiado.
Switch>enable
Ahora cambiamos el nombre del archivo de configuracion a su nombre original.
Switch#rename flash:config.old flash:config.text
Destination filename [config.text]?
Copiamos el archivo de configuracion a la memoria.
Switch#copy flash:config.text system:running-config
Destination filename [running-config]?
986 bytes copied in 0.764 secs (1291 bytes/sec)
Entramos al modo de configuracion global y cambiamos las contraseñas.
Switch2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch2(config)#enable s
Switch2(config)#enable secret cisco   
Switch2(config)#line con 0
Switch2(config-line)#password cisco
Switch2(config-line)#exit
Switch2(config)#exit
Switch2#
Al final guardamos la configuracion en el startup-config.
Switch2#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]

You Might Also Like

0 comentarios