MobileHackingLab IOT Connect

Overview

This writeup documents my journey exploiting a broadcast receiver vulnerability in the "IOT Connect" Android application from Mobile Hacking Lab. The challenge involved bypassing authentication restrictions to activate a master switch that controls all connected IoT devices.

Initial Assessment

When I first launched the application, I was presented with a login page offering login and signup options. After creating an account, I noticed several limitations:

  • Regular/guest accounts can only control basic devices

  • Premium features like AC, speakers, and TV remain locked

  • The master switch (which activates all devices) requires a 3-digit PIN

  • Guest accounts cannot access the master switch functionality. This permission structure immediately suggested that the challenge would involve bypassing these restrictions to gain unauthorized control over all connected devices.

Static Analysis

Manifest Examination

My first step was to examine the application's manifest file using Jadx. The most interesting discovery was an unprotected broadcast receiver:

The key security issue here is that this broadcast receiver:

  1. Has no permission restrictions

  2. Is exported (making it accessible to other applications)

  3. Has a simple, predictable intent action name ("MASTER_ON") These factors make it a prime target for exploitation.

Locating the Vulnerability

To understand how the broadcast receiver processes incoming intents, I searched for its implementation and found it in the CommunicationManager class. The receiver implementation revealed:

This confirmed that activating the master switch required sending a broadcast with:

  • Action: "MASTER_ON"

  • Extra integer parameter: "key" with a valid value

Cryptographic Analysis

The check_key function contained the core validation logic:

From this analysis, I understood that: 2. The 3-digit PIN is converted to bytes and padded with zeros to create a 16-byte AES key 3. The function attempts to decrypt the base64 string "OSnaALIWUkpOziVAMycaZQ==" 4. If the decryption result equals "master_on", authentication succeeds

Exploitation Approach

Since the key space is small (000-999), a brute force approach is feasible. I created a script to try all possible combinations:

Running this script revealed the PIN code: 345

Proof of Concept

With the PIN identified, I verified the exploit using ADB to send the broadcast:

Upon executing this command:

  • The broadcast was received by the vulnerable receiver

  • The key was successfully validated

  • All devices were activated, including those normally restricted to guest users This confirmed successful exploitation of the broadcast receiver vulnerability.

Vulnerability Impact

This vulnerability allows any application or attacker with ADB access to:

  • Bypass authentication restrictions

  • Control all connected IoT devices

  • Potentially manipulate home security systems or cause physical impacts

Last updated