I was trying to speed up my VM for Aphrodite by translating the bytecode and ran across the following technique to create amd execute self-modifying code.
The won't work on Windows Vista/7 if DEP is turned on, but then it's off by default for non-system applications anyway.
Here's some C examples that copies functions to the heap and executes them.
ran across the following technique to create amd execute self-modifying code.
The won't work on Windows Vista/7 if DEP is turned on, but then it's off by default for
non-system applications anyway.
Here's some C examples that copies functions to the heap and executes them.
For Windows:
For Linux/Cygwin: