목록분류 전체보기 (103)
White Security
Mommy! I made a lotto program for my homework. do you want to play? ssh lotto@pwnable.kr -p2222 (pw:guest) Toddler's Bottle 13번 문제 로또 프로그램에 관한 문제로 ssh 계정이 주어집니다. #include #include #include #include unsigned char submit[6]; void play(){ int i; printf("Submit your 6 lotto bytes : "); fflush(stdout); int r; r = read(0, submit, 6); printf("Lotto Start!\n"); //sleep(1); // generate lotto numbers int ..
Hey! check out this C implementation of blackjack game! I found it online * http://cboard.cprogramming.com/c-programming/114023-simple-blackjack-program.html I like to give my flags to millionares. how much money you got? Running at : nc pwnable.kr 9009 Toddler's Bottle 12번 문제 블랙잭 게임의 소스코드와 Netcat 접속을 위한 주소가 주어집니다. int betting() //Asks user amount to bet { printf("\n\nEnter Bet: $"); scanf("%d",..
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() ..