Let’s just take a simple “Hello, World!” program written in C, and change it to say “Hello, Terry!” (Or insert your own name, unless you really like me).
The point of this exercise is to show how easy it can be to edit source code, which can have a huge effect. You have the ability to modify anything from simple program output, conditional statements, password verification checks, and much more.The ability to modify a programs source code allows you to gain full control over the program. Some areas will be simple to modify, while others can take an immensely large amount of time to even figure out where to look. Let's get started.
We will begin by writing and compiling the code below for the Hello program and compile it using GCC (or your favorite C compiler).
Next, we will open the program in Radare2 in write mode via the command "r2 -w HelloWorld". If you wish to play around within it rather than modifying the source code directly, we can skip opening it in