privacy-tech-lab / gpc-android

Code and dynamic analysis scripts for GPC on Android
https://privacytechlab.org/
MIT License
5 stars 1 forks source link

Add GPC header to mobile requests with `mitmproxy` #64

Closed kasnder closed 1 year ago

kasnder commented 1 year ago

Explore use of mitmproxy. Example: https://github.com/mitmproxy/mitmproxy/discussions/5155

n-aggarwal commented 1 year ago

I was able to successfully add the GPC header to all requests being sent. The process is very similar to the instructions for setting up mitmproxy wireguard. The only difference is that now I added a python script that instructed mitm to add the GPC header to every outgoing request. The terminal command now is mitmweb --mode wireguard -s mitm-script.py where mitm-script.py is the name of the script file.

Below is a screenshot of what the requests look like now:

Screenshot 2023-05-30 at 4 37 45 PM

I will create an associated branch with the issue and push the python script on that branch.

kasnder commented 1 year ago

Amazing stuff!!!!!

SebastianZimmeck commented 1 year ago

Excellent! So, now the question is how we can use this instrumentation to inject GPC into a larger set of apps.

SebastianZimmeck commented 1 year ago

But, maybe, that is a different issue. So, @n-aggarwal, please feel free to manage this as you see fit.

n-aggarwal commented 1 year ago

Since I was successfully able to add GPC header to mobile requests with mitmproxy, I am going to this issue. The script file to add the GPC flag is in branch issue-64.

SebastianZimmeck commented 1 year ago

The script file to add the GPC flag is in branch issue-64.

I'd say, add it to the main branch of the repo, e.g, in a scripts directory.