Search code examples
assemblyreverse-engineeringollydbg

Ollydbg - change string's first letter


I've written a small .exe program in C++.

int main()
{                         

    string myString = "Hello";
    printf("%s", myString);    
    return 0;
}

I need to use ollydbg in order to replace the first letter in the string and then print it. Alternatively, I can print a different string entirely. I've loaded the .exe file to ollydbg, found the execution are where printf is called, but cannot find the JMP command that leads to it.

How can overcome this? I've Googled for tutorials but did not find anything similar to this.

Thanks in advance.


Solution

  • You can find the string with Context menu->Search for->All referenced text strings

    In the same window with the references, there are the addresses which you can edit using CTRL+E (Binary edit)