Skip to content

Instantly share code, notes, and snippets.

@scorpp
Last active November 11, 2025 10:05
Show Gist options
  • Select an option

  • Save scorpp/767005e0bc31e5212d00aa5cece4b518 to your computer and use it in GitHub Desktop.

Select an option

Save scorpp/767005e0bc31e5212d00aa5cece4b518 to your computer and use it in GitHub Desktop.

Mikrotik binary backup to text script without knowing password

Given

A binary backup from Mikrotik, either password-less or your know the password for the backup. You restore the backup to device, but cannot login to webFig/SSH/WinBox/etc.

Essence of the method

  1. Spin RouterOS on a VM (choose Cloud Hosted Router https://mikrotik.com/download), login once, set admin password
  2. Reboot into live Linux ISO, backup users db from Mikrotik /rw/store/user.* into /rw/disk/
  3. Reboot into Mikrotik, restore the backup and reboot. You don't have access to Mikroitk any more.
  4. Reboot into live Linux ISO, copy users db you backed up on step #2
  5. Reboot into Mikrotik, use creds from #2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment