1581, 5/80 회원가입  로그인  
   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 : 10926     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
1501   리눅스 네트워크 서버 및 웹서버 구축 방법을 강의[1]     sada18
10/16 9823
1500   자바 네트워크 프로그래밍 강의배우실분[2]     netwow1
12/14 11558
1499   꼭배우실길바람니다[5]     netwow1
12/14 15813
1498   오라클 Enterprise Edition Release 8.0[6]     netwow1
12/14 14033
1497   네트워크1급 자격증대비^^[5]     appleone
02/13 10384
1496   [요청자료] 네로(최신버전)에서 이미지 파일 굽기     blackcoder
02/28 9576
1495   리눅스 설치 + Windows설치(생초보에게 좋은 강좌)!![3]     승리의박성환
04/15 14853
1494   C언어로 만든 그래픽 프로그램[11]     승리의박성환
04/22 18672
1493   해커스랩 레벨 0 깨는 방법 - 시작하기[22]     불사
05/21 18243
1492   "해커가 되려면 무엇을 알아야 하나요?" 의 답변(발췌)[48]     mati
08/01 12830
  어셈 아~~~~~~~주 모르시는분들을 위한 -_-;;[7]     hayanho
08/08 10925
1490     [re] 윈도우, 틱 소리나면서 다운 되는 경우... 허접강좌     my1004
11/02 6788
1489   [삭제]     dkck311
09/19 8589
1488   TCP/IP 이해 안가시는 분들을 위하여...(자유게시판에 있는 것입니다...)[3]     idl0521
09/21 10373
1487   [펌]리눅스를 사용하는 컴퓨터에서의 무선랜 설치법[2]     idl0521
09/24 10494
1486   에그쉘 쓸줄 모르시는분..-_-필독[9]     은조
09/28 10798
1485   밑에 제가 올린 API 소스에 대해서.........     승리의박성환
10/02 8591
1484   사회공학[1]정의[7]     idl0521
10/05 7839
1483   사회공학[2](목표와 공격, 전화를 이용한 사회공학 공격)[7]     idl0521
10/06 8718
1482   리눅스 설치하기 - 기초편[5]     소유
10/06 11187
[1][2][3][4] 5 [6][7][8][9][10]..[80]

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