Next time you find yourself reverse engineering a weird protocol - use ImHex. You can literally define patterns (in a C++ / Rust -like language) so that your binary file gets highlighted and processed. I can't recommend it enough - it's perfect for the job and it's free and Open Source. https://imhex.werwolv.net/
Reverse-engineering an encrypted IoT protocol
21–30 of 44 posts
Re: Reverse-engineering an encrypted IoT protocol
#22Next time you find yourself reverse engineering a weird protocol - use ImHex. You can literally define patterns (in a C++ / Rust -like language) so that your binary file gets highlighted and processed. I can't recommend it enough - it's perfect for the job and it's free and Open Source. https://imhex.werwolv.net/
I'm trying to reverse engineer a kinda simple tcp data stream, and the values are tag-length-value for the most part, and I made a simple mitm proxy that prints known tags and their data values (that I was able to decipher) live, but I am doing the deciphering of known and unknown tags manually, but I was wondering if there is some way to automate this?
I basically would be interested in automatic seen tag tracking, replaying select tags many times to see if they are idempotent, replaying and modifying bytes on a select tag, omitting a select tag and seeing how the client responds.
I guess I could find the socket receive function in the binary and see if the tag values are in a switch or something too but like the original article, it's also new territory for me to read that.
I am just about to expand my mitm proxy with more code to inject/filter packets.
Re: Reverse-engineering an encrypted IoT protocol
#23Next time you find yourself reverse engineering a weird protocol - use ImHex. You can literally define patterns (in a C++ / Rust -like language) so that your binary file gets highlighted and processed. I can't recommend it enough - it's perfect for the job and it's free and Open Source. https://imhex.werwolv.net/
Do you know about any protocol deciphering tool? I'm trying to reverse engineer a kinda simple tcp data stream, and the values are tag-length-value for the most part, and I made a simple mitm proxy that prints known tags and their data values (that I was able to decipher) live, but I am doing the deciphering of known and unknown tags manually, but I was wondering if there is some way to automate this? I basically wou…
Re: Reverse-engineering an encrypted IoT protocol
#24Earlier quoted context omitted.
Just piggybacking here to mention a variety of other "interpret structured binary data" tools. Apparently I collect links to these (: * fq - like jq for binary data: https://github.com/wader/fq * Kaitai Struct - https://kaitai.io/ ** visualizer, for the above: https://github.com/kaitai-io/kaitai_struct_visualizer/ * HexFiend - a hex editor, but with "binary templates" feature : https://github.com/HexFiend/HexFiend **…
is binwalk still used these days?
Re: Reverse-engineering an encrypted IoT protocol
#25MY IoT devices don't have garbage security.
Re: Reverse-engineering an encrypted IoT protocol
#26Well... MY IoT devices don't have garbage security.
Hopefully a market for these devices remains thriving. It would suck if it wasn't possible to flash the firmware of a robot vacuum cleaner (et al) so that it becomes a LAN device.
Re: Reverse-engineering an encrypted IoT protocol
#27Earlier quoted context omitted.
Just piggybacking here to mention a variety of other "interpret structured binary data" tools. Apparently I collect links to these (: * fq - like jq for binary data: https://github.com/wader/fq * Kaitai Struct - https://kaitai.io/ ** visualizer, for the above: https://github.com/kaitai-io/kaitai_struct_visualizer/ * HexFiend - a hex editor, but with "binary templates" feature : https://github.com/HexFiend/HexFiend **…
is binwalk still used these days?
Re: Reverse-engineering an encrypted IoT protocol
#28Next time you find yourself reverse engineering a weird protocol - use ImHex. You can literally define patterns (in a C++ / Rust -like language) so that your binary file gets highlighted and processed. I can't recommend it enough - it's perfect for the job and it's free and Open Source. https://imhex.werwolv.net/
Just piggybacking here to mention a variety of other "interpret structured binary data" tools. Apparently I collect links to these (: * fq - like jq for binary data: https://github.com/wader/fq * Kaitai Struct - https://kaitai.io/ ** visualizer, for the above: https://github.com/kaitai-io/kaitai_struct_visualizer/ * HexFiend - a hex editor, but with "binary templates" feature : https://github.com/HexFiend/HexFiend **…
Re: Reverse-engineering an encrypted IoT protocol
#29He mentioned having a private, firewalled VLAN. Is there anywhere to get more info or example setups for the beginner homelabber? I've got Unifi gear, I poke around the interface. I realize I can make new VLANs, but what makes them isolated/private? Also I see his complaints about half assed security but I actually am kind of relieved. If the security was implemented well we wouldn't be able to make our own man-in-th…
I will say learning how to do it is a pain, but once I got an internal vlan in place, my life got significantly better.
You just want a small internal network that can't get out, or can get out through a proxy.
I set up:
- ipv4 only - cut my configuration in half
- private dns server for the vlan - only resolve internal addresses
- dhcp
- private time server
- privoxy proxy for controlled access to a whitelist of outside
Re: Reverse-engineering an encrypted IoT protocol
#30That key tho. /facepalm/ They REALLY don't care about security. Seriously, at least get PSA level 1 FFS and use TLS. But I doubt a cheap-ass MIPS has the horsepower for a handshake.