Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

Simple library for getting stats from Ubee routers.

Project description

PyUbee

Python library for getting stats from Ubee routers.

Installation

You can install PyUbee from PyPi using pip3 install pyubee.

Usage

To use within your Python scripts:

from pyubee import Ubee

ubee = Ubee(
                host='192.168.1.1',
                username='admin',
                password='somepassword'
            )

if not ubee.session_active():
    ubee.login()

devices = ubee.get_connected_devices()

for x in devices:
    print('%s (%s)' % (x, devices[x]))

ubee.logout()

CLI

A simple command line interface is available to query the router. The cli takes host, username, and password as mandatory arguments. The optional argument model can be used to specify the model of your router. If model is not specified, this tool will try to detect it automatically.

$ pyubee --help
usage: pyubee [-h] [--model MODEL] host username password

pyubee

positional arguments:
  host           Host
  username       Username
  password       Password

optional arguments:
  -h, --help     show this help message and exit
  --model MODEL  Model, supported models: EVW32C-0N, EVW3200-Wifi

$ pyubee 192.168.1.1 admin somepassword
AA:BB:CC:DD:EE:FF	192.168.1.10
FF:EE:DD:CC:BB:AA	192.168.1.11

Notice

Ubee devices contain vulnerability which allows user to access Admin Web UI without logging in if someone else is logged in from the same IP address. For example if you have Ubee router (e.g. 192.168.1.1) in your home installed from your ISP and you have your own router (192.168.1.2) connected to it and you are doing NAT (Network Address Translation) on your router, then Ubee router will see all connections from clients connected to your router coming from the same IP address 192.168.1.2. In that scenario if someone logs into Ubee router Admin Web UI (http://192.168.1.1/UbeeLanSetup.asp) from Computer A, then anyone from Computer B or Computer C can access http://192.168.1.1/UbeeLanSetup.asp or any other page on 192.168.1.1 without logging in.

             +---------------+
             |               |
             |               |
             |     UBEE      |
             |               |
             |  192.168.1.1  |
             +-------+-------+
                     |
             +-------+-------+
             |  192.168.1.2  |
             |               |
             |  YOUR ROUTER  |
             |               |
             |   10.0.0.1    |
             +-------+-------+
                     |
      +-----------------------------+
      |              |              |
+-----+-----+  +-----+-----+  +-----+-----+
|  COMPUTER |  | COMPUTER  |  | COMPUTER  |
|     A     |  |     B     |  |     C     |
|           |  |           |  |           |
| 10.0.0.11 |  | 10.0.0.12 |  | 10.0.0.13 |
+-----------+  +-----------+  +-----------+

You shoud have this in your mind if you have similar setup.

Author of this package reported this issue to Vendor, even if it's known for years, but there is no response from Vendor and it looks like they are pushing firmware with the same vulnerability probably to all of their devices.

Supported routers

This library was written for and tested with:

  • Ambit EVW320B
  • Ambit EVW321B
  • Ubee DDW36C
  • Ubee DVW32CB
  • Ubee EVW32C-0N
  • Ubee EVW3200-Wifi
  • Ubee EVW3226 (UPC)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyubee, version 0.10
Filename, size File type Python version Upload date Hashes
Filename, size pyubee-0.10-py2-none-any.whl (19.7 kB) File type Wheel Python version py2 Upload date Hashes View
Filename, size pyubee-0.10.tar.gz (22.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page