I can't recommend it enough - it's perfect for the job and it's free and Open Source.
* 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
** binary templates, for the above: https://github.com/HexFiend/HexFiend/blob/master/templates/T...
* binspector - https://github.com/binspector/binspector
* binary-parsing - a collection of links to similar such tools : https://github.com/dloss/binary-parsing
* unblob - https://github.com/onekey-sec/unblob
* ImHex, which you mention
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.
Is 200001 the right port number? Very good read anyways.
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-the-middle prometheus exporters!
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
Generally I agree with this assessment for home IoT devices, but I’m curious does this hold true for industrial or transportation? Can someone point me to blogs or studies on Chinese EV security?
echo -e 'admin\nadmin\nspi rd 0 2097152\n' | nc 192.168.18.17 23 | tee ~/download/hk1000.spi2.img
downloads the firmware?
"spi rd" are commands that can be used to dump some data from the device, as you can read in my linked presentation.
And the one-liner Scott has in the blog just automates the following process: 1. logging in with admin/admin on the device with telnet 2. issuing the telnet command "spi rd 0 2097152" 3. capturing its output into a file, while also viewing it on the standard output at the same time
I think you would like the community.
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.
That 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.