Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Preventing execution of new modules?

Name: Anonymous 2007-08-07 11:24 ID:moUX8Cqg

Hello. #C++ failed me.
How would I got about preventing execution of code in new modules (injected DLLs, etc.)?

Thanks.

Name: Anonymous 2007-08-08 14:20 ID:6T5Swqs9

Get lost.

1. If you are trying to prevent hacks / cheats, do not even try. You can not prevent injection of code into any others process memory. If you are thinking of deliberate hacks, you can never prevent them, in the best case your program will get "fixed" with a hex editor, even before it starts, including the code that checks if the app is correct (CRC check).

2. If you are trying to prevent "user code" from crashing the dethronement, you can make a number of problems by installing custom error handlers in the OS. But it will never be safe. Take for example:

char* hello = "Hello";
for (int i = 5; i > -100; i--)
{
  hello[i] = 0;
}

This piece of code will corrupt the stack, event before it raises a access violation. Now what?! You do not have a valid return address to return to?

All in all, do not try to prevent the things you can not prevent. If you are thinking DRM / cheat prevention, the best is none at all. The point is your implementation will be circumvented in under two weeks, hence useless. Those you try to protect your app from will not be stopped and those that rightfully use your app will curse you to death, because of the odd side behaviors.


Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List