MikroTik Tutorial: How to recover RouterOS passwords from a backup file

MikroTik Tutorial: How to recover RouterOS passwords from a backup file

These steps will help you recover a forgotten password from an unencrypted RouterOS backup file. To complete these step we will use a python tool called RouterOS-Backup-Tools written by Lorenzo Santina (BigNerd95). I have included steps specific to Windows and Linux which vary slightly.

Jump to Steps for… Windows | Linux

Windows MikroTik Password Recovery

Install Python 3 and git from Windows

Open a git bash console and create a new directory

mkdir rostest
cd rostest

Clone the RouterOS-Backup-Tools repo

git clone https://github.com/BigNerd95/RouterOS-Backup-Tools.git

Create a virtualenv and install the dependency library

virtualenv ./venv
./venv/Scripts/activate.bat
pip install pycryptodome

Now we are ready to extract our .backup file and decode the passwords. Before beginning this step, copy your backup file into the rostest folder.

python RouterOS-Backup-Tools/ROSbackup.py unpack myrouter.backup -d myrouter

python RouterOS-Backup-Tools/extract_user.py myrouter/user.dat
************** Output ***************
User: admin
Pass:

User: admin
Pass:

User: admin
Pass: mysecretpassword

*************************************

Jump to Conclusion


Linux MikroTik Password Recovery

Make sure you have Python 3 installed.

python3 -V

Create a new folder and clone the RouterOS-Backup-Tools repo

mkdir rostest
cd rostest
git clone https://github.com/BigNerd95/RouterOS-Backup-Tools.git

Create a virtualenv and install the dependency library

virtualenv ./venv
source ./venv/Scripts/activate
pip install pycryptodome

Now we are ready to extract our .backup file and decode the passwords. Before beginning this step, copy your backup file into the rostest folder.

python RouterOS-Backup-Tools/ROSbackup.py unpack myrouter.backup -d myrouter

python RouterOS-Backup-Tools/extract_user.py myrouter/user.dat
************** Output ***************
User: admin
Pass:

User: admin
Pass:

User: admin
Pass: mysecretpassword

*************************************

Conclusion

That’s It! You have successfully recovered your forgotten password from a routeros backup file. If you are faced with needing to get a password from an encrypted backup you will need to unencrypted the backup using a bruteforce method. The software package RouterOS-Backup-Tools includes tools for bruteforcing and unencrypting RouterOS backup files but that is beyond the scope of this article.

Let me know what you think, leave a comment below. Did these steps work for you?


pictory

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Ads Blocker Image Powered by Code Help Pro

πŸ™πŸ™A Humble Request to Disable AdBlock πŸ™πŸ™

You can close this message & continue reading but...
❀️❀️❀️ Please consider visiting one of my sponsors first ❀️❀️❀️

DigitalOcean πŸš€

Sign up and get a $200, 60-day credit to try DO.
Spend $25 after your credit expires and I will also get $25 in credit!
DigitalOcean Referral Badge

Pictory πŸ€–

Create amazing videos using Pictorys AI powered software.
Its FREE to create your first 3 video projects
pictory


Hi Reader, I noticed that you are using an ad blocker while visiting my website. While I completely understand that excessive ads can hinder your browsing experience, ad revenue helps pay for the cost associated with operating this website.

jcutrer.com is a labor of love, created with the primary aim to provide you with quality content, free of cost. It’s a space where I share information, ideas, and insights that I hope have a meaningful impact. However, maintaining and updating this platform incurs substantial costs.

Sincerely,
Jonathan