-
[HackerSchool] Level14오래된/HackerSchool 2011. 5. 10. 04:01
[level14@ftz level14]$ cat hint
레벨14 이후로는 mainsource의 문제를 그대로 가져왔습니다.
버퍼 오버플로우, 포맷스트링을 학습하는데는 이 문제들이
최고의 효과를 가져다줍니다.#include <stdio.h>
#include <unistd.h>
main()
{ int crap;
int check;
char buf[20];
fgets(buf,45,stdin);
if (check==0xdeadbeef)
{
setreuid(3095,3095);
system("/bin/sh");
}
}[ level14 hint ]
단순 Buffer Overflow 문제이다. 쉘을 올릴 필요도 없다.
문제 풀이 방법이라면 Level12 를 참조하면 되겠다.'오래된 > HackerSchool' 카테고리의 다른 글
[HackerSchool] Level16 (0) 2011.05.10 [HackerSchool] Level15 (0) 2011.05.10 [HackerSchool] Level13 (0) 2011.05.10 [HackerSchool] Level12 (0) 2011.05.06 [HackerSchool] Level11 (0) 2011.04.29