IOT Connect
after signing up and logging in the application i found that there is a master switch that requires a PIN to be turned on
when it is wrong it shows this toast message

Let’s take a look about the activity code in jadx
When a pin is entered and the check button is clicked it sends this broadcast message [if the user is not a guest]

now let’s find the broadcast receiver and see how it handles the intent

it is implemented in the class com.mobilehackinglab.iotconnectCommunicationManager
and it expects an intent with:
MASTER_ONactionextra
intkey “the pin”
and it takes the key and give access to all devices if the check_key(key) is true

let’s try to send a broadcast
i got Wrong PIN!! now we bypassed the guest check but we have to find out how the check_key method works?
it returns Intrinsics.areEqual(decrypt(ds, key), "master_on");
This line checks if the decrypted value (decrypt(ds, key)) is equal to the string "master_on". If they are equal, it returns true; otherwise, it returns false.
so we have to find the key that when decrypted with ds give the string master_on
i have written this python script to brute force the key

the key value is 345
let’s exploit

Last updated