All Projects → OpenMiHome → Mihome Binary Protocol

OpenMiHome / Mihome Binary Protocol

Licence: gpl-3.0

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Mihome Binary Protocol

Xiaomi Kettle
Xiaomi Kettle BLE protocol reverse-engineered
Stars: ✭ 187 (-65.11%)
Mutual labels:  xiaomi, protocol
Re Whatsapp
Reverse engineering WhatsApp. Documentation and protocols.
Stars: ✭ 184 (-65.67%)
Mutual labels:  protocol, encryption
Xiaomirobotvacuumprotocol
Attempt to describe the Xiaomi Robot Vacuum Protocol
Stars: ✭ 200 (-62.69%)
Mutual labels:  xiaomi, protocol
Gun
An open source cybersecurity protocol for syncing decentralized graph data.
Stars: ✭ 15,172 (+2730.6%)
Mutual labels:  protocol, encryption
powerauth-crypto
PowerAuth - Open-source solution for authentication, secure data storage and transport security in mobile banking.
Stars: ✭ 48 (-91.04%)
Mutual labels:  encryption, protocol
Wireguard Manager
Self-hosted Wireguard Installer / Manager for CentOS, Debian, Ubuntu, Arch, Fedora, Redhat, Raspbian
Stars: ✭ 478 (-10.82%)
Mutual labels:  encryption
Encpass.sh
Lightweight solution for using encrypted passwords in shell scripts
Stars: ✭ 494 (-7.84%)
Mutual labels:  encryption
Berty
Berty is a secure peer-to-peer messaging app that works with or without internet access, cellular data or trust in the network
Stars: ✭ 5,101 (+851.68%)
Mutual labels:  encryption
Wesher
wireguard overlay mesh network manager
Stars: ✭ 461 (-13.99%)
Mutual labels:  encryption
Enchive
Encrypted personal archives
Stars: ✭ 527 (-1.68%)
Mutual labels:  encryption
Kopia
Cross-platform backup tool for Windows, macOS & Linux with fast, incremental backups, client-side end-to-end encryption, compression and data deduplication. CLI and GUI included.
Stars: ✭ 507 (-5.41%)
Mutual labels:  encryption
Yubikey Full Disk Encryption
Use YubiKey to unlock a LUKS partition
Stars: ✭ 488 (-8.96%)
Mutual labels:  encryption
Jose
🔐 JSON Object Signing and Encryption Framework (JWT, JWS, JWE, JWA, JWK, JWKSet and more)
Stars: ✭ 479 (-10.63%)
Mutual labels:  encryption
Swifty
🔑 Free Offline Password Manager
Stars: ✭ 496 (-7.46%)
Mutual labels:  encryption
Signal Back
Decrypt Signal encrypted backups outside the app
Stars: ✭ 468 (-12.69%)
Mutual labels:  encryption
Backup
Easy full stack backup operations on UNIX-like systems.
Stars: ✭ 4,682 (+773.51%)
Mutual labels:  encryption
Enet Csharp
Reliable UDP networking library
Stars: ✭ 464 (-13.43%)
Mutual labels:  protocol
Anti Webspider
Web 端反爬技术方案
Stars: ✭ 486 (-9.33%)
Mutual labels:  encryption
Easy Wg Quick
Creates Wireguard configuration for hub and peers with ease
Stars: ✭ 502 (-6.34%)
Mutual labels:  encryption
Secure Ls
🔒 Secure localStorage data with high level of encryption and data compression
Stars: ✭ 486 (-9.33%)
Mutual labels:  encryption

Xiaomi's MiHome Binary protocol

Summary

Xiaomi is a manufacturer of smart home devices under the "MiHome" label. These devices use an encrypted, proprietary network protocol to communicate with the official smartphone app. It operates on UDP port 54321.

This repository documents the protocol, henceforth referred to as "mihobi", and contains exemplary source code to parse and analyze.

The main goal is to remove the dependence on proprietary software, and to regain control over your own devices.

It has been developed with the Yeelight RGBW smart bulb. Other devices might use yet unimplemented features.

Yeelight bulb

Documents

doc/PROTOCOL.md

Tools

pcap-decrypt.py

Recovers the protocol from pcap-ng dumps and attempts to decrypt the packet payloads.

Dependencies:

  • Python 3.5+
  • tshark, the command-line version of Wireshark
  • PyShark, a Python wrapper for tshark
  • cryptography, a Python library which exposes cryptographic recipes and primitives.

Installation:

apt-get install tshark
pip3 install pyshark
pip3 install cryptography

Usage:

./pcap-decrypt.py capture.pcapng.gz

Example output:

### 192.168.13.2 => 192.168.13.1 (xx:xx:xx:xx:xx:xx => yy:yy:yy:yy:yy:yy)
META: Hello

### 192.168.13.1 => 192.168.13.2 (yy:yy:yy:yy:yy:yy => xx:xx:xx:xx:xx:xx)
META: device yy:yy:yy:yy:yy:yy has token: abcdef1234567890abcdef1234567890

### 192.168.13.2 => 192.168.13.1 (xx:xx:xx:xx:xx:xx => yy:yy:yy:yy:yy:yy)
{"id":1234567890,"method":"miIO.config_router",
"params":{"ssid":"WiFi name","passwd":"WiFi password","uid":987654321}}

### 192.168.13.1 => 192.168.13.2 (yy:yy:yy:yy:yy:yy => xx:xx:xx:xx:xx:xx)
{"result":["ok"],"id":1234567890}

miio.py

Core Python library that parses and generates MiHoBi packets.

Notes

As of 2017-02-10, the initialization process ("SmartConnect") leaks the user's WiFi credentials, due to weak encryption. See PROTOCOL.md for more details. I do not recommended connecting MiHome devices to your main WiFi network.

Appendix

Legal

Xiaomi is a registered trademark and service mark of Xiaomi Inc., which is not affiliated with the maker of this program and does not endorse, service or warrant the functionality of this product.

Author

The source code and documention in this repository

(c) 2016-2017 Wolfgang Frisch

Licensed under the GPLv3.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].