In this paper we propose a methodology used to analyse collected pagefiles belonging to public computers using a pagefile collection tool (PCT), which is suitable to be used in a live forensics context. After that, we investigated how to gather sensitive information such as passwords and usernames, which we found in half of the analysed pagefiles. Undoubtedly, this fact can be used by a forensics practitioner to solve the investigation faster, by using such information in order to acquire useful information about a crime. However, if such forensic pagefile collection tool was used as a hacking tool, it could cause leakage of privacy information. To be more precise, it allows easy gathering of critical information such as passwords and credit card numbers. Accordingly, in order to solve this problem, we have proposed a programming methodology to prevent the "swap-out" of sensitive information from main memory to pagefile. Finally, we also proposed a system model to perform the encryption of pagefile memory in order to improve the security of a computer system.