1580, 1/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 : 10724     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
     [공지] 강좌를 올리실 때는 말머리를 달아주세요^ㅡ^ [29] 멍멍 02/27 18276
1579   리눅스 커널 2.6 버전 이후의 LKM     jdo
07/25 204
1578   쉘코드 모음     해킹잘하고싶다
01/15 945
1577   Call by value VS Call by Reference     해킹잘하고싶다
01/15 432
1576   (꼼수) L.O.B 한방에 클리어하기[1]     해킹잘하고싶다
01/14 627
1575   towelroot.c (zip) 코멘팅.[1]     scube
08/18 3150
1574   levitator.c (안드로이드 루팅) 공격 분석 소스 코드 공유.[4]     scube
08/17 3161
1573   무료 정보보안 기술인재 양성 과정 교육생 모집     chanjung111
06/17 3913
1572   K-Shield 주니어 5기 모집     lrtk
06/17 3637
1571   [팁] 파이썬 2소스를 3으로 변경해주는 사이트[3]     한승재
05/13 3398
1570   구글 백링크 작업 질문요     wkatnxka
03/30 2928
1569   [팁] 우분투 미러링서버     한승재
03/09 3528
1568 비밀글입니다  감을못잡겠네요ㅜㅜ     잉잉잉
01/15 3
1567   데비안 계열 리눅스 의존성 깨졌을때 해결법     한승재
11/27 3941
1566   홍보합니다. 신생 보안커뮤니티입니다.     kimwoojin0952
10/26 3813
1565   신기한 프로그래밍 언어[3]     koreal33t
09/06 4161
1564   윈도우,리눅스에서 내 ip를 확인해 보자 [1]     koreal33t
09/06 3402
1563   CTF 사이트[1]     koreal33t
09/06 3977
1562   자격증 (문제)사이트 [2]     koreal33t
09/06 3842
1561   [퍼온글]리눅스 기본 명령어     한승재
06/06 4514
1 [2][3][4][5][6][7][8][9][10]..[79]

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