and understand why you asked the original question. Indeed, it makes sense to dump flash and compare hash.
Really interesting subject. It's worth to mention that lots of devices manufactured are hackable, check out "defcon" conference videos, how they hack various devices. And I bet that developers don't bother too much with securing device with a stonewall protection just because of comparing expenses of possible harm with expenses for develpment. What happens if your device is hacked? What would be the damage? I guess, that not too much to consider for most cases. It's also makes sense to prevent reading of your code as it may contain data or logic that forms a commercial secret and it's leak can cause significant loss. Not only exploiting.
Here are some of my thoughts regarding your question:
1. If not to stick to hardware to make it secure, I would think about trying to store part of the important/private state of MCU firmware on a server, where it can get it when needed. Can't figure out how exactly to secure your code or detect malicious firmware flashed on the MCU. This is just idea, should be elaborated. Also I would look into irreversible functions and particularly into asymmetric encryption. They have the effect that you need - somebody can read your data (decrypt with public key) but he can't change it without private key.
2. If you are on a design stage and haven't yet confirmed the hardware, I would research about protection features that MCUs provide. They vary greatly: some have almost no protection features, and some have lots of them from lock bits to encryption. If the security is of utmost importance in your project then it may be the first criteria of the hardware to choose.
3. The method you described: before update or any important operation you dum flash and compare hash. It sounds OK and makes sense, but in such case you need to concentrate on protecting your andriod application. It's not too hard to hack it and skip this check in bytecode - if it's a simple "if/if-else" clause.
So it's all depends on what kind of attack you're trying to protect from.
Thank you very much for this response it sheds some light
Обсуждают сегодня