Quantcast
Channel: Other – Michał Szałkowski – Blog
Viewing all articles
Browse latest Browse all 125

Reverse Engineering 2

$
0
0

#include <stdio.h>
int main() {
   printf("Lorem");
   return 0;
}
gcc -w example1.c -o example1
objdump -D example1 > example1.source
00000000004005d0 <_IO_stdin_used>:
  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 <_IO_stdin_used+0x6d>
  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

Viewing all articles
Browse latest Browse all 125

Trending Articles