During the debugging process, I can use binary edit in order to add commands where I want, etc. However, I can't find any way to add an ASCII string at an address in which I can reference later. If I try to add something like: "hello", OllyDBG will just translate the bytes into commands and edit the assembly commands into the program.

Is there a way to just add the ASCII string into the program?


ollydbg v2

Ctrl+E -> Ascii -> "Hello" -> Enter and -> Ctrl+A (to make ollydbg understand its string not code )
:(colon) Label for later Reference

use CTRL+G and type the label name for

here is a screen shot of a partially matched label that follows

enter image description here

CPU Disasm
Address                                Hex dump          Command              Comments
00D13FC0 This Is My Newly Added String 48 65 6C 6C 6F 00 ASCII "Hello",0;ASCII "Hello"

ollydbg 1 RightClick -> Analysis -> During Next Ananlysis Treat Selection As Ascii String


Most byte combinations make up valid opcodes. Its just a questions on how to interpret these bytes. You can use the hex view to check the bytes.

You can always use a hexeditor to modify data and code. If you want to 'add' the string, you may need to inflate the file and fix segment/section offsets of the file format you are using.

Possibly related question: Hexadecimal editing with and without ollydbg weird issue

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.