[root@localhost reversing.kr]# gdb ./Easy_ELF
(gdb) set disassembly-flavor intel //어셈블리어 출력방식을 intel로
(gdb) x/13i 0x08048380 //0x08048380부터 13줄 어셈블리어로 출력
0x8048380: xor ebp,ebp
0x8048382: pop esi
0x8048383: mov ecx,esp
0x8048385: and esp,0xfffffff0
0x8048388: push eax
0x8048389: push esp
0x804838a: push edx
0x804838b: push 0x80485f0
0x8048390: push 0x8048580
0x8048395: push ecx
0x8048396: push esi
0x8048397: push 0x804851b //요게 일반적으로 main함수
0x804839c: call 0x8048350 <__libc_start_main@plt>
(gdb) x/22i 0x0804851b
0x804851b: push ebp
0x804851c: mov ebp,esp
0x804851e: and esp,0xfffffff0
0x8048521: sub esp,0x10
0x8048524: mov DWORD PTR [esp+0x8],0x17
0x804852c: mov DWORD PTR [esp+0x4],0x804865d
0x8048534: mov DWORD PTR [esp],0x1
0x804853b: call 0x8048360 <write@plt> //"Reversing.kr Easy ELF"출력
0x8048540: call 0x8048434
0x8048545: call 0x8048451 //문제 함수
0x804854a: cmp eax,0x1
0x804854d: jne 0x804855b
0x804854f: call 0x80484f7
0x8048554: mov eax,0x0
0x8048559: jmp 0x804857c
0x804855b: mov DWORD PTR [esp+0x8],0x6
0x8048563: mov DWORD PTR [esp+0x4],0x8048675
0x804856b: mov DWORD PTR [esp],0x1
0x8048572: call 0x8048360 <write@plt>
0x8048577: mov eax,0x0
0x804857c: leave
0x804857d: ret
(gdb) x/44i 0x08048451
0x8048451: push ebp
0x8048452: mov ebp,esp
0x8048454: movzx eax,BYTE PTR ds:0x804a021
0x804845b: cmp al,0x31
0x804845d: je 0x8048469
0x804845f: mov eax,0x0
0x8048464: jmp 0x80484f5
...
(gdb) b *0x0804845b //break
Breakpoint 1 at 0x804845b
(gdb) r //run
Starting program: /home/reversing.kr/Easy_ELF
Reversing.Kr Easy ELF
TEST
Breakpoint 1, 0x0804845b in ?? ()
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.166.el6_7.3.i686
(gdb) i r eax //info registers eax
eax 0x45 69
(gdb) x/8bx 0x0804a020 //0x0804a020에서 8바이트를 바이트단위로 출력
0x804a020: 0x54 0x45 0x53 0x54 0x00 0x00 0x00 0x00