Editing executables
Skirmant (37)
Sep 1, 2012 at 3:35pm UTC
I thought of an interesting alternative to registry, but I'm not sure how to pull it off.
The idea is declare an empty global variable, somehow get it's position in the .exe file and then edit the content remotely with another program.
Is there a way to get the variables position? And if there is, would it work?
Athar (4383)
Sep 1, 2012 at 4:24pm UTC
Is there a way to get the variables position?
You can search for the value in the data segment using a hex editor. Give it some distinct value to make this easier (e.g. 1163019592 if it is a 32-bit integer).
And if there is, would it work?
Yes, certainly. Be aware of optimizations, though.
Last edited on Sep 1, 2012 at 4:26pm UTC
modoran (1101)
Sep 2, 2012 at 10:59am UTC
You can write any content to the end of the executable file itself. Windows loader does not have any problems running such executables.
kbw (5375)
Sep 2, 2012 at 11:39am UTC
You can also make space with a custom resource and find it at runtime with FindResource.
Topic archived. No new replies allowed.