Password detection over backup file .bin - Hex editor/code ?

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Author Message
Sanch3z
DD-WRT Novice


Joined: 13 Jul 2017
Posts: 23

PostPosted: Sun Apr 22, 2018 13:28    Post subject: Password detection over backup file .bin - Hex editor/code ? Reply with quote
Hello,

can I find or change my password using the created "nvram.bin" backup using a hex editor?

I forgot the password, but I have a backup file.

If so, how...example: edit the backup in hex editor and change the password to 00 00 ... or?
Sponsor
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6870
Location: Romerike, Norway

PostPosted: Sun Apr 22, 2018 21:03    Post subject: Reply with quote
No, it's encrypted.

http_passwd=$1$PQG4vqWH$oA52Xl89NbuhoJPotreut0
http_username=$1$PQG4vqWH$EzOf9Gz42tHyJxklRUyZp/


Do you have SSL/Telnet access to the router?


nvram set http_username=""

The GUI will ask you to set a new usrname/password as you did the first time.

You may have to reset the router. Enable SSL or telnet.
Telnet/SSL into the router.

Restore your backup.

From the SSL prompt reset username.
Sanch3z
DD-WRT Novice


Joined: 13 Jul 2017
Posts: 23

PostPosted: Tue Apr 24, 2018 13:11    Post subject: telnet access Reply with quote
Ok,
I reset the router then
login into router via telnet
restore backup via webui

When restore the settings, the router restarted and logged out automatically over the telnet.

If I want to log in again over telnet, it wants my lost password for me.
Sanch3z
DD-WRT Novice


Joined: 13 Jul 2017
Posts: 23

PostPosted: Tue Apr 24, 2018 13:55    Post subject: startup script Reply with quote
And what about this:

Using an DD-WRT startup script to reset the UI password. The DD-WRT scripts will be run when the router boots, but will not be wiped out when you restore your backup. This way, you can get onto the router, configure the script to reset your password, then restore your backup and reboot. Upon first boot, it should reset your password for you (may need another reboot).

First reset router to default
Login and setup/save startup script to reset username/passw
Load backup and restore router (after restore, router automatically reboot)

Is it possible ?
Wildlion
DD-WRT Guru


Joined: 24 May 2016
Posts: 1416

PostPosted: Tue Apr 24, 2018 23:01    Post subject: Reply with quote
Is there any reason that you can not just apply all the settings by hand again?

The restore will wipe out those commands.

What you can do at your own risk is:

1. reset to factory defaults
2. On reboot:
Keep the username the same as what is in your bak file
change the password to something that you know
3. do a nvram backup
4. Open each file and copy the text (between the the special characters) for http_passwd"^@(text_to_copy)^L from the new bakup file to the old one
5. Upload this modified file
Sanch3z
DD-WRT Novice


Joined: 13 Jul 2017
Posts: 23

PostPosted: Wed Apr 25, 2018 8:46    Post subject: thanks Reply with quote
Thank you so much. SOLVED Very Happy
Wildlion
DD-WRT Guru


Joined: 24 May 2016
Posts: 1416

PostPosted: Fri Apr 27, 2018 0:49    Post subject: Reply with quote
You are welcome Smile Glad to have helped
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum