PDA

View Full Version : Ideas for rewriting files with random stuff?


Giaguara
November 5th, 2009, 09:46 AM
Help :)

Someone has put a lot of music to a shared folder on a Mac that is for productive work, and of course on corporate use sharing files like music, movies and non-work software is a big no-no.

So help me get some ideas what to do.

Of course, informing the lab manager person would make most sense (especially since I know who put the music there).

But I want something more educating. Like replacing the contents of all files with random junk, so that all files appear to be the same size etc. Appending random bits to the end of the files didn't do it.

Chmodding with no read or chowning to an odd user could probably work too.
But I somehow want something like shred - keeping all existing files, after replacing hte contents. fwipe seems to do this but I can't get it to work with Fink.

Or I could replace all passwords on the system after playing with chown and chmod... what else would be nice?

Satcomer
November 5th, 2009, 10:21 AM
Right click on the folder and see who made those files. Then see if that person is using a peer-to-peer program or Trojan. They might have not done that on purpose.

Giaguara
November 5th, 2009, 10:30 AM
I know the person whose music it is. It's on purpose there.
And p2p programs etc would not be a valid reason.

ElDiabloConCaca
November 5th, 2009, 12:17 PM
You could write a very simple shell script that would capture the exact size of the file in bytes, then simply overwrite the file with 0s of the exact, same length in bytes.

Voila -- file appears to be the same size it was originally, only now it contains garbage data.

Pseudo-code may look something like this:

For each file_name in dir do
file_size gets size of file in bytes
erase all data in file_name (making length 0)
for 1 to file_size do
write 0 >> file_name
end for
next file_name
end for

The program could be easily modified to write random data (instead of 0s), making the file appear more "legit" if someone were to peek at the underlying binary data.

g/re/p
November 5th, 2009, 12:26 PM
You could replace the music files with jpgs of cat turds!