전체 글
-
Wargame.kr dmbs335WebHacking/Wargame.kr 2018. 2. 26. 00:45
dmbs335700point / dmbs335SQL injection Challenge! (injection) - thx to dmbs335parse_str($_SERVER['QUERY_STRING']); getOperator($operator); $keyword = addslashes($keyword); $where_clause = ''; if(!isset($search_cols)) { $search_cols = 'subject|content'; } $cols = explode('|',$search_cols); foreach($cols as $col) { $col = preg_match('/^(subject|content|writer)$/isDU',$col) ? $col : ''; if($col) { ..
-
Wargame.kr web chattingWebHacking/Wargame.kr 2018. 2. 26. 00:35
web chatting650point / bughelaSimple SQLi Challenge. How can I set in order to reduce the traffic? Please try looking at a developer's perspective.내가 여태까지 풀어본 문제 중 가장 귀찮고 귀찮은 문제다. 데이터 AAA를 입력한 결과다 t=1 ni는 인덱스?와 같다고 봐도된다. 내가 입력했을때 ni = 32539라면 t=1&ni=32539안에 내가 입력한 값이 있다. 그 다음 입력에는 ni 32540에 들어가 있고 이런식 으로 돌아간다. 우리가 입력할 수 있는 곳은 t,ni,data다. 하나하나 sql injection을 해보면 알겠지만 ni부분에서 sql injection이 된다.ni는 ..
-
Wargame.kr SimpleBoardWebHacking/Wargame.kr 2018. 2. 26. 00:29
SimpleBoard600point / bughelaSimple Union SQL injection Challenge. (but you need script... maybe?) public function read($idx){ $idx = mysql_real_escape_string($idx); if ($this->read_chk($idx) == false){ $this->inc_hit($idx); } return $this->db->get_query("select * from {$this->table} where idx=$idx"); } private function read_chk($idx){ if(strpos($_COOKIE['view'], "/".$idx) !== false) { return tr..
-
Wargame.kr tmitterWebHacking/Wargame.kr 2018. 2. 25. 12:36
tmitter600point / bughelayou need login with "admin"s id! =========================== create table tmitter_user( idx int auto_increment primary key, id char(32), ps char(32) );id,ps 컬럼 최대 글자가 32글자 라고한다. admin이름으로 회원가입을 할라하면 이미 있다고 회원가입을 막는다.id 최대글자가 32글자인데 F12로 수정이 가능하다 admin + ' '(공백)*27을 하게되면 32글자가 된다.그리고 F12로 maxlength를 늘려서 아무글자나 넣게되면PHP상에서는 admin공백*27+B가 되어서 admin 회원가입에 아무 문제도 없다.컬럼 최대글자는 32..
-
Wargame.kr type confusionWebHacking/Wargame.kr 2018. 2. 25. 06:40
1234567891011121314151617181920212223242526272829303132333435363738 view-source Colored by Color Scriptercs 이번 문제는 JSON문제다 {'key':'0'}을 넣게 되면 JSON decode를 해주면 key='0'이 된다.우리가 비교하게 되는 $key는 문자열이다.우리가 넣는 JSON은 문자열을 넣어도 되고 숫자를 넣어도 된다.그리고 비교는 ==를 쓴다. 느낌이 온다 .. "0SECRET_FLAG" == 0을 비교하면 문자열 맨 앞에 있는 숫자와 비교를 하기 때문에 True가 될 것 이다.{"key":0}을 넣으면 이상하게 안 된다.. 내가 쓰는 웹 서버에서는 잘 되던데 ..그래서 조금 야매?를 써서 풀기로 하였다. 우리..
-
Wargame.kr strcmpWebHacking/Wargame.kr 2018. 2. 25. 06:35
strcmp550point / bughelaif you can bypass the strcmp function, you get the flag.이번 문제는 strcmp함수 문제인것같다. 1234567891011121314151617181920212223242526 password : view-sourceColored by Color Scriptercs == 함수에서 NULL과 0은 같다. php 5.3버전에서는 str과 배열을 비교할때 NULL을 반환 시켜주는데 위에 적어 놓은 것처럼 NULL은 0과 같으니 $_POST['password']가 배열이라면 NULL을 반환 할 것이고 플래그를 얻을 수 있을 것 이다.
-
Wargame.kr md5 compareWebHacking/Wargame.kr 2018. 2. 25. 06:23
웹 문제 처음부터 푼것들 전부 다 Write up을 올리는 것 보다 나한테 도움이 된 것들 위주로 Write up을 올리는게 좋다고 생각해서 md5_compare문제를 시작으로 Write up을 쓸려고한다.md5_compare500point / bughelaJUST COMPARE ONLY. with the other value :Dmd5와 관련된 문제다. 123456789101112131415161718192021222324252627282930313233 VALUE 1 : VALUE 2 : view-sourceColored by Color Scriptercs md5와 해킹과 연관 시켜서 생각을 해보면 md5 해쉬충돌이 먼저 생각이 난다.https://stackoverflow.com/questions/2..