-1

I'm looking for a method of reading/writing (actually programming) the Master Boot Record (or maybe VBR) of a usb mass storage device. Actually its a flash drive whose MBR I want to program, so that whenever I plug it into any computer, a program (stored on my flash drive in a file) gets executed.

I know quite a bit of assembly but I don't know how to go about programming MBRs.. Please help

Thanks

Flimzy
  • 60,850
  • 13
  • 104
  • 147
Rushil Paul
  • 1,878
  • 4
  • 23
  • 38

1 Answers1

2

If you're using linux, you can simple open the device file /dev/sdXY and write to it, the MBR will be the first 512 bytes.

tstenner
  • 9,119
  • 10
  • 48
  • 83