목록2019/02 (26)
White Security
Mommy, I wanna play a game! (if your network response time is too slow, try nc 0 9007 inside pwnable.kr server) Running at : nc pwnable.kr 9007 Toddler's Bottle 11번 문제 이 문제는 보안 문제라기 보다는 코딩 문제에 가깝습니다. 알고리즘을 배우고 한동안 쓸일이 없었는데 활용할 기회가 생겨 즐겁더군요. fd@ubuntu:/tmp/Posix/coin1$ nc localhost 9007 --------------------------------------------------- - Shall we play a game? - ---------------------------------..
Mommy, there was a shocking news about bash. I bet you already know, but lets just make it sure :) ssh shellshock@pwnable.kr -p2222 (pw:guest) 쉘 쇼크는 2014년에 발표된 Bash 환경변수 설정 관련 취약점으로 동일년도에 발표된 하트 블리드 보다도 심각하다고 진단 되었습니다. 쉘쇼크 취약점이란 무엇인지 간단하게 개념 설명을 하고 넘어 가겠습니다. shellshock@ubuntu:~$ foo() { echo hello; } shellshock@ubuntu:~$ foo hello Bash 에서는 함수를 작성할 수 있습니다. 여타 언어들과 유사하게 중괄호 사이에 명령문을 삽입해 주는 것으로 선언이..
We all make mistakes, let's move on. (don't take this too seriously, no fancy hacking skill is required at all) This task is based on real event Thanks to dhmonkey hint : operator priority ssh mistake@pwnable.kr -p2222 (pw:guest) Toddler's Bottle 9번 문제. 코딩 오류를 찾아내는 문제로 연산자 우선순위와 관련이 있습니다. mistake@ubuntu:~$ ls -l total 24 -r-------- 1 mistake_pwn root 51 Jul 29 2014 flag -r-sr-x--- 1 mistake_pwn ..
Daddy told me I should study arm. But I prefer to study my leg! Download : http://pwnable.kr/bin/leg.c Download : http://pwnable.kr/bin/leg.asm ssh leg@pwnable.kr -p2222 (pw:guest) Toddler's Bottle 8번 문제. ARM Assembly 의 반대를 Leg 라고 표현하는 고급 유머가 들어있습니다. ssh 에 접속하게 되면 busybox 환경으로 기본 명령어들을 제외하고는 대부분 사용이 불가능하므로 소스를 읽고 풀어내야 합니다. #include #include int key1(){ asm("mov r3, pc\n"); } int key2(){ asm( "pu..
Mom? how can I pass my input to a computer program? ssh input2@pwnable.kr -p2222 (pw:guest) Toddler's Bottle 7번 문제. 설명대로 입출력 제어와 관련된 문제입니다. #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 :)\..
Daddy, teach me how to use random value in programming! ssh random@pwnable.kr -p2222 (pw:guest) 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; } rand() ..
Mommy told me to make a passcode based login system. My initial C code was compiled without any error! Well, there was some compiler warning, but who cares about that? ssh passcode@pwnable.kr -p2222 (pw:guest) Toddler's Bottle 5번 문제입니다. c 언어로 작성한 로그인 프로그램에 문제가 있다고 하네요. #include #include void login(){ int passcode1; int passcode2; printf("enter passcode1 : "); scanf("%d", passcode1); fflush(stdin..
Papa brought me a packed present! let's open it. Download : http://pwnable.kr/bin/flag This is reversing task. all you need is binary Toddler's Bottle 4번 문제입니다. papa가 packed present 를 주셨다고 하는데요. 바이너리만으로 풀 수 있는 리버싱 문제라고 합니다. [root@centos7 ~]# ./flag I will malloc() and strcpy the flag there. take it. 주어진 바이너리를 실행해 보면 malloc() 과 strcpy 함수를 사용하여 플래그를 복사하고 있다는 힌트를 줍니다. (gdb) info file Symbols from "..