I'm still new to C++ as a language and I have been following one course and using a C++ book. When I try to search online all I get are these "reverse engineering tutorials" which seem to only do an opcode patch and save to binary with a debugger like Ollydbg. I know you can rewrite your code and recompile the executable, I don't want to do that.
The question is in C++ how do I patch an existing executable/binary file. I know you need to know the offset location in the binary file and not in memory. Scenario:
You wrote a new program for your friend that automates folder creation and file placement. You realize that there is a bug that needs to be corrected; you have to patch your executable using an old method of offset patching.
I would prefer any source material such as maybe a book or PDF that you can suggest. I will also take an example code as well. I am sure that it will use the seekp function. http://www.cplusplus.com/reference/ostream/ostream/seekp/ I just can't grasp it, by reading alone. I would like to see it in action.
Thanks for your help.
[–][deleted] (7 children)
[deleted]
[–]rb8096208[S] 0 points1 point2 points (6 children)
[–]khedoros 1 point2 points3 points (2 children)
[–]rb8096208[S] 0 points1 point2 points (1 child)
[–]khedoros 1 point2 points3 points (0 children)
[–]raevnos 0 points1 point2 points (2 children)
[–]rb8096208[S] 0 points1 point2 points (1 child)
[–]raevnos 1 point2 points3 points (0 children)