Skip to content
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

SSL Unpinning failed for Whatsapp, Snapchat & McDonald's #24

Open
RequestFX opened this issue Aug 5, 2022 · 7 comments
Open

SSL Unpinning failed for Whatsapp, Snapchat & McDonald's #24

RequestFX opened this issue Aug 5, 2022 · 7 comments

Comments

@RequestFX
Copy link

Hey I tried out your SSL unpinning script on some apps and it didnt work for most of them (Whatsapp, Snapchat, McDonald's App). Is that fixable or is it because of some different issue? Would be nice if we could have a talk, Discord: RequestFX#1541

@pimterry
Copy link
Member

pimterry commented Aug 5, 2022

Hi @RequestFX - thanks for reporting this, that's useful to know.

Unpinning here is mostly focused on HTTP, and I'm fairly sure that the core of Whatsapp at least doesn't use HTTP at all, so I wouldn't expect that to work anyway.

Beyond that though, I'm not sure! I'm afraid I don't have time to investigate every report of issues for every app, but I've written a guide for reverse engineering to extend the script for custom per-app debugging & fixing here: https://httptoolkit.tech/blog/android-reverse-engineering/

It's useful to share any info you do have about the failure here too, to help others who hit this issue, and so we can spot widespread issues across many apps & unpatched common pinning libraries that might be fixable in the general-purpose script. Do you have any more info about what's failing?

If you have any errors you can share that would be useful, or if there's any interesting error or debug output that's shown if you runadb logcat -T1 before reproducing the issue. If you do make any progress reverse engineering this, or if you run into any problems, do share that here too, I'm happy to give you some pointers if you have specific questions and it may help others investigating the same apps later.

@pimterry pimterry changed the title SSL Unpinning failed on multiple apps SSL Unpinning failed for Whatsapp, Snapchat & McDonald's Aug 5, 2022
@RequestFX
Copy link
Author

RequestFX commented Aug 6, 2022

As for the Mcdonalds app the script printed out this
grafik

As for the log I dont know what to look for in this mess. Maybe someone else finds this helpful https://pastebin.com/DyQ06qxt

The HTTP Toolkit data:
grafik
Also for the Mcdonald's app it will immediately show a network error if the certificate gets blocked and you have to restart the app

McDonald's fortunately sends a crash report with info https://pastebin.com/vZBgySnr with info like Certificate transparency failed but idk what to do with that info tbh

@RequestFX
Copy link
Author

So what I tried here is go into the McDonald's app and then launch HTTP Toolkit. It worked until these 2 post requests showed up and found out that there is something going on
grafik

@pimterry
Copy link
Member

pimterry commented Aug 8, 2022

Those are requests to google's device attestation API, which is part of SafetyNet: https://developer.android.com/training/safetynet/. Apps use this API to detect if your device is rooted, or otherwise modified.

If this is causing issues, then that means that your device does not pass SafetyNet checks, and the app is designed to refuse to work in that environment. That usually means you've used a rooting setup that isn't compatible with SafetyNet. It's hard to advise in more detail I'm afraid, because the SafetyNet checks themselves and the rooting mechanisms people use change very frequently.

There's various SafetyNet checkers you can install to test this for yourself - you'll probably find that they all show your device as failing this check.

To fix this, you'll need to either change your device's setup so that it does pass this check, or you'll need to modify the app (e.g. with Frida) to disable the check entirely.

To be clear, this isn't really related to certificate unpinning at all - this is an issue with using apps on rooted devices in general. Most apps will work fine even on devices that don't pass these checks, it's just the few apps that actively try to make themselves unusable on rooted devices where you'll have problems.

@JXRNO
Copy link

JXRNO commented May 8, 2023

SafetyNet passes, but yet doesn't work on https://play.google.com/store/apps/details?id=com.mcdonalds.mobileapp

@ghost
Copy link

ghost commented Aug 9, 2023

anyone know the new logcat command?

> adb logcat -T1
unknown option -- TUnrecognized Option

@141MATRIX141
Copy link

Hi @JXRNO and @RequestFX did u manage to bypass ssl pinning for mcdonalds?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants