摘要 |
<p>A method and system for modifying the behavior of existing executable code by injecting new code into an executable file is provided. The injection mechanism injects a reference to new code contained in a DLL into an existing executable file such that, when the code of the executable file is executed, the DLL is automatically loaded and the new code is automatically executed. A reference to the DLL is injected into the executable file by either modifying an import table of the file, which causes automatic loading of the DLLs referred to therein, or by adding DLL loader code to the file. The DLL loader code uses an underlying operating system call to load the DLL. Further, the injection mechanism provides enhanced security by injecting security code and data into the executable file. The injected security code mechanism uses an incremental encryption and decryption process to encrypt and decrypt portions of the executable file in a more secure manner.</p> |