![]() ![]() Using objdump you can analyse the binary and how it is interacting with the CPU, in this case within a 圆4 architecture: minh-mint prog # objdump -M intel -D a.out | grep -A20 main.:Ĥ004fc: c7 45 fc 00 00 00 00 mov DWORD PTR ,0x0Ĥ0050f: 83 45 fc 01 add DWORD PTR ,0x1Ĥ00513: 83 7d fc 09 cmp DWORD PTR ,0x9 Depending on your choice of Linux distro, it may come pre-installed or you may need to manually install it. Objdump is contained in the binutils package in your distro. However, if you only have the compiled binary, what could we do to find out what the program is actually doing? With the use of a tool called objdump Generally, if you have the source code, performing reverse engineering to find out what the program does, can be done by trivially reading through the code. Hello, world! Hello, world! Hello, world! Hello, world! Hello, world! Hello, world! Hello, world! Hello, world! Hello, world! Hello, world! Such as gcc: minh-mint prog # gcc hello.c The next step is to compile the code using a compiler, The program simply prints out “Hello, World to the screen 10 times. Comments are shown by the use of // which are ignored by the compiler. This C program will begin with the execution of code at the function main(). Minh -mint prog # cat hello.c int main ( )
0 Comments
Leave a Reply. |