1. A computer program product for protecting a host computer system against dynamically unpacked malicious code, the computer program product comprising a non-transitory computer-readable storage medium containing executable computer program code for: detecting an attempt by a program to write to a memory page on the host computer system; responsive to detecting the attempt to write to the memory page, marking the memory page to be writable but non-executable to allow the program to write to the memory page; detecting a request from the program to change the memory page to be executable; preventing the memory page from being changed to be executable responsive to detecting the request from the program; detecting an attempt by the program to execute code written to the memory page by the program, the execution attempt distinct from the request from the program to change the memory page to be executable; responsive to detecting the attempt to execute code on the memory page, before executing the code on the memory page, scanning the memory page for malicious code; and marking the memory page to be executable if the scanning does not find malicious code on the memory page.