Jump to content
Tuts 4 You

PAGE_EXECUTE_WRITECOPY As Anti-Debug Trick


waliedassar

Recommended Posts

This is due to Microsoft Visual Studio embedding an RT_MANIFEST (24, 0x18) resource in the final executable. This manifest requests a specific version of msvcrt.dll from your winsxs which is apparently not installed on your system.

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">

<dependency>

<dependentAssembly>

<assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.6195" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>

</dependentAssembly>

</dependency>

</assembly>

Install Microsoft Visual C++ redistributable 2005 or just set the RVA and Size of resource table in the PE to zero.

Or take this resource-less version of the demo.

http://code.google.c...Copy_Trick_.exe

Edited by waliedassar
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Minus the SxS attribute, easily changed in the project settings plus using static runtime so that although the resulting binary may be larger it will run on machines regardless of runtime installed.

HR,

Ghandi

  • Like 1
Link to comment
Share on other sites

A good point also, possibly even the better approach as it keeps the binary size down as well as linking against runtime that should exist on any XP+ machine.

HR,

Ghandi

Link to comment
Share on other sites

Sorry for the delayed reply, I said that because XP was the first OS which shipped with it factory, wasn't it? Correct me if i'm wrong but pre-XP the runtime had to be installed to be present, or so i thought, :/

HR,

Ghandi

Edited by ghandi
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...