This function is a bit tricky to use. Here dev_index is an index to
the virtual disk array. So 0 means the first disk and 1 means the
second. If each disk has one partition, then disk 0 is c: and disk 1
is d:. taint_id is an ID to uniquely identify a taint source. You can
assign any number to it.
If you want to taint "c:\img1.jpg", you can do:
do_taint_file("/img1.jpg", 0, 100);
Another tricky thing is duo to the disk cache. If you want to taint a
small file in windows c:\. Quite often, this small file is already
cached into the memory, when Windows reads the data from the disk
nearby. As a result, even though the file has been tainted on disk,
when you read this file thereafter, you won't see tainted data,
because the cached data is fetched. The best practice is to put this
file into the second disk, to avoid this file being pre-fetched into
memory.
Heng