-
http://io.smashthestack.org:84 ssh
[email protected] -p2224 password: level1 오늘 부터 시작해보자! Level 1 문제는 생각보다 단순하다. level1@io:/levels$ ./level01 Usage: ./level01 <password> level1@io:/levels$ ./level01 test Fail. level1@io:/levels$ strings level01 /lib/ld-linux.so.2 __gmon_start__ libc.so.6 printf execl puts strncmp _IO_stdin_used __libc_start_main GLIBC_2.0 PTRh 0Y_] [^_] [^_] omgpassword Usage: %s <password> Win. /bin/sh Fail. level1@io:/levels$ ./level01 omgpassword Win. sh-3.2$ cat /home/level2/.pass ep4kbyqe […]
-
이 문제를 풀기위해 어언 1년이 걸린거 같다… 마침에 최종 레벨을 다 풀어냈다. 이 감격이란 -_-…… /* * Anyone hating this level yet? * Having problems? * good… 😉 * * Created by: ddle * */ #include <stdio.h> int func(arg) char *arg; { char buf[40]; strncpy(buf , arg , 64); return 0; } int main(argc , […]
-
http://www.overthewire.org/wargames/vortex/level6.shtml 문제를 보면 바이너리 파일을 제공해 준다. 해당 바이너리를 IDA를 통해 확인을 해보면 아래와 같다. restart() 함수가 존재한다. restart() 함수의 역활을 보니 argv를 받아 execlp() 함수로 실행해주는 함수이다. 그렇다면 그냥 쉽게 쉘을 실행시키는 코드를 짜서 restart() 함수를 이용하여 실행하면 될것으로 보인다. 공격해보자! vortex6@games /tmp/byjjoon_6 $ cat shell.c int main() { setreuid(geteuid(), geteuid()); setregid(getegid(), getegid()); execl("/bin/bash", […]
-
http://www.overthewire.org/wargames/vortex/level5.shtml 코드를 보면 해당 MD5값을 찾으라고 한다. 155fb95d04287b757c996d77b5ea51f7 별 고민 없이 지난번에 소개한 해쉬 크랙 툴을 이용하여 검색해 보았다. 결과는 rlTf6 vortex5@games ~ $ /vortex/level5 Password: 6:36 You got the right password, congrats! sh-3.2$ cat /etc/vortex_pass/vortex6 *uy5qDRb2 sh-3.2$ 이렇게 풀어도 되나? -_-;
-
http://www.overthewire.org/wargames/vortex/level4.shtml // — andrewg, original author was zen-parse 🙂 #include <stdlib.h> int main(int argc, char **argv) { if(argc) exit(0); printf(argv[3]); exit(EXIT_FAILURE); } 먼저 회피를 위해서 if(argc)를 회피해야 하므로 execl() 함수를 이용한다. 방법은 아래와 같이 간단하게 Python 스크립트로 작성하여 회피할 수 있다. vortex4@games /tmp/byjjoon $ cat go.py #!/usr/bin/python import os os.execl('/vortex/level4') vortex4@games /tmp/byjjoon $ ./go.py SHELL=/bin/bashvortex4@games […]
-
http://www.overthewire.org/wargames/vortex/level3.shtml /* * 0xbadc0ded.org Challenge #02 (2003-07-08) * * Joel Eriksson <
[email protected]> */ #include <string.h> #include <stdlib.h> #include <stdio.h> unsigned long val = 31337; unsigned long *lp = &val; int main(int argc, char **argv) { unsigned long **lpp = &lp, *tmp; char buf[128]; if (argc != 2) exit(1); strcpy(buf, argv[1]); if (((unsigned long) lpp & […]
-
Level 1 – Idiot Test function check(x) { if (x == cookies) { alert(win!); window.location += ?lvl_password=+x; } else { alert(Fail D:); } } 위와 같은 코드가 있다. 답은 당연히 cookies Level 2 – Disable Javascript 링크를 누르면 계속해서 fail.php 페이지로 넘어간다. 따라서 문제 페이지의 자바스크립트가 실행되기 전 스크립트를 확인하면 다음과 같다. window.location=http://www.hackthissite.org/missions/javascript/2/fail.php; <a href="/missions/javascript/2/index.php?challengePass=B8n7OV">Click […]
-
Level 1 단순한 문제다. 소스를 보면 주석으로 아래와 같은 문장이 있다. Level 2 문제를 읽어보면 패스워드 파일과 비교하도록 해놓았지만 패스워드 파일 업로드를 안했다고 한다. 그래서 그냥 아무것도 입력안하고 버튼을 누르면 통과가 된다. 영어를 모르면 손발이 고생한다는…… Level 3 이번엔 패스워드 파일을 업로드 했다고 한다. 파일명이 password 겠지 하고 아래 주소로 접속해보면 패스워드가 나온다. http://www.hackthissite.org/missions/basic/3/password Level […]
-
http://www.pythonchallenge.com/pc/hex/copper.html 위 페이지의 소스를 보면 아래와 같은 주석이 있다. <!– or maybe white.gif would be more bright–> white.gif 파일을 좀 더 밝게 해란다. 또 PIL을 이용해야 하는 문제인가보다. white.gif 파일을 확인하여 보면 gif로 애니메이션 파일이다. 각 프레임별로 이미지를 뽑아서 밝기를 높혀보면 점이 나오는 것을 알 수 있다. 이 점들이 움직이는 대로 선을 그려 보면 문자가 […]
-
해당 문제는 20번에서 받은 파일을 이용하여 푸는 문제 이다. “invader”를 거꾸로 하여 압축을 풀고 나면 package.pack 파일이 나오게 된다. 해당 파일을 Hex Editor로 열어 확인하여 보면 헤더가 [78 9C] 로 시작함을 알 수 있다. 구글링을 하여보니 zlib 관련 파일로 확인되었다. 따라서 zlib 라이브러리를 사용하여 압축을 해제한다. 해제하면 다시 zlib 관련 파일이 나오며 계속해서 안풀릴때 까지 […]