How can I defeat erase PE from memory ?
First: The executable I'm working on is a CLR Host in c++ so the program behind is in C# Second: The C# program erase the PE header with the function Virtual Protect (Very common protection for anti-dumping)
In all cases I dumped the C# program with x64dbg, and then I can't really achieve my goal because of the erase PE header. The only way I found to patch this is at the startup of the program to replace the VirutalProtect calls by NOP and then the program will not be able to erase the PE header, maybe ?
PS: I can't patch the dumped file via the original because there is no original the only executable I have is the CLR host in c++ and the dumped executable that is in C#.
I will appreciate any help, sorry for my bad English.