Home > Windows Security Tips > Vulnerability/Authentication tips for Windows > Windows pagefile security risks and how to avoid them
Windows Security Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

VULNERABILITY/AUTHENTICATION TIPS FOR WINDOWS

Windows pagefile security risks and how to avoid them


Brien M. Posey, MCSE
08.09.2007
Rating: -4.00- (out of 5)


Advice for securing Windows
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


Ever since the first version of Windows (XP) was introduced, Microsoft has designed the Windows operating system (OS) to use a pagefile (also referred to as virtual memory) to compensate for shortages of physical memory. The pagefile allows Windows to use hard disk space as memory. When the machine's physical memory begins filling up, pages of data are moved from physical memory to virtual memory as a way of freeing up memory.

Data security extras
Clear the Windows pagefile for security

Problems accessing encrypted files on remote servers

Eventually, the OS needs to retrieve data from the pages of memory that were moved to virtual memory. Since Windows can't read the data directly from virtual memory, it moves additional pages to virtual memory, as a way of freeing up space in the machine's physical memory. The memory pages that are currently needed are then moved from virtual memory into the newly freed space in the machine's physical memory. This process is known as swapping or paging.

Although paging is a normal process performed by the Windows OS, there are several reasons why a pagefile can be considered a security risk. First, Windows does not automatically clear a pagefile when a user logs out, which means there is a good chance that copies of the user's files will still exist in the pagefile long after the user logs off. Windows security prevents users from logging in and browsing the pagefile, but there is nothing to stop a user from booting an alternate OS and using that OS to circumvent Windows security and browsing the pagefile.

There are some situations in which having access to a pagefile may mean the difference between gaining or not gaining access to restricted files.

For example, if a user's data is stored on a network share, having physical access to the machine won't really help someone access the user's files. Of course if the user has recently used those files, then copies of the files may reside in the pagefile.

Another example of a situation in which a pagefile can be used to breach security is in the case of encrypted files. Any time that Windows reads a file that was encrypted using EFS (Encrypting File System), the file is decrypted. As such, if a user accesses an encrypted file, then there is a very good chance that a copy of the file will be stored in the pagefile in an unencrypted format. When you combine this with the fact that the pagefile itself cannot be encrypted, you can see how this could be a security concern.

Disabling the pagefile

This raises the question of how you can prevent pagefile-related security problems. The only sure way to get around these security issues is to not use a pagefile at all. Windows relies on pagefile to compensate for shortages in physical memory. X86 systems support a 4 GB memory model. Therefore, if your machine has 4 GB of RAM, you can disable pagefile completely. If your system has less than 4 GB of memory, then Windows won't stop you from disabling pagefile, but the system's performance and stability may suffer if you do. I also do not recommend disabling pagefile if you are running a 64-bit version of Windows.

To disable pagefile on a computer running Windows XP:

  • Open the Control Panel.
  • Click Performance and Maintenance.
  • Click System.
  • When the System Properties sheet appears, select the Advanced tab.
  • Click the Settings button found in the Performance section.
  • When the Performance Options properties sheet is displayed, select the Advanced tab.
  • Click the Change button found in the Virtual Memory section.
  • Select the No Paging File option.
  • Click OK, three times.

Disabling hibernation

Another way to reduce the risk of a pagefile-related security breach is to disable hibernation. When a computer goes into hibernation mode, the contents of the system's memory are dumped to disk in an unencrypted format, leaving data vulnerable to exposure.

To disable hibernation:

  • Open the Control Panel.
  • Click Performance and Maintenance.
  • Click Power Options.
  • When the Power Options properties sheet appears, select the Hibernate tab.
  • Clear the Enable hibernation check box.
  • Click OK.

Clearing the pagefile at shutdown

One last way that you can protect a system against a pagefile-related security breach is to configure Windows to clear the pagefile at shutdown. Clearing the pagefile takes time and prolongs the shutdown procedure, but it removes user data from the pagefile.

To configure Windows to clear the pagefile at shutdown:

  • Open the Group Policy Object Editor.
  • Navigate through the console tree to Computer Configuration | Windows Settings | Security Settings | Local Policies | Security Options.
  • Double click on the Shutdown: Clear Virtual Memory Pagefile option.
  • Choose the Enable option.
  • Click OK.

About the author: Brien M. Posey, MCSE, is a Microsoft Most Valuable Professional for his work with Windows 2000 Server and IIS. He has served as CIO for a nationwide chain of hospitals and was once in charge of IT security for Fort Knox. As a freelance technical writer, he has written for Microsoft, TechTarget, CNET, ZDNet, MSD2D, Relevant Technologies and other technology companies.


Rate this Tip
To rate tips, you must be a member of SearchWindowsSecurity.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
Vulnerability/Authentication tips for Windows
Buffer overflows can be prevented by GS cookies
DHCP Client Service error affects network security
Free security tools that can improve IIS security
Correct improperly assigned user rights in Windows XP
Free security testing tools for Windows handheld devices
Windows Integrity Control (WIC) in Vista
Metasploit 3.1 updates improve Windows penetration testing
Cross-site scripting 101: XSS attacks plague Web browsers
Windows network rights, password policy and network security testing
Top Windows security testing tips of 2007

End User Education
ActiveX security improves with Internet Explorer 8's security features
Data encryption best practices in Windows
Windows Mobile security tips for the on-the-go pro
Correct improperly assigned user rights in Windows XP
Free security testing tools for Windows handheld devices
Do old certificates pose a Windows security threat?
Windows mobile security: Get it locked down
Metasploit 3.1 updates improve Windows penetration testing
Have I experienced a Windows security breach?
Windows security management: Ask the security expert roundup

Encryption
Data encryption best practices in Windows
Data encryption with EFS and BitLocker, step by step
What's new and improved in IPsec in Windows Server 2008
Prevent data loss with Encrypting File System (EFS)
New Windows security tool protects users from keyloggers: XecureCK
Windows security management: Ask the security expert roundup
USB encryption security for Windows: IronKey review
How can I manage file encryption on a Windows network?
Microsoft network security testing for ARP spoofing
Troubleshooting generic error messages related to EFS
Encryption Research

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
strong password  (SearchWindowsSecurity.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT DownloadsBlogs
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2004 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts