Skip to content
Info disclosure Write-up Intermediate

How to Hack MikroTik Routers Using CVE-2018–14847

The Winbox service on MikroTik routers had improper authentication handling, allowing unauthenticated attackers to read arbitrary files from the router's filesystem, including plain-text passwords. An attacker could exploit this to retrieve login credentials.

medium.com

Published on medium.com

In 2018, a critical vulnerability was discovered in MikroTik routers affecting the Winbox service, a popular management tool for MikroTik devices. This vulnerability, tracked as CVE-2018–14847, allows attackers to read arbitrary files on the router, including plain-text passwords.

Dhananjay Tupe, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely improper authentication handling in the Winbox service that fails to verify the user before allowing file reads.

Impact

An unauthenticated attacker could read arbitrary files on the router, potentially retrieving plain-text login credentials and gaining control of the device.

What the attacker needed

Network access to the Winbox service; Python 3+ installed; Vulnerable RouterOS version

The fix

Upgrade RouterOS to a version released after 2018-04-20, disable Winbox if not needed, restrict access to trusted IP addresses, and apply firewall rules to block external access to the Winbox port.

How it was found

  1. Clone the exploit repository from GitHub.
  2. Navigate into the cloned directory.
  3. Ensure Python 3 is installed.
  4. Run the exploit script against the target IP address and port over TCP/IP.
  5. Alternatively, discover devices on the local network using the MAC server discovery script.
  6. Run the MAC server exploit script against a discovered MAC address.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

MikroTik routers use a management service called Winbox. A flaw in how Winbox checked who was connecting meant that anyone who could reach the service could read files on the router without logging in. Those files could contain the router's username and password in plain text, so an attacker could take control of the device.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.