Feeds

Clearing swap and hibernation files properly

Two neglected open books

  • alert
  • submit to reddit

Beginner's guide to SSL certificates

Privacy workshop Most privacy-conscious users are familiar with deleting files securely, that is, destructively with overwriting and with wiping free space on their disks. But two items that often get overlooked are the swap file (or swap partition), and the hibernation file.

Let's start with the swap file. This is an area of your hard disk where data previously held in RAM is written, and later read, to "free up" physical memory and make it available for other tasks. Data swapped from RAM to disk is sometimes called "virtual memory". Your computer can read from RAM much faster than it can read from the disk, but RAM is expensive, whereas disk space is comparatively cheap and usually plentiful. Thus, it's not unusual for a system to have a swap file of 1GB or more.

Unfortunately, your swap file knows a lot about you. Pretty much anything you do with your computer can leave traces there. Files you've opened and their contents, websites you've visited, online chats you've had, emails you've sent and received, virtually anything can end up archived in it for quite a long time - months, and even years. You can delete, even wipe securely, the original data, and still your swap file might tell on you by retaining duplicate traces of your computing behaviour. Forensics practitioners consider the swap file to be a real bonanza of data traces, because swapping is an automatic, background process that users - even privacy-conscious ones - can't control completely.

So, what data gets swapped to disk? No one can say: it depends on conditions and memory needs peculiar to each system. Not all data is swapped to disk, but virtually any data might be swapped - even passwords, potentially.

In fact, it's possible that the plain text versions of encrypted files could turn up in the swap file: perhaps the content was swapped to disk before encrypting or after decrypting - that is, when a user is viewing or editing the plain-text content of these files. A good encryption utility will have its own viewer and editor designed to prevent swapping the plain-text data. But are you certain that it works as it should? And what happens if you copy and paste between two decrypted files, or between two files that you intend to encrypt later? Clipboard contents can certainly be swapped.

So, what are the solutions? First, and most obviously, don't use a swap file or swap device. If you've got plenty of RAM, you might not need anything more. Some Windows applications, games, etc, require a swap file even when there is an abundance of RAM, so not everyone can use this option. But Linux users can almost always get away with not using a swap partition if they have plenty of RAM, say 1GB or more.

The next approach is to perform a manual, secure wipe of the swap file on a regular schedule with the help of an inexpensive utility like BCWipe for Windows users, or a free utility like LinuxWipeTools for Tuxers.

Choosing a cloud hosting partner with confidence

More from The Register

next story
SMASH the Bash bug! Apple and Red Hat scramble for patch batches
'Applying multiple security updates is extremely difficult'
Apple's new iPhone 6 vulnerable to last year's TouchID fingerprint hack
But unsophisticated thieves need not attempt this trick
Oracle SHELLSHOCKER - data titan lists unpatchables
Database kingpin lists 32 products that can't be patched (yet) as GNU fixes second vuln
Who.is does the Harlem Shake
Blame it on LOLing XSS terroristas
Researchers tell black hats: 'YOU'RE SOOO PREDICTABLE'
Want to register that domain? We're way ahead of you.
Stunned by Shellshock Bash bug? Patch all you can – or be punished
UK data watchdog rolls up its sleeves, polishes truncheon
Ello? ello? ello?: Facebook challenger in DDoS KNOCKOUT
Gets back up again after half an hour though
Desperate VXers enslave FREEZERS in DDoS bot
Updated Spike malware targets Asia
Heatmiser digital thermostat users: For pity's sake, DON'T SWITCH ON the WI-FI
A stranger turns up YOUR heat with default password 1234
prev story

Whitepapers

Providing a secure and efficient Helpdesk
A single remote control platform for user support is be key to providing an efficient helpdesk. Retain full control over the way in which screen and keystroke data is transmitted.
Intelligent flash storage arrays
Tegile Intelligent Storage Arrays with IntelliFlash helps IT boost storage utilization and effciency while delivering unmatched storage savings and performance.
Beginner's guide to SSL certificates
De-mystify the technology involved and give you the information you need to make the best decision when considering your online security options.
Security for virtualized datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.
Secure remote control for conventional and virtual desktops
Balancing user privacy and privileged access, in accordance with compliance frameworks and legislation. Evaluating any potential remote control choice.