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

[BUG] Disable HTTP/3 #19

Open
jacopo-degattis opened this issue Oct 30, 2022 · 8 comments
Open

[BUG] Disable HTTP/3 #19

jacopo-degattis opened this issue Oct 30, 2022 · 8 comments
Assignees

Comments

@jacopo-degattis
Copy link

jacopo-degattis commented Oct 30, 2022

Describe the bug
When I first used this guide to bypass android SSL pinning I was able to see all the requests that the Instagram client was making such as Photos, API requests or simply profile informations fetching.
Right now, after some time, I came back on Instagram SSL pinning bypass and all I can see are requests you can see in the image below.
Screenshot 2022-10-30 at 18 50 40

Method
I'm using Frida for bypassing the SSL pinning.

App info

  • Version: Instagram-v256.0.0.18.105
  • Arch: arm64-v8a

Device info

  • Model: PIXEL_XL API 29 emulator
  • Android Version: 10

Proxy tool
mitmproxy: v8.1.1

Logs
I'm using Frida tool for logging.

Thanks so much in advance !!!

@tulir
Copy link

tulir commented Nov 9, 2022

I think Instagram may have enabled HTTP/3 recently, which is UDP and bypasses usual proxy configurations. There's an issue for mitmproxy at mitmproxy/mitmproxy#4170, and I'd guess the Android emulator's proxy configuration also doesn't affect HTTP/3 at all.

As a quick workaround, I blocked all UDP traffic on my machine except port 53 (DNS) using iptables:

sudo iptables -A OUTPUT -p udp --dport 53 -j ACCEPT
sudo iptables -A OUTPUT -p udp -j DROP

(if you have IPv6, repeat those with ip6tables)

After that all requests are visible in mitmproxy

@Eltion perhaps it would be possible to patch the app to not use HTTP/3?

@Eltion
Copy link
Owner

Eltion commented Nov 10, 2022

@tulir Your right about this. It seems like after login and reopening the app instagram is using HTTP/3. Thanks for reporting it.

I've been trying to force HTTP2, had some success with it but the script is not as robust as it was before so I need to work a bit more into it. I just created a new branch for it here: disable-http3.

main...disable-http3

Like this it will work for the current version (260.0.0.23.115) but it will break for each release, so I need to find a better way to do it.

@Eltion
Copy link
Owner

Eltion commented Nov 15, 2022

Seems like there is a configuration file located at /data/data/com.instagram.android/mobileconfig/<sessionId>.data/0.mctable which can be used to configure if app will use HTTP/3.
This file is created after login, after the app sends a request to https://b.i.instagram.com/api/v1/launcher/mobileconfig/, unfortunately it's not clear which parameter is for HTTP/3 😥.

Seems like deleting the file disables HTTP/3 so I'll do that until I figure out a better solution.

0da439c

@ChrisVinall
Copy link

I am still getting the same issue as #27 (HTTPS capturing works on first app run, not on subsequent runs) but no mobileconfig directory even exists in the specified location. Any idea what is going on here? I'm running instagram-v265.0.0.19.301-x86.apk. Thanks!

@Eltion
Copy link
Owner

Eltion commented Mar 28, 2023

@ChrisVinall
Copy link

Ah, my bad, that works. Not sure how I was running such an old version, I thought I was up to date.

The nuking of the whole config is causing another issue for me related to app behaviour, but I'll try to figure it out.

@polatdev
Copy link

polatdev commented May 1, 2023

this problem still persists.

@Anilmemis
Copy link

when to share ssl pinning bypass for 284 version ?

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

6 participants