1579, 3/79 회원가입  로그인  
   hayanho
   어셈 아~~~~~~~주 모르시는분들을 위한 -_-;;

http://www.hackerschool.org/HS_Boards/zboard.php?id=Free_Lectures&no=287 [복사]


제가 어셈을 너무 모르기에 아주 허접한 방법으로 공부를 하고 있는데
저같은 분이 계시다면 참고하시라고 남겨요 -_-;;
(그냥버리기 아까워서 올린거라는 퍽!...)

맨위에꺼는 esp와 ebp의 변화를 적은거고요
중간에꺼는 main disassm 한거 적은거고요.
아래꺼는  info reg로 reg에 들어있는값 적은거에요.
문서파일 세개여셔서 한줄 한줄 비교하면서 보시면
대충 감이 오실꺼에요...  (저만그런지도-_-;;)

esp            0xbffffafc       0xbffffafc
ebp            0xbffffb18       0xbffffb18

esp            0xbffffaf8       0xbffffaf8
ebp            0xbffffb18       0xbffffb18

esp            0xbffffaf8       0xbffffaf8
ebp            0xbffffaf8       0xbffffaf8

esp            0xbffff9f0       0xbffff9f0
ebp            0xbffffaf8       0xbffffaf8

esp            0xbffff9e8       0xbffff9e8
ebp            0xbffffaf8       0xbffffaf8

esp            0xbffff9e4       0xbffff9e4
ebp            0xbffffaf8       0xbffffaf8

esp            0xbffff9e0       0xbffff9e0
ebp            0xbffffaf8       0xbffffaf8

esp            0xbffff9e0       0xbffff9e0
ebp            0xbffffaf8       0xbffffaf8

esp            0xbffff9f0       0xbffff9f0
ebp            0xbffffaf8       0xbffffaf8

esp            0xbffff9e8       0xbffff9e8
ebp            0xbffffaf8       0xbffffaf8

esp            0xbffff9e8       0xbffff9e8
ebp            0xbffffaf8       0xbffffaf8

esp            0xbffff9e8       0xbffff9e8
ebp            0xbffffaf8       0xbffffaf8

esp            0xbffff9e4       0xbffff9e4
ebp            0xbffffaf8       0xbffffaf8

esp            0xbffff9e4       0xbffff9e4
ebp            0xbffffaf8       0xbffffaf8

esp            0xbffff9e0       0xbffff9e0
ebp            0xbffffaf8       0xbffffaf8

esp            0xbffff9e0       0xbffff9e0
ebp            0xbffffaf8       0xbffffaf8

esp            0xbffff9f0       0xbffff9f0
ebp            0xbffffaf8       0xbffffaf8

esp            0xbffff9e4       0xbffff9e4
ebp            0xbffffaf8       0xbffffaf8

esp            0xbffff9e4       0xbffff9e4
ebp            0xbffffaf8       0xbffffaf8

esp            0xbffff9e0       0xbffff9e0
ebp            0xbffffaf8       0xbffffaf8

esp            0xbffff9e0       0xbffff9e0
ebp            0xbffffaf8       0xbffffaf8

esp            0xbffff9f0       0xbffff9f0
ebp            0xbffffaf8       0xbffffaf8

esp            0xbffffafc       0xbffffafc
ebp            0xbffffb18       0xbffffb18

esp            0xbffffb00       0xbffffb00
ebp            0xbffffb18       0xbffffb18

0x08048470 <main+0>:    push   %ebp
0x08048471 <main+1>:    mov    %esp,%ebp
0x08048473 <main+3>:    sub    $0x108,%esp
0x08048479 <main+9>:    sub    $0x8,%esp
0x0804847c <main+12>:   push   $0xc14
0x08048481 <main+17>:   push   $0xc14
0x08048486 <main+22>:   call   0x804834c <setreuid>
0x0804848b <main+27>:   add    $0x10,%esp
0x0804848e <main+30>:   sub    $0x8,%esp
0x08048491 <main+33>:   mov    0xc(%ebp),%eax
0x08048494 <main+36>:   add    $0x4,%eax
0x08048497 <main+39>:   pushl  (%eax)
0x08048499 <main+41>:   lea    0xfffffef8(%ebp),%eax
0x0804849f <main+47>:   push   %eax
0x080484a0 <main+48>:   call   0x804835c <strcpy>
0x080484a5 <main+53>:   add    $0x10,%esp
0x080484a8 <main+56>:   sub    $0xc,%esp
0x080484ab <main+59>:   lea    0xfffffef8(%ebp),%eax
0x080484b1 <main+65>:   push   %eax
0x080484b2 <main+66>:   call   0x804833c <printf>
0x080484b7 <main+71>:   add    $0x10,%esp
0x080484ba <main+74>:   leave
---Type <return> to continue, or q <return> to quit---
0x080484bb <main+75>:   ret
0x080484bc <main+76>:   nop
0x080484bd <main+77>:   nop
0x080484be <main+78>:   nop
0x080484bf <main+79>:   nop
End of assembler dump.

