I tried to write a very simple mutating program the other day, but it keeps failing. Because my program uses addresses that are hardcoded in (I know, bad practice), you compiling the code would likely result in runtime errors anyway.
Therefore, my question is: does anybody have an example of an extremely simple self-modifying ASM program? I'd also like to know if there's a way that doesn't involve hardcoded addresses.
My program was basically:
I keep getting "read error of memory [0xFFFFFFFF]" when I try writing to the code segment (this is in OllyDBG)Code:unsigned int testvar = 0; __asm { write code that made testvar=0xFFFFFFFF; execute code; } cout << testvar << endl;


LinkBack URL
About LinkBacks




Reply With Quote



Bookmarks
Algorithms and Data Structures
Java tutorials
Algorithms Forum