loading...
مرجع آموزش برنامه نویسی و شبکه
پیام صادقپور بازدید : 224 جمعه 05 اردیبهشت 1393 نظرات (0)

 

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#ena

Router(config)#enable pass

Router(config)#enable password cisco

Ciscoهمون رمز عبوری هست که ما وارد کردیم .

خب حالا یه دستور show running-config  میزنیم به خروجی اون خوب توجه کنید:

Router(config)#do show run

Building configuration...

 

Current configuration : 513 bytes

!

version 12.4

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname Router

!

!

!

enable password cisco

!

!

!

حالا کلید های ctrl+zرا می زنیم و به مد privilegeمیریم و بعد دستور exitتا به مد user بریم

الان دستور enable  رو میزنیم .

میبینید که از ما پسورد میخواد. پسورد رو وارد کنید (cisco) تا وارد مد privilegeبشید.

میبینید که پسوردی رو که ما وارد کردیم به همون صورت نمایش داده میشه .(در show running-config)

 

شما می تونید به دستور service password-encryptionاون رو رمز نگاری کنید .

همین حالا این دستور رو میزنیم و یه show runnمیگیریم.

Router(config)# service password-encryption

Router(config)#do show run

Building configuration...

 

Current configuration : 519 bytes

!

version 12.4

no service timestamps log datetime msec

no service timestamps debug datetime msec

service password-encryption

!

hostname Router

!

!

!

enable password 7 0822455D0A16

می بینید که کلمه ciscoتبدیل شد به 7 0822455D0A16  که این را هم می توان decryptکرد.

برای این کار به آدرس زیر بروید و همین عبارت را وارد کنید و روی submitکلیک کنید .

http://www.ibeast.com/content/tools/CiscoPassword/

میبینید که عبارت your password is ciscoرا نشان میدهد.

خب تا اینجا با enable password  و service password-encryption  آشنا شدیم و دیدیم که قابل اعتماد نیست.حالا میریم سراغ enable secret:

 

Router(config)#enable secret 20learn

بعد show runn

Router(config)#do show runn

Building configuration...

 

Current configuration : 566 bytes

!

version 12.4

no service timestamps log datetime msec

no service timestamps debug datetime msec

service password-encryption

!

hostname Router

!

!

!

enable secret 5 $1$mERr$HlG5P8bCDNnYXixZ4OB/d0

enable password 7 0822455D0A16

تفاوتی که بین ای ن دو هستش اینه که enable passwordبا 7 شروع میشه و پسورد رو encrypting

میکنه اما  enable secretبا 5 شروع میشه و پسورد رو hashمیکنه.

تفاوت Hashing و Encryption :

تفاوت Hashing و Encryption در اين است كه اطلاعاتي را كه Encrypt مي كنيد ، مي خواهيد رمزنگاري شود و در مسير قابل خواندن نباشد ؛ در عوض در مقصد با كليدي كه دارد (Secret Key) ، بتوان آن را باز كرد و خواند.

اما Hashing فقط براي اطمينان از اين مطلب است كه اطلاعات در طول مسير دست نخورده باقي بماند (Integrity) . در Encryption طول داده ورودي با داده رمز نگاري شده مطابق است . به عنوان مثال اگر يك كتاب را به الگوريتم رمز نگاري بدهيد در قبال آن يك كتاب رمزنگاري شده دريافت مي كنيد. اما درHashing سايز خروجي هميشه يكسان است زيرا قرار نيست از اطلاعات Hash شده به اصل داده دسترسي پيدا شود . به عنوان مثال چه يك كتاب به الگوريتم Hash بدهيد و چه يك جمله ، خروجي رمزنگاري شده در هر دو حالت سايز يكساني (مثلا يك جمله) خواهد داشت.

منبع:http://blog.kahkeshan.com

البته اگه شانس بیارین می تونید در سایت زیر هم یه تست بزنید شاید به نتیجه رسیدید:

http://www.md5decrypter.com/

این رو هم در نظر داشته باشید که اگر اول enable password رو فعال کردید و بعد enable secret

Enalble secret  اولویت دارد.

حالا در نظر بگیرید که ما پسورد روتر رو فراموش کردیم .باید  چه کاری انجام بدهیم.

برای این کار یک بار دکمه powerروتر را زده و در هنگام لود سیستم عامل کلیدهای ctrl+breakرا بزنید تا به مد Rommonبره بعد و دستورات زیر رو وارد کنید:

rommon 1 > confreg 0x2142

rommon 2 > boot

Router>en

Router#copy startup-config running-config

Router#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#enable secret 20learn

Router(config)#config-register 0x2102

تمام شد .به همین راحتی .

میتونید از فیلم زیر هم استفاده کنید:

How to password recover on cisco router

 

قبل از شروع به این نکته توجه کنید:

"One important difference between resetting the password on a Cisco switch vs. a router is that you don’t use configuration registers to reset the password on the switch."

خب به شکل زیر عمل میکنیم:

 

Once you are connected and see something on the terminal window when you press enter,unplug the power cable. Next, hold down the mode button on the front, as seen in the photo below, and connect the power cable.

خب به شکل زیر عمل میکنیم.

Once you are connected and see something on the terminal window when you press enter,unplug the power cable. Next, hold down the mode button on the front, as seen in the photo below, and connect the power cable.

On a 2900, 3500XL or 3550 (like the one shown) release the mode button after the 1x port LED goes out. On a 2940 or 2950 switch release the mode button after the stat light goes out. On a 2955, press the break key (ctrl-break on Windows) when you see the message that the switch will autoboot.

You should now see something like this (taken from a 3550 switch):

Notice that it says that the password-recovery mechanism is enabled.

At the switch: prompt, type flash_init and press enter. You should see something like this (at least on a 3550):

 

 

Now type load_helper and press enter. You should see something like this:

 

Now type dir flash: and press enter. You should see something like this:

The config.text file is what stores the administrative password that is keeping you from logging into the router. To get rid of this file, use this command:

rename flash:config.text flash:config.backup

Next, boot the switch using the boot command, like this:

Once the system is booted, you will be asked if you want to enter the initial configuration dialog. Say no and press enter.

Next, enter enable mode with the en or enable command. Then, type the following commands:

rename flash:config.backup config.text

copy flash:config.text system:running-config

 

After each command, you will be prompted to confirm the name of the destination file. Do this by pressing enter each time.

Go into global configuration mode by typing config terminal. Next type no enable secret.

Now you can reset your enable password to whatever password you want. In the example below, we used the enable password NetInsider to set the password to NetInsider.

 

Exit out of global configuration using the exit command and save your configuration with thecopy running-config startup-config command. You will be prompted to confirm the name of the destination file. Press enter.

You have successfully reconfigured your switch’s enable password using the password recovery procedure. Even better, you were able to do this while preserving the entire switch configuration.

 

مطالب مرتبط
ارسال نظر برای این مطلب

کد امنیتی رفرش
اطلاعات کاربری
  • فراموشی رمز عبور؟
  • آرشیو
    آمار سایت
  • کل مطالب : 35
  • کل نظرات : 0
  • افراد آنلاین : 2
  • تعداد اعضا : 9
  • آی پی امروز : 11
  • آی پی دیروز : 0
  • بازدید امروز : 13
  • باردید دیروز : 1
  • گوگل امروز : 0
  • گوگل دیروز : 0
  • بازدید هفته : 29
  • بازدید ماه : 21
  • بازدید سال : 410
  • بازدید کلی : 11,061