Giter VIP home page Giter VIP logo

lightleak's Introduction

Cloudcutter Lightleak

This is a somewhat universal way of exploiting a vulnerability in Tuya Smart IoT products. Ideally, it doesn't require to have firmware dumps (and "device profiles") prior to executing.

A detailed writeup about how this works will probably be here at some point.

How to use it

Lightleak is used together with the Cloudcutter Android application. Currently, there's no other way to use it.

Additionally, you need a device (ESP32/ESP8266/BK7231 or RTL8710B with LibreTiny) to serve as a dummy Wi-Fi Access Point - hereinafter referred to as CustomAP device. This will be configured and used by the Android app throughout the process. The platformio-custom-ap directory contains a PlatformIO project that can be compiled on any of the platforms mentioned above. You need to download this code, build it, and upload to your device of choice.

Plug in the CustomAP device and make sure it works (a LightleakIdle Wi-Fi network should be available - scan with your smartphone or laptop). Do not connect to the network manually.

Important: if the target device was used before, or paired to any Wi-Fi network using the official app (Tuya Smart/SmartLife):

  • Open the Tuya app.
  • Choose the target device in the app (make sure it's online).
  • Click the pencil icon in the top-right corner.
  • Choose Remove Device and click Disconnect and wipe data.
  • The device should start blinking quickly and disappear from the official app.

  • Install the app.
  • Go to App Info (Android settings), choose Permissions and grant the Location permission (it's required for Wi-Fi connecting and scanning). The app won't ask for it yet, so you have to grant it manually.
  • Before running the process, ensure you have both Wi-Fi and Location enabled (otherwise it'll just fail silently, waiting forever and timing out).
  • Open the app. Select one of the Lightleak profiles (depending on the CPU of your device). If you don't know the CPU you have, you can try all the profiles, one by one. Trying an incompatible profile will not brick the device; it will just freeze and reboot after ~60 seconds.
  • Read the message about choosing device state.
    • If it's the first time exploiting a particular device, choose Unconfigured. Other options are too hard to explain here, so just don't use them please.
  • It will first connect to and configure the CustomAP device.
  • Note 1: Android (10+) will probably ask you when first connecting to a network. There will be a dialog message with the network name. You can just click the name or press Connect.
  • Note 2: if the entire process fails at any point, please reset the CustomAP device before trying it again.
  • Look carefully at the message window at the bottom, and do what it says. It will tell you when it's time to reboot the target device into AP mode.
  • If the process completes successfully, another window will open. Currently, it allows you to dump flash contents of the device.
  • Pressing Read flash should download the entire 2 MiB of flash, saving it to the directory of choice. It should take around 30-40 seconds.
  • What to do next:

lightleak's People

Contributors

cossid avatar dg98 avatar kuba2k2 avatar mihsu81 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.