News for hackers. Stuff that matters.
Re:Mitmproxy 7.0 by alias_neo on Friday July 16, 2021 @09:51AM (#27856216)
How practical is it (or not) to intercept TLS traffic for IoT devices on my network where I don't have the option of setting a proxy?

I've been on a crusade the past few years to try and get my self-signed CA onto "smart" devices in my home, but with some it's difficult or I risk damaging expensive hardware.

I've tried various ARP poisoning techniques and such in the past with limited success.

Re:Mitmproxy 7.0 by mhils on Friday July 16, 2021 @10:04AM (#27856322)
I think that's a classic "it depends". I see two main challenges for IoT monitoring:

1. Getting the IoT traffic to your proxy machine. As you say this is fairly trivial when you can set a proxy, but a bit tricky otherwise as you need to run mitmproxy in transparent mode (https://docs.mitmproxy.org/stable/concepts-modes/). With some luck you can set a custom gateway on your device which simplifies the setup, otherwise you need to have the capability to set iptables rules on the router. I personally have a small $20 OpenWRT router dedicated for that. Alternatively you can run your own DNS server and point everything to mitmproxy. v7 now also supports SNI/host-header based proxying! The good news is that this setup is the same for all your devices and once it works, it works.

2. Getting the device to trust your (personal) mitmproxy CA cert. This one really depends on the particular IoT device and may involve some serious reverse-engineering if you are unlucky. I wish there would be a more of a "I should be able to inspect my own traffic" movement, but it's a tricky problem to solve.

Re:Mitmproxy 7.0 by alias_neo on Friday July 16, 2021 @10:55AM (#27856880)
The first part is the easy part, I have routers and run DNS, and have experience with IPTables, I can usually find ways to get hold of the traffic.

The second part is the challenge, and for some devices I've been unable to embed my own CA. I was hoping there was a proxy trick or some magic sauce I was missing. Perhaps where DHCP could automatically configure clients with a (insecure) proxy or something along those lines?

Re:Mitmproxy 7.0 by oauea on Friday July 16, 2021 @12:40PM (#27858099)
> I was hoping there was a proxy trick or some magic sauce I was missing. Perhaps where DHCP could automatically configure clients with a (insecure) proxy or something along those lines?

Nope, you're not missing anything.

Re:Mitmproxy 7.0 by alias_neo on Friday July 16, 2021 @02:12PM (#27859300)
Thanks for confirming, will save me some time messing around! Ill stick to getting my soldering iron out and EPPROM dumping/flashing.
Re:Mitmproxy 7.0 by elahd on Saturday July 17, 2021 @12:00AM (#27863473)
You may be able to intercept a firmware update and load a binary poisoned with your own CA cert. (Lots of factors at play here, of course.)

I'm working on a similar problem (https://github.com/elahd/esp2ino/issues/16) with a project I maintain to sideload IoT device firmware (https://github.com/elahd/esp2ino).

I've been using both mitmproxy and IOXY (https://github.com/NVISOsecurity/IOXY), an intercepting proxy made specifically for MQTT. IOXY is a small, less mature project, but it's definitely worth checking out as a compliment to mitmproxy. Many devices managed via AWS IoT phone home over MQTT and, my limited experience aside, it looks like many don't bother validating certificates when authenticating over this protocol.

Re:Mitmproxy 7.0 by atatatat on Friday July 16, 2021 @10:20AM (#27856470)
...because of enforcement on cheap Chinese etc goods.
Re:Mitmproxy 7.0 by egberts1 on Friday July 16, 2021 @10:00AM (#27856278)
Many IoTs have local search and scan, so block the DNS server at your firewall then provide your own DNS server via your own DHCP server.