Your Ad Here

Friday, December 7, 2007

Windows Command line tools: Wipe your free space using Cipher

Little Description-

File table contains reference to the location of file on disk like a book’s index contains the page numbers of chapters in the book. When the file is deleted from computer recycle bin it is not fully removed from hdd only its entry in the file system table is deleted. So it is possible to recover the deleted data by using File Recovery Softwares. Wiping free hard disk space means to permanently erase the deleted file data so it is not recoverable using Recovery Softwares.

There are thousands of free space Wiping utilities out there on the internet. So if your Company Policies prohibit installing the 3rd party file wiping softwares or you are in urgent need of wiping utility and do not have access to internet you can use the in-built command in Xp/2003 called Cipher.

Cipher is mainly used for Encrypting/Decrypting the files but it also contains a “/w” switch to wipe the free space. Here’s the syntax-

Cipher /w:DrivetoWipe
e.g. Cipher /W:C

Official Description of /w Switch – “Removes data from available unused disk space on the entire volume. If this option is chosen, all other options are ignored. The directory specified can be anywhere in a local volume. If it is a mount point or points to a directory in another volume, the data on that volume will be removed.”

Cipher /w wipes the free space by writing the junk data in three steps- Writing Zeroes, Ones and Random Numbers.

Three steps wiping Screenshot-




Windows Command Line Device Manager- Devcon.exe

Although there is GUI Device Manager for managing devices on a Windows Machine, for command line aficionados there is Devcon.exe from Microsoft. It can do tasks like –

• Disabling/Enabling the device
• Lists driver files installed for devices
• Lists all device setup classes (types like usb, display, mouse, biometric devices etc)
• Finds a device by instance id
• find hidden devices
• Lists hardware Ids
• Manually install a device
• Scan for new hardware
• Remove a device
• Restart a device
• Lists the status of device
• Updates device Drivers of a Device etc
• Display the Devices in a Remote Machine, its status etc.

For more info type “devcon /?” & individual Switch help like “devcon help findall”.
It can be lot useful for System Administrators in scripting common tasks like disabling and re - enabling the Network Card, Restarting a device, Updating Device Drivers, Generating lists of devices installed and their status in Local Machine and also in Remote machines.

It may also display (I am not sure) hidden Rootkit Driver Installed in a file system but may not be visible after turning on the Device Manager hidden option.

I use it to fix my ADSL Connection because sometimes it gets disconnected and doesn’t reconnect without disabling/enabling the NIC.

Microsoft has both x86 & x64 versions. Download it from Microsoft – here

Screenshot Displaying List of Features/Switches-

Image Hosted by ImageShack.us