Reverse-engineering of how the Duco Installation App (io.owow.duco.installer,
v5.3, versionCode 2272776) generates the Api-Key header for the local DucoBox
Connectivity Board API — plus tools to reproduce it.
Web generator: https://arnemauer.github.io/duco-local-api-key/
⚠️ The generated key is only accepted by the box over anhttps://connection. Requests over plainhttp://are rejected. The board uses a self-signed certificate, so point your client athttps://<box-ip>/.
The key is computed on the device, not exchanged. There is no challenge/response and no server round-trip. Inputs are two values the box itself exposes:
| input | source (GET /info) |
example |
|---|---|---|
serialBoardBox |
General.Board.SerialBoardBox |
RS8358405328 |
macAddress |
General.Lan.Mac |
aa:bb:cc:dd:ee:ff (lower-case) |
Note: the MAC address must be lower-case for the key to be accepted by the box; the tools normalise this automatically.
A fixed 64-character seed baked into the APK is mixed with these two values and with the
current day number (localEpochSeconds / 86400), so the key rotates daily. The
box runs the identical algorithm to validate. It is security-through-obscurity — the seed
and the algorithm are both recoverable from the app.
Full details and the decompiled bytecode: docs/algorithm.md.
On the board's built-in web UI the key goes into the small text box in the top-left corner (next to the DUCO logo). Without it you get a limited, read-only view. With a valid key the UI reveals many more values and enables write actions: full node/box/zone config, changing settings, triggering actions, and firmware updates.
Both are pure standard-library Python 3, no dependencies.
python3 duco_apikey.py <serialBoardBox> <macAddress>
python3 duco_apikey.py RS8358405328 "aa:bb:cc:dd:ee:ff"Options: --epoch <seconds> or --day <n> to compute the key for a specific day instead
of "now".
Does a keyless GET /info, reads SerialBoardBox + Mac, then computes the key
(reusing duco_apikey.py).
python3 duco_apikey_fetch.py 192.168.4.1
python3 duco_apikey_fetch.py 192.168.4.1 --test # verify key with GET /info/nodes
python3 duco_apikey_fetch.py 192.168.4.1 --https --insecure
python3 duco_apikey_fetch.py 192.168.4.1 --mac aa:bb:cc:dd:ee:ff # override an inputdocs/index.html is a fully client-side generator (served via GitHub
Pages). The JavaScript is a direct port of duco_apikey.py and produces identical output.
duco_apikey.py algorithm (CLI)
duco_apikey_fetch.py auto-fetch serial + MAC from the box, then compute
docs/
index.html GitHub Pages web generator
algorithm.md full write-up of the algorithm
apikey_bytecode.txt decompiled bytecode of the relevant classes
img/node_info.png board web UI screenshot (serials randomised)
Independent reverse-engineering of a publicly distributed Android app, for interoperability and research. Not affiliated with or endorsed by DUCO. Use only on equipment you own or are authorised to access. No warranty. See LICENSE.
