Live data from Hacker News

Reverse engineering my e-scooter and rewriting the firmware in Rust

bensimms.moe

81–90 of 113 posts

Re: Reverse engineering my e-scooter and rewriting the firmware in Rust

#81
post #37
post #34

We need to free up Bosch systems. They use lots of open source libs, but they close the whole chain (like spare batteries) so that you cannot plug external batteries from other suppliers.

Pretty much anything hardware based is like this. Everything is 100% closed source and bolted down such that inspecting it is outright impossible without extensive reverse engineering.

I definitely think AI is going to change this. Astra is shockingly good at reverse engineering. I was working with a proprietary software library and I just asked it how some (poorly documented) function worked and it just went off and disassembled it without me even prompting. I asked it if there was a way of disabling some error checks and it went and found some undocumented functions (not in the header), disassembled them and figured out how to use them for me.

I didn't actually even give it the ability to run this code and it could still reverse engineer everything.

Re: Reverse engineering my e-scooter and rewriting the firmware in Rust

#84

Earlier quoted context omitted.

Having been on the flip side of this divide in the past, there really are a lot of potential safety and reliability problems when using random third party versions of components. While I'm sure there are strong financial incentives to constrain supply, there are also some other strong reasons as well. Also it's very expensive to actually make an ecosystem compared to a close one. The best way to incentivize manufactu…

Safety is just an excuse for control, let's be real. Also your "best way" doesn't always work - often there are monopolies or oligopolies (e.g. in smartphones). Though I think for e-bikes that isn't the case, so yeah I would just say don't buy a Bosch ebike - there are plenty of better alternatives out there.

When it comes to ebike batteries I think the alarmism is actually valid considering how often we see explosive fireballs on trains and in apartment buildings coming from cheap no brand ebike batteries.

High capacity batteries are incredibly dangerous devices kept safe only by very careful engineering and manufacturing.

Re: Reverse engineering my e-scooter and rewriting the firmware in Rust

#85
post #37

Earlier quoted context omitted.

Pretty much anything hardware based is like this. Everything is 100% closed source and bolted down such that inspecting it is outright impossible without extensive reverse engineering.

I definitely think AI is going to change this. Astra is shockingly good at reverse engineering. I was working with a proprietary software library and I just asked it how some (poorly documented) function worked and it just went off and disassembled it without me even prompting. I asked it if there was a way of disabling some error checks and it went and found some undocumented functions (not in the header), disassemb…

For now, but I think eventually the hardware companies will catch on and build everything much more locked down with signed firmwares, keys burned in to the chip, encrypted communications with accessories, etc.

Re: Reverse engineering my e-scooter and rewriting the firmware in Rust

#86

Earlier quoted context omitted.

I’m suspicious of this vision because for example, with battery packs, cells with compatible voltage and size have vastly different characteristics. Those characteristics, like safe discharge rate, capacity, projected cycle count, are all things that manufactures exaggerate or get wrong. I don’t think there’s any way that consumers can ever be informed enough to have an efficient market in products such as those

I can imagine a future where batteries and chargers communicate using an open-source protocol just as they are doing now over USB.

If the batteries are a full pack which contain their own internal charge controller, etc. Raw cells can't communicate anything.

The problem is the consumer can't tell the difference between a well engineered pack and one that will explode in their apartment overnight.

Re: Reverse engineering my e-scooter and rewriting the firmware in Rust

#87

Earlier quoted context omitted.

Reverse engineering the way they do it is very satisfying and time consuming. If you want the same results but without the sweat, LLMs are the way to go now. They eat this kind of stuff for lunch. You could literally ask one for a table with all the CAN bus messages and it would figure it out. I wrote a blog posts where I first did it the traditional way and then, a few months later, the lazy way: https://tomverbeure…

LLMs are fun until you have to break up a devices that use encrypted firmware files and non-documented interfaces.. that you are back in the past ;-) But for the rest: Yes. They will be eaten alive by the latest generation of LLMs. I use DS-Flash 4.1 a lot for this. A big helper.

Clearly you are in the past. I have reverse engineered some very difficult undocumented things. I can not go in to details but these were heavily hardened hardware. Custom SoC. of course without datasheets, involved multiple different levels of encryption and architectures of connected devices, broke all of it. All that is left is cryptocell pwn.

With very little steering from me

eta: passive aggressive winky face

Re: Reverse engineering my e-scooter and rewriting the firmware in Rust

#88
post #5

Earlier quoted context omitted.

From what I've seen on the streets, people bypassing the restrictions will not, and there will be injuries.

You only notice the ones that aren't safe. How would you know if someone bypassed the restrictions if they were riding it safely?

Scooters just don't have the geometry to ride fast safely, they are incredibly prone to flicking the front wheel out and chucking the rider on the ground. The only way they can be ridden safely is riding relatively slowly.

"Hasn't crashed yet" is different to "safely"

Re: Reverse engineering my e-scooter and rewriting the firmware in Rust

#89
post #58

Earlier quoted context omitted.

> there really are a lot of potential safety and reliability problems when using random third party versions of components. What are you talking about? If a seller sells you random junk that causes safety issue, they are liable of the damage like the OEM would if their product was bad. Then, if the seller is in a jurisdiction where you can't hope to sue, then it's either your problem for picking this random seller on…

> What are you talking about? > If a seller sells you random junk that causes safety issue, they are liable of the damage like the OEM would if their product was bad. No, the GP comment is right. I’ve worked on products where a lot of users did mods and used third party accessories. Customers don’t care who, how, or why their product broke. They want to make noise and try to get a warranty fix for it. Customers would…

Just call hem out on social media, show the evidence and then just ignore them.

Re: Reverse engineering my e-scooter and rewriting the firmware in Rust

#90

Earlier quoted context omitted.

I definitely think AI is going to change this. Astra is shockingly good at reverse engineering. I was working with a proprietary software library and I just asked it how some (poorly documented) function worked and it just went off and disassembled it without me even prompting. I asked it if there was a way of disabling some error checks and it went and found some undocumented functions (not in the header), disassemb…

For now, but I think eventually the hardware companies will catch on and build everything much more locked down with signed firmwares, keys burned in to the chip, encrypted communications with accessories, etc.

Why haven't then done this things so far?
Post reply on HN