Breakpoint 1, 0x08048470 in main ()
(gdb) info reg
eax            0x2      2
ecx            0x40156a0c       1075145228
edx            0x8049538        134518072
ebx            0x401591c0       1075155392
esp            0xbffffafc       0xbffffafc
ebp            0xbffffb18       0xbffffb18
esi            0x40015360       1073828704
edi            0xbffffb44       -1073743036
eip            0x8048470        0x8048470
eflags         0x246    582

Breakpoint 2, 0x08048471 in main ()
(gdb) info reg
eax            0x2      2
ecx            0x40156a0c       1075145228
edx            0x8049538        134518072
ebx            0x401591c0       1075155392
esp            0xbffffaf8       0xbffffaf8
ebp            0xbffffb18       0xbffffb18
esi            0x40015360       1073828704
edi            0xbffffb44       -1073743036
eip            0x8048471        0x8048471
eflags         0x346    838

Breakpoint 3, 0x08048473 in main ()
(gdb) info reg
eax            0x2      2
ecx            0x40156a0c       1075145228
edx            0x8049538        134518072
ebx            0x401591c0       1075155392
esp            0xbffffaf8       0xbffffaf8
ebp            0xbffffaf8       0xbffffaf8
esi            0x40015360       1073828704
edi            0xbffffb44       -1073743036
eip            0x8048473        0x8048473
eflags         0x346    838

Breakpoint 4, 0x08048479 in main ()
(gdb) info reg
eax            0x2      2
ecx            0x40156a0c       1075145228
edx            0x8049538        134518072
ebx            0x401591c0       1075155392
esp            0xbffff9f0       0xbffff9f0
ebp            0xbffffaf8       0xbffffaf8
esi            0x40015360       1073828704
edi            0xbffffb44       -1073743036
eip            0x8048479        0x8048479
eflags         0x386    902

Breakpoint 5, 0x0804847c in main ()
(gdb) info reg
eax            0x2      2
ecx            0x40156a0c       1075145228
edx            0x8049538        134518072
ebx            0x401591c0       1075155392
esp            0xbffff9e8       0xbffff9e8
ebp            0xbffffaf8       0xbffffaf8
esi            0x40015360       1073828704
edi            0xbffffb44       -1073743036
eip            0x804847c        0x804847c
eflags         0x396    918

Breakpoint 6, 0x08048481 in main ()
(gdb) info reg
eax            0x2      2
ecx            0x40156a0c       1075145228
edx            0x8049538        134518072
ebx            0x401591c0       1075155392
esp            0xbffff9e4       0xbffff9e4
ebp            0xbffffaf8       0xbffffaf8
esi            0x40015360       1073828704
edi            0xbffffb44       -1073743036
eip            0x8048481        0x8048481
eflags         0x396    918

Breakpoint 7, 0x08048486 in main ()
(gdb) info reg
eax            0x2      2
ecx            0x40156a0c       1075145228
edx            0x8049538        134518072
ebx            0x401591c0       1075155392
esp            0xbffff9e0       0xbffff9e0
ebp            0xbffffaf8       0xbffffaf8
esi            0x40015360       1073828704
edi            0xbffffb44       -1073743036
eip            0x8048486        0x8048486
eflags         0x396    918

Breakpoint 8, 0x0804848b in main ()
(gdb) info reg
eax            0xffffffff       -1
ecx            0x40159580       1075156352
edx            0x40159580       1075156352
ebx            0x401591c0       1075155392
esp            0xbffff9e0       0xbffff9e0
ebp            0xbffffaf8       0xbffffaf8
esi            0x40015360       1073828704
edi            0xbffffb44       -1073743036
eip            0x804848b        0x804848b
eflags         0x397    919

Breakpoint 9, 0x0804848e in main ()
(gdb) info reg
eax            0xffffffff       -1
ecx            0x40159580       1075156352
edx            0x40159580       1075156352
ebx            0x401591c0       1075155392
esp            0xbffff9f0       0xbffff9f0
ebp            0xbffffaf8       0xbffffaf8
esi            0x40015360       1073828704
edi            0xbffffb44       -1073743036
eip            0x804848e        0x804848e
eflags         0x386    902

Breakpoint 10, 0x08048491 in main ()
(gdb) info reg
eax            0xffffffff       -1
ecx            0x40159580       1075156352
edx            0x40159580       1075156352
ebx            0x401591c0       1075155392
esp            0xbffff9e8       0xbffff9e8
ebp            0xbffffaf8       0xbffffaf8
esi            0x40015360       1073828704
edi            0xbffffb44       -1073743036
eip            0x8048491        0x8048491
eflags         0x396    918

Breakpoint 11, 0x08048494 in main ()
(gdb) info reg
eax            0xbffffb44       -1073743036
ecx            0x40159580       1075156352
edx            0x40159580       1075156352
ebx            0x401591c0       1075155392
esp            0xbffff9e8       0xbffff9e8
ebp            0xbffffaf8       0xbffffaf8
esi            0x40015360       1073828704
edi            0xbffffb44       -1073743036
eip            0x8048494        0x8048494
eflags         0x396    918

Breakpoint 12, 0x08048497 in main ()
(gdb) info reg
eax            0xbffffb48       -1073743032
ecx            0x40159580       1075156352
edx            0x40159580       1075156352
ebx            0x401591c0       1075155392
esp            0xbffff9e8       0xbffff9e8
ebp            0xbffffaf8       0xbffffaf8
esi            0x40015360       1073828704
edi            0xbffffb44       -1073743036
eip            0x8048497        0x8048497
eflags         0x386    902

Breakpoint 13, 0x08048499 in main ()
(gdb) info reg
eax            0xbffffb48       -1073743032
ecx            0x40159580       1075156352
edx            0x40159580       1075156352
ebx            0x401591c0       1075155392
esp            0xbffff9e4       0xbffff9e4
ebp            0xbffffaf8       0xbffffaf8
esi            0x40015360       1073828704
edi            0xbffffb44       -1073743036
eip            0x8048499        0x8048499
eflags         0x386    902

break 14,
info reg

eax            0xbffff9f0       -1073743376
ecx            0x40159580       1075156352
edx            0x40159580       1075156352
ebx            0x401591c0       1075155392
esp            0xbffff9e4       0xbffff9e4
ebp            0xbffffaf8       0xbffffaf8
esi            0x40015360       1073828704
edi            0xbffffb44       -1073743036
eip            0x804849f        0x804849f
eflags         0x386    902

Breakpoint 15, 0x080484a0 in main ()
(gdb) info reg
eax            0xbffff9f0       -1073743376
ecx            0x40159580       1075156352
edx            0x40159580       1075156352
ebx            0x401591c0       1075155392
esp            0xbffff9e0       0xbffff9e0
ebp            0xbffffaf8       0xbffffaf8
esi            0x40015360       1073828704
edi            0xbffffb44       -1073743036
eip            0x80484a0        0x80484a0
eflags         0x386    902

Breakpoint 16, 0x080484a5 in main ()
(gdb) info reg
eax            0xbffff9f0       -1073743376
ecx            0xfffffda9       -599
edx            0xbffffc4b       -1073742773
ebx            0x401591c0       1075155392
esp            0xbffff9e0       0xbffff9e0
ebp            0xbffffaf8       0xbffffaf8
esi            0x40015360       1073828704
edi            0xbffffb44       -1073743036
eip            0x80484a5        0x80484a5
eflags         0x346    838

Breakpoint 17, 0x080484a8 in main ()
(gdb) info reg
eax            0xbffff9f0       -1073743376
ecx            0xfffffda9       -599
edx            0xbffffc4b       -1073742773
ebx            0x401591c0       1075155392
esp            0xbffff9f0       0xbffff9f0
ebp            0xbffffaf8       0xbffffaf8
esi            0x40015360       1073828704
edi            0xbffffb44       -1073743036
eip            0x80484a8        0x80484a8
eflags         0x386    902

Breakpoint 18, 0x080484ab in main ()
(gdb) info reg
eax            0xbffff9f0       -1073743376
ecx            0xfffffda9       -599
edx            0xbffffc4b       -1073742773
ebx            0x401591c0       1075155392
esp            0xbffff9e4       0xbffff9e4
ebp            0xbffffaf8       0xbffffaf8
esi            0x40015360       1073828704
edi            0xbffffb44       -1073743036
eip            0x80484ab        0x80484ab
eflags         0x396    918

Breakpoint 19, 0x080484b1 in main ()
(gdb) info reg
eax            0xbffff9f0       -1073743376
ecx            0xfffffda9       -599
edx            0xbffffc4b       -1073742773
ebx            0x401591c0       1075155392
esp            0xbffff9e4       0xbffff9e4
ebp            0xbffffaf8       0xbffffaf8
esi            0x40015360       1073828704
edi            0xbffffb44       -1073743036
eip            0x80484b1        0x80484b1
eflags         0x396    918

Breakpoint 20, 0x080484b2 in main ()
(gdb) info reg
eax            0xbffff9f0       -1073743376
ecx            0xfffffda9       -599
edx            0xbffffc4b       -1073742773
ebx            0x401591c0       1075155392
esp            0xbffff9e0       0xbffff9e0
ebp            0xbffffaf8       0xbffffaf8
esi            0x40015360       1073828704
edi            0xbffffb44       -1073743036
eip            0x80484b2        0x80484b2
eflags         0x396    918

Breakpoint 21, 0x080484b7 in main ()
(gdb) info reg
eax            0x4      4
ecx            0x401575c0       1075148224
edx            0x4      4
ebx            0x401591c0       1075155392
esp            0xbffff9e0       0xbffff9e0
ebp            0xbffffaf8       0xbffffaf8
esi            0x40015360       1073828704
edi            0xbffffb44       -1073743036
eip            0x80484b7        0x80484b7
eflags         0x346    838

Breakpoint 22, 0x080484ba in main ()
(gdb) info reg
eax            0x4      4
ecx            0x401575c0       1075148224
edx            0x4      4
ebx            0x401591c0       1075155392
esp            0xbffff9f0       0xbffff9f0
ebp            0xbffffaf8       0xbffffaf8
esi            0x40015360       1073828704
edi            0xbffffb44       -1073743036
eip            0x80484ba        0x80484ba
eflags         0x386    902

Breakpoint 23, 0x080484bb in main ()
(gdb) info reg
eax            0x4      4
ecx            0x401575c0       1075148224
edx            0x4      4
ebx            0x401591c0       1075155392
esp            0xbffffafc       0xbffffafc
ebp            0xbffffb18       0xbffffb18
esi            0x40015360       1073828704
edi            0xbffffb44       -1073743036
eip            0x80484bb        0x80484bb
eflags         0x386    902

0x40038917 in __libc_start_main () from /lib/libc.so.6
(gdb) info reg
eax            0x4      4
ecx            0x401575c0       1075148224
edx            0x4      4
ebx            0x401591c0       1075155392
esp            0xbffffb00       0xbffffb00
ebp            0xbffffb18       0xbffffb18
esi            0x40015360       1073828704
edi            0xbffffb44       -1073743036
eip            0x40038917       0x40038917
eflags         0x386    902

  Hit : 9416     Date : 2005/08/08 02:30
[불법/스팸글로 신고하기]



    
toy0506 아나..이런건 쥐약인데 -ㅅ-;; 알게되면 참고할게요;;ㅎ 2005/09/28  
zinclo 복잡하지만 자료정말 감사드려요`ㅋ 2005/10/06  
prosager 설명이 없으면 이건 강좌가 되기엔 약간 부족하네요..^^ 2005/10/07  
허허허 이게뭐죠 ㅡㅜ 2005/10/08
saiby32 뭘까.. ㅠㅠ 2005/10/12  
그린나래 아~~~~~~주모르는사람들을 위한 자료치고는;; 뭐가뭔지 모르겠어요 2005/11/29  
이런 이거모냐?? 아주모르는사람 보는거 맛나? 2006/07/27
1539   아 또 가짜백신.. 또 펌;;; ㅠㅠ[3]     dkdkfjgh
12/03 5310
1538   아 vmware 을 어려워 하는 사람이 있내요 ㄷㄷ[3]     playground
03/06 5840
1537   앞으로 이어질 글에 대해서.....[2]     소유
10/06 6646
1536   어셈블리어 강좌 7편 마지막요 ㅎㅎ[3]     asdzxc301
12/13 8537
1535   어셈블리어 강좌 6편     asdzxc301
12/13 6975
1534   어셈블리어 강좌 5편     asdzxc301
12/13 18279
1533   어셈블리어 강좌 4편     asdzxc301
12/13 9481
1532   어셈블리어 강좌 3편     asdzxc301
12/13 7545
1531   어셈블리어 강좌 2편     asdzxc301
12/13 6795
1530   어셈블리어 강좌 1편[2]     asdzxc301
12/13 11536
1529   어셈블리어 총정리 강좌     asdzxc301
12/13 16617
1528   어셈블리어 총정리 강좌[8]     gnsehfvlr
05/09 8789
  어셈 아~~~~~~~주 모르시는분들을 위한 -_-;;[7]     hayanho
08/08 9415
1526   어떤분이 운영하시는 블로그인대 강추 입니다[6]     lsykoh2
01/17 5043
1525   암호란[1]     oldlove7
08/02 6292
1524   암호화 패킷 암호해석하는 것좀 도와주세요[5]     leewoongki
12/07 6939
1523   암호화[3]     leewoongki
12/07 5249
1522   알약`무료백신 `제2의 PC그린 사태`[10]     koresong
11/01 5944
1521   안드로이드SDK프로젝트 단기과정[1]     pshshs
02/17 4699
1520   안드로이드 보안 코딩 가이드 입니다.     oldlove7
12/11 6645
[1][2] 3 [4][5][6][7][8][9][10]..[79]

Copyright 1999-2021 Zeroboard / skin by Hackerschool.org / Secure Patch by Hackerschool.org & Wowhacker.com