Re:Tracking Electric Scooters in Lisbon
by thepete2 on Friday December 13, 2019 @08:47PM
(#21787246)
How does mitmproxy work? Does it run on the phone or how can you read the https urls?
[ Parent
| on HN ]
Re:Tracking Electric Scooters in Lisbon
by bransonf on Friday December 13, 2019 @09:58PM
(#21787499)
The normal chain is app > server.
Mitmproxy acts as a middleman. Typically you’ll run it on another device on the same network. app > proxy > server
Which means every time the app makes a GET request (for example) the proxy can log the url/ip as well as the parameters passed to the server.
Then, to get the data yourself, you use a web client like Curl (or Requests in Python) and send the same headers/auth/parameters as the app did. But now instead of returning it to the app, it’s in a format you can store/manipulate.
Re:Tracking Electric Scooters in Lisbon
by thepete2 on Friday December 13, 2019 @11:56PM
(#21787910)
I understand that. My question is since this is https - encrypted http - how do you decrypt the traffic? Is there something running on the phone too? Otherwise you would need the server's private key, right?
Re:Tracking Electric Scooters in Lisbon
by nicksantamaria on Saturday December 14, 2019 @02:26AM
(#21788299)
I haven't done this myself, but I assume you would install the certificate mitmproxy uses on your phone. That would result in a successful handshake
That's correct. Mitmproxy offers an easy way to install a root certificate:
https://docs.mitmproxy.org/stable/concepts-certificates/