-
[HackerSchool] Level17오래된/HackerSchool 2011. 5. 10. 05:10
#include <stdio.h>
void printit() {
printf("Hello there!\n");
}
main()
{ int crap;
void (*call)()=printit;
char buf[20];
fgets(buf,48,stdin);
setreuid(3098,3098);
call();
}[ level17 hint ]
이번 문제는 level16 문제에서 shell 을 실행 시켜주는 함수만 빠진 상태다. 따라서, 쉘 코드를 환경변수에 올려놓고 그 주소로 모두 덮어씌어 문제를 해결할 수 있다.'오래된 > HackerSchool' 카테고리의 다른 글
[HackerSchool] Level19 (0) 2011.05.10 [HackerSchool] Level18 (0) 2011.05.10 [HackerSchool] Level16 (0) 2011.05.10 [HackerSchool] Level15 (0) 2011.05.10 [HackerSchool] Level14 (0) 2011.05.10