/other/

Reverse Engineering 2

2017-08-10 23:53:04

#include 

<stdio.h>
int main() {
   printf("Lorem");
   return 0;
}
gcc -w example1.c -o example1
objdump -D example1 &gt; example1.source
00000000004005d0 &lt;_IO_stdin_used&gt;:
  4005d0:   01 00                   add    %eax,(%rax)
  4005d2:   02 00                   add    (%rax),%al
  4005d4:   4c 6f                   rex.WR outsl %ds:(%rsi),(%dx)
  4005d6:   72 65                   jb     40063d &lt;_IO_stdin_used+0x6d&gt;
  4005d8:   6d                      insl   (%dx),%es:(%rdi)
    ...

00 4c 6f 72 65 6d = Lorem

get rodata from file

objdump -s -j .rodata example1
Contents of section .rodata:
 4005d0 01000200 4c6f7265 6d00               ....Lorem. 

more way to read file

file example1
xxd example1