A variety of systems which
can be flashed with modified or entirely third-party firmware but usually shouldn't be have tamper flags that make detecting the modification easy, even if the system is restored to its factory configuration afterward. This could be a good solution for car makers, especially if laws were updated to limit their liability in such cases.
To be specific: car makers should not be liable for unsafe modifications made by third parties, even if they intentionally made the car easy to modify and did foresee that some people would make unsafe modifications. To subject the car maker to liability in the case of a modified car, the plaintiff should have to show by a preponderance of evidence that the modification did not cause the crash.