전체 글
[Wargame.kr] php? c? 풀이 (291p)
php? c? view-source code do you know "integer type" of 32bit application? #include #include void nono(); int main(int argc,char **argv){ int i; if(argc!=2){nono();} i=atoi(argv[1]); if(i4){nono();} if(i
[Wargame.kr] img recovery 풀이 (288p)
풀이 Recovery the PNG image file! but.. is this really "PNG" file? (NO STEGANOGRAPHY. THIS IS FORENSIC CHALLENGE) HxD로 파일을 열어보니 Japng 라는 문구가 눈에 보였다. 찾아보니 Japng Editor가 있어 다운 받았다. 다음 링크에서 다운 받을 수 있다. https://www.reto-hoehener.ch/japng/ Japng - Java (Assembler for) Animated Portable Network Graphics APNG 2008-02-24 Implemented Apng interface. It can now handle more than 1 IDAT chunk. Now also suppor..
[Wargame.kr] type confusion 풀이 (282p)
type confusion view-source code Simple Compare Challenge. hint? you can see the title of this challenge. :D 쉽게 설명하면, gen_key에서 만들어지는 sha1 랜덤 값과, 입력한 json->key 값이 같아야한다. ==로 느슨한 비교를 하니, if문을 참으로 만들어주면 될 듯하다. 문자열은 항상 참이므로, TRUE에 맞는 값을 Burp Suite를 이용해 넣어주자.
[Wargame.kr] tmitter 풀이 (266p)
풀이 you need login with "admin"s id! =========================== create table tmitter_user( idx int auto_increment primary key, id char(32), ps char(32) ); 먼저 Sign Up을 눌러 admin으로 회원가입을 시도해보자. 당연히 그냥 admin으로는 안될 거 같으니, admin'로 해보자. admin\' is exist!! 이스케이프 문자가 딸려온 걸 봐서는, addslashes나, mysql_real_escape_string 함수가 쓰여졌다고 추측할 수 있다. 이 함수들에는 취약점이 존재하는데, %a1~%fe 값이 이스케이프 문자 앞에 존재하면, 같이 날라가버린다. 즉, 해당 문자를 ..
[Wargame.kr] md5_compare 풀이 (236p)
md5_compare view-source code JUST COMPARE ONLY. with the other value :D v1 값은 모두 알파벳, v2 값은 모두 숫자여야 한다. 그냥 md5 magic hash를 이용한 문제 같으니 빨리 풀어주자. 암호화 했을 때 0e로 시작하는 문자열을 찾아 넣어주자. v1=QNKCDZO v2=240610708
[Wargame.kr] DB is really GOOD 풀이 (220p)
풀이 로그인 화면이 주어진다. 한 3번째 시도쯤에 SQL 에서 에러를 출력해줬다. (Burp Suite로 admin%00을 입력했다.) Fatal error: Uncaught exception 'Exception' with message 'SQLite3::open() expects parameter 1 to be a valid path, string given' in /var/www/html/db_is_really_good/sqlite3.php:7 Stack trace: #0 /var/www/html/db_is_really_good/sqlite3.php(7): SQLite3->open('./db/wkrm_admin...') #1 /var/www/html/db_is_really_good/memo.php(1..
[Wargame.kr] md5 password 풀이 (214p)
md5 password view-source code md5('value', true);
[Wargame.kr] strcmp 풀이 (212p)
strcmp view-source code flag를 얻기 위해서는 암호화된 $password의 값을 맞춰야한다. 그런데 if문에서 ===가 아닌 ==로 느슨한 비교를 한다. POST 값이기 때문에 Burp Suite로 password[] 형태로 넘겨준다면 if문을 우회할 수 있을 듯하다.