tweaselORG / cyanoacrylate

Toolkit for large-scale automated traffic analysis of mobile apps on Android and iOS.
MIT License
5 stars 1 forks source link

What local IP address to use #8

Open zner0L opened 1 year ago

zner0L commented 1 year ago

When we set up the proxy in cyanoacrylate on a physical device, we need to know an IP address at which the device can reach the host. While it does seem easy enough to get the local IP addresses of the host (https://stackoverflow.com/questions/3653065/get-local-ip-address-in-node-js), it is not unlikely that there is more than one interface available, e.g. WiFi and ethernet. I see two ways to go about this:

I think I like the second option better. What do you think?

baltpeter commented 1 year ago

How about option 3: Only support WireGuard in cyanoacrylate, which just works?

I know we don't have iOS support for that yet in appstraction, but I'm not sure whether it's worth putting in all this effort for supporting an option that is clearly inferior anyway.

zner0L commented 1 year ago

Hm, I guess. In the emulator as well? I am also not sure what to do about the emulator proxy since that is easy and reliable…

baltpeter commented 1 year ago

In the emulator as well?

If it works, why not? If you do a traffic collection on an app, it should only record that app's traffic and WireGuard is the only way we have to do that, anyway.

zner0L commented 1 year ago

Well, because we cannot read from the stdout properly, we still have the problem in that case, because we need to generate the wireguard config ourselves. mitmproxy only stores the keys in the .mitmproxy/wireguard.conf (https://docs.mitmproxy.org/stable/concepts-modes/#wireguard-server).

baltpeter commented 1 year ago

Yes. But we do have to solve that anyway.