Forum: Community Center


Subject: Preventing usage of Warez

bazze opened this issue on Jan 12, 2007 · 84 posts


Talain posted Fri, 19 January 2007 at 11:00 PM

Quote - Only if the code has no reference to any data (only works with registers).

It can access any data that it knows the address of (though unless the program itself is capable of resolving memory references as it loads additional code into its own address space, the address of any data it accesses will need to be known at compile time).  It can certainly access the stack, through the esp register.

Code dynamically loaded by a program during execution is the same as code loaded by the operating system at load time - so long as the pages that the code is loaded to are executable.  Certain architectures (in particular, the x86) for the most part allow code to be executed from anywhere; others go to great lengths to insure that no page is allowed to be both writable and executable, which would make a scheme such as this impossible without some sort of awkward kludge.

Another possible way to do it would be to have an encrypted DLL that the program decrypts and then links to at runtime