Wiping MikroTik Devices
You can now get MikroTik training direct from Manito Networks. MikroTik Security Guide and Networking with MikroTik: MTCNA Study Guide by Tyler Hart are both available in paperback and Kindle!
Preface
MikroTik devices are very cost-effective - some would say downright cheap - so the capital cost of upgrading networks tends to be fairly low. In some organizations this can lead to a pile of RouterBOARD devices on someone's desk in a corner that are eventually donated, repurposed in a lab, or re-used in a pinch. Unfortunately, a repurposed RouterBOARD unit that hasn't been wiped can expose a lot of sensitive information in the wrong hands. While some things are hidden in the configuration and can't be viewed from the console, .rsc or .backup files in onboard storage can disclose them.
First we'll delete sensitive files in the onboard storage, then we'll wipe the configuration.
Delete Files
Resetting the configuration in the next step won't remove files in the onboard storage. Use the following commands to delete sensitive files:
/file
remove [find name~".rif"]
remove [find name~".txt"]
remove [find name~".rsc"]
remove [find name~".backup"]
Double-check that any sensitive files have been removed.
Reset Configuration
Use the following command to reset the device's configuration:
/system reset-configuration keep-users=no skip-backup=yes
Confirm the command and the device will wipe its configuration, reboot, and regenerate SSH keys. RouterOS will be returned to its default out-of-the-box configuration and the device can be repurposed.