-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encrypted data in Renpho Health app #25
Comments
I haven't had a look yet but you make this sound interesting. When I initially looked into this the main issues were using a mitm attack on ssl traffic and decompilation - the decompiled source was not easy to read or find anything. If you haven't already, I wrote a blog on this a while ago here |
You can look at my fork. I saw the data is encrypted for every request. I look at the apk and the decompilation code. One way doing it could be to add debug mode to the signed apk to print the data before request and after find the correct encryption. @StashOfCode if you want to talk or email we can find a way to make it works |
@neilzilla, yeah, that's basically how I found your repo :) Nice write up. I used Unfortunatelty, I can't use the older app since it doesn't support new devices |
@antoinebou12, So far I've tried the folllowing things:
What do you think about the Frida + Waidroid approach? |
I have a rooted device emulator with http with https traffic. I didn't found the .sqlite db with the encryption code. I have multiple server if you want to play with it your approach. My found thati can set the apk into debug mode and resign the apk to make sure so i can debug. I saw the RetrofitUtils.java and i don't understand the code. I tried Frida with Waydroid in the future. Thanks @StashOfCode ! |
@StashOfCode Frida and Waydroid look super interesting, there's a lot to think about there - very interesting post! Correct me if I'm wrong but that post mainly talks about decrypting the local database? This is something I'd not considered but in developing this plugin I'm not sure how useful it is. I definitely want to have a look at picking apart this new app however, I'll see if I can make some time this weekend. @antoinebou12 if I can pull apart the new api could you incorporate this into the addon? |
@antoinebou12, do you have an arm64 server with ubuntu 20-22 on it? I managed to configure a rented vps and install Waydroid, but I failed at the apk installation step - turns out the vps was running on x86 while the app requires arm lol |
@neilzilla, right! The goal in that post was to decrypt the db. I believe we can use the same general approach & tools to figure out how Renpho encrypts requests |
Email me at antoine@antoineboucher.info. I can give you a free vm |
I've been looking into this this afternoon, I wish I had read this thread earlier though. It appears the class that is not properly defined actually loads native code, and the native code generates the AES key in memory and returns it in a really convoluted way. I've managed to decompile the native arm code and find where it is generating the code in parts, I'll paste it here so let me know if it makes sense. This is dumped from Ghidra
I've parsed it through chatgpt but it returns a 17 character string. I'm not as clued up as I once was in assembly, so please let me know if anyone wishes to help with this and I'll point you in the right direction. |
Once we crack this it will be similar to the password encryption, it just seems to run all incoming and outgoing requests through an encryption function |
I was sniffing iOS app's requests to pull my data out of it since renpho doesn't provide a public api. However, it appears to be fucking encrypted now - both request and response payloads. I decompiled an
.apk
file and looked through some Java code. There is a ton of files and folders in there for such an unspectacular app. Unfortunately, some parts failed to decompile, but the main action appears to be going in anAESUtil.java
file. I couldn't figure out what the encyption key was since there are a whole lot of files that show up on a "decrypt" search.I wish I was an expert in encyption and Java. Is there anyone who managed to decrypt this shit?
The text was updated successfully, but these errors were encountered: