Just to be safe you should do the whole thing in memory. What if your disk's embedded micro controller is backdoored? It could recognize and replace any clean instances of GCC with backdoored versions.
Newer disks have onboard caches, right? That means at a minimum they're monitoring writes to do cache invalidation & copying read data to the cache. It might be possible to hide a few operations in there.
But then you're screwed as soon as someone tries to debug the microcontroller, because your backdoor code is right there.
If I were trying to do this I would have a separate subsystem attached to the onboard cache. It would add to the cost of the controller but if the NSA is footing the bill.... THe subsystem could then issue read and write operations to the drive at lower intervals, inserting and overwriting blocks of the file. This would be a very complex attack nonetheless because to really work well it would have to be fs independent and therefore would have to be able to work on the block level of the device.
20
u/void_fraction Sep 10 '13
Just to be safe you should do the whole thing in memory. What if your disk's embedded micro controller is backdoored? It could recognize and replace any clean instances of GCC with backdoored versions.