목록War Game/pwnable.kr (26)
tmxklab
1. 문제 확인 [random.c] #include int main(){ unsigned int random; random = rand();// random value! unsigned int key=0; scanf("%d", &key); if( (key ^ random) == 0xdeadbeef ){ printf("Good!\n"); system("/bin/cat flag"); return 0; } printf("Wrong, maybe you should try 2^32 cases.\n"); return 0; } 입력 값 key값과 random값을 xor한 결과 값이 0xdeadbeef랑 같으면 된다. 2. 접근 방법 random값을 가져올 때 seed값을 정하지 않고 걍 rand()리턴 값을 가져옴 ..
1. 문제 확인 [ passcode.c ] #include #include void login(){ int passcode1; int passcode2; printf("enter passcode1 : "); scanf("%d", passcode1); fflush(stdin); // ha! mommy told me that 32bit is vulnerable to bruteforcing :) printf("enter passcode2 : "); scanf("%d", passcode2); printf("checking...\n"); if(passcode1==338150 && passcode2==13371337){ printf("Login OK!\n"); system("/bin/cat flag"); } els..
1. 문제 확인 파일 다운받아서 리버싱하라고 한다. 다운ㄱㄱ 음 근데 디버깅이 실행이 안된다. 확인을 해보자 UPX로 패킹된 것 같다. 다음 링크에서 upx를 설치해주고 언패킹해보자 Release UPX 3.96 · upx/upx Please see the file NEWS for a detailed list of changes. Note: all versions are functionally equivalent, i.e. each version can handle all executable formats, so you only need the file that runs on ... github.com $wget https://github.com/upx/upx/releases/download/v3.96/..
1. 문제 확인 nc pwnable.kr 9000 [ bof.c ] #include #include #include void func(int key){ char overflowme[32]; printf("overflow me : "); gets(overflowme);// smash me! if(key == 0xcafebabe){ system("/bin/sh"); } else{ printf("Nah..\n"); } } int main(int argc, char* argv[]){ func(0xdeadbeef); return 0; } gets에서 bof가 발생한다. 그리고 bof파일은 32bit elf파일이다. 2. 접근 방법 unsigned int __cdecl func(int a1) { char s; //..
1. 문제 확인 col.c파일부터 확인해보자 [ col.c ] #include #include unsigned long hashcode = 0x21DD09EC; unsigned long check_password(const char* p){ int* ip = (int*)p; int i; int res=0; for(i=0; i