mistake
·
Wargame/pwnable.kr
1. intro 2. code 및 분석 2.1. code #include #include #define PW_LEN 10 #define XORKEY 1 void xor(char* s, int len){ int i; for(i=0; i 0)){ printf("read error\n"); close(fd); return 0; } char pw_buf2[PW_LEN+1]; printf("input password : "); scanf("%10s", pw_buf2); // xor your input xor(pw_buf2, 10); if(!strncmp(pw_buf, pw_buf2, PW_LEN)){ printf("Password OK\n"); system("/bin/cat flag\n"); } else{ pri..
input
·
Wargame/pwnable.kr
1. intro 2. code 및 분석 2.1. code #include #include #include #include #include int main(int argc, char* argv[], char* envp[]){ printf("Welcome to pwnable.kr\n"); printf("Let's see if you know how to give input to program\n"); printf("Just give me correct inputs then you will get the flag :)\n"); // argv if(argc != 100) return 0; if(strcmp(argv['A'],"\x00")) return 0; if(strcmp(argv['B'],"\x20\x0a\..
random
·
Wargame/pwnable.kr
1. intro 2. code 및 분석 2.1. code #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; } 2.2. 분석 단순히 랜덤값과 입력받은 키 값의 xor 값이 deadbeef면 플래그를 준다. 3. 취약점 확인 및 공격 준비 3.1. 취약점 씨드가 없는 랜덤값은 항상..
passcode
·
Wargame/pwnable.kr
1. intro 2. code 및 분석 2.1. code #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"..
bof
·
Wargame/pwnable.kr
1. intro 2. code 및 분석 2.1. code #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; } 2.2. 분석 main 함수에서 0xdeadbeef 의 값과 함께 func 함수를 실행한다. func 변수에서는 32 bytes의 overflowme 변수를 선언하고 여기에 값을 입력 받는..
collision
·
Wargame/pwnable.kr
1. intro 2. code 및 분석 2.1. code #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
fd
·
Wargame/pwnable.kr
1. intro 2. code 및 분석 2.1. code #include #include #include char buf[32]; int main(int argc, char* argv[], char* envp[]){ if(argc python3 a.py [+] Connecting to pwnable.kr on port 2222: Done [*] fd@pwnable.kr: Distro Ubuntu 16.04 OS: linux Arch: amd64 Version: 4.4.179 ASLR: Enabled [+] Starting remote process bytearray(b'./fd') on pwnable.kr: pid 406811 good job :) ----------#플래그는 삭제
Broken Tetris
·
Wargame/Dreamhack
보호되어 있는 글입니다.
MSNW
·
Wargame/Dreamhack
보호되어 있는 글입니다.
크리스마스에 쓰는 일기.
·
Diary
자체평가 : ★★★★☆ 결국 부서 이동을 하였다. 한동안 일을 새로 배워야하니 해킹 공부는 잠시 소홀해지지 않을까 생각한다. 다만, 내년 목표였던 것들 조기에 많이 이루었기에 크게 부담은 없을 것 같다. 이번 달 공부는 거의 하지 못했다. 그 이유는 계획에 없던 dreamhack christmas CTF 문제 출제를 하게 되었기 때문이다. 출제할 자격이 되지 않은 상태에서 지원하였는데, 어쩌다보니 아슬아슬하게 기준을 맞추게 되었다. 드림핵 기준 난이도 2~3 정도의 문제를 출제하려고 생각하고 2 문제를 출제하게 되었는데, 출제한 문제들이 적당히 많은 분들이 풀어주셔서, 너무 많은 인원들이 푼 문제는 아니게되어서 만족스러웠다. 또한 개인적으로 배운점, 느낀점이 많았는데, 아무래도 git 사용법을 조금 알게..