전체 글

전체 글

    shellshock

    1. intro 2. code 및 분석 2.1. code #include int main(){ setresuid(getegid(), getegid(), getegid()); setresgid(getegid(), getegid(), getegid()); system("/home/shellshock/bash -c 'echo shock_me'"); return 0; } 2.2. 분석 흠... 초반이라 그런가... 문제가 영 재미가 없네 ;;; 파일 권한으로 set하고 shock_me 라는 메시지를 출력한다. 3. 취약점 확인 및 공격 준비 3.1. 취약점 CVE-2014-6271 3.2. 공격 준비 뭐...없다 그냥 CVE 취약점이라.... 요약하자면 실행하려하는 bash 명령어를 환경변수에 등록하여 이를 함..

    mistake

    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

    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

    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

    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

    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

    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

    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

    보호되어 있는 글입니다.

    MSNW

    보호되어 있는 글입니다.