Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Project: Cryptor Files: AppLdr.c, cryptor.c /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + + appldr.c + + + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ //system includes-------------------------------------------------------------- #include<stdio.h> #include<windows.h> //.code SECTION---------------------------------------------------------------- /* Get rid of .reloc section via linker options /DYNAMICBASE:NO, /FIXED, and /NXCOMPAT:NO Keep unreferenced data, linker options /OPT:NOREF Don't specify linker /DEBUG option to prevent debug info creation */ //merge .text and .data into .code and change attributes //this will ensure that both globals and code are encrypted #pragma section(".code",execute,read,write) #pragma comment(linker,"/MERGE:.text=.code") #pragma comment(linker,"/MERGE:.data=.code") Appendix Project: Cryptor