cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Windows Programming
Editing executables
Editing executables
Sep 1, 2012 at 3:35pm UTC
closed account (
DGvMDjzh
)
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?
Sep 1, 2012 at 4:24pm UTC
Athar
(4466)
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
Sep 1, 2012 at 7:16pm UTC
closed account (
DGvMDjzh
)
Awesome, it worked! :D
Sep 2, 2012 at 10:59am UTC
modoran
(2077)
You can write any content to the end of the executable file itself. Windows loader does not have any problems running such executables.
Sep 2, 2012 at 11:39am UTC
kbw
(9488)
You can also make space with a custom resource and find it at runtime with FindResource.
Topic archived. No new replies allowed.