Is it possible to use Arduino (or any other MCU) to intercept SPI communication between Raspberry Pi and external SD card ? I would like to intercept CMD24 and CMD25 of SD card SPI protocol to fail if the block is already written - implementing WORM storage.

Update: I need hardware WORM block device (filesystem agnostic) - essentially WORM SD card (which is expensive and practically impossible to obtain). So I was thinking about cheap MCU with SD card reader that would provide WORM access to regular external SD card through SPI interface:

[RPi or similar with SPI interface] <===SPI===> [MCU] <===SPI===> [SD card reader]
  • You mean the on-board SD card of the Pi? Or one you wire on yourself? – Majenko Apr 23 '19 at 15:06
  • What type of file system is on the SD? FAT? In that case, file system blocks such as directory, bitmap, etc, need to non WORM? – Mikael Patel Apr 23 '19 at 16:11
  • 1
    you can snoop it for sure, but it might be hard to MITM, timing-wise. I guess you could discard those segments or do something that caused the write to fail, but timing will be tight. It would be simpler to use chattr to enforce an append-only write perm, or some kind of slightly delayed sync that goes through a custom rules engine. – dandavis Apr 23 '19 at 18:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.