tf2012
asked on
wipe a usb using python
I have a python script that copies some proprietary code from a USB to an app folder on a debian wheezy system. The usb will be sent to a client site for them to plugin and click a button to do the update. After the update is complete I use rm to delete the files from the usb but I assume this would be easily recovered. I'm worried that the client will have this usb laying around and they will attempt to recover the files and have access to our code.
So the question is not of design, I know there are better ways to do it overall. But in this case is there a simple way in python or using system.os to wipe or otherwise obfuscate the deleted files on the usb? I can add your suggestion to the source code before we ship the usb (and test it of course)
thanks
So the question is not of design, I know there are better ways to do it overall. But in this case is there a simple way in python or using system.os to wipe or otherwise obfuscate the deleted files on the usb? I can add your suggestion to the source code before we ship the usb (and test it of course)
thanks
Of course client and postmen can make zillion of copies of your USB. Maybe encrypt data and care not if it is deleted or not?
ASKER
I get that, I know there are better approaches thanks. But in the current situation how can I clear the USB to ensure the files aren't recovered easily... doesn't have to be super crazy wiping just enough to keep board engineers from trying to easily undelete.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ok great thanks!
It is sort of easy - check your release signature, decrypt, check file signatures (you can even sign deb files so that apt/dpkg rejects faulty ones)
Always install spare 4Kb key 'just in case' and keep offline, in case you need to override compromised working keys,
Always install spare 4Kb key 'just in case' and keep offline, in case you need to override compromised working keys,