본문 바로가기

반응형

분류 전체보기

(185)
Lord of SQLInjection 20번 dragon https://los.rubiya.kr/ Lord of SQLInjection los.rubiya.kr Lord of SQLInjection 20번 dragon 예전에 풀었던 skelton문제와 비슷하다. 하지만 id에 주석처리가 되어있어 guest는 고정되어 있고, pw부터 쿼리는 무시가 된다. 주석처리 방법 중 '#'은 한 줄을 주석처리 한다. pw 뒤에 한 줄을 띄우고 쓰면 id 주석을 우회할 수 있다. pw값에 개행문자 \n(%0a)를 입력하면 다음줄로 넘어가기 때문에 주석에서 빠져나올 수 있다. --->?pw=%0aand%200%20or%20id=%27admin%27%23 query : select id from prob_dragon where id='guest'# and pw=' and 0 o..
Lord of SQLInjection 19번 xavis https://los.rubiya.kr/ Lord of SQLInjection los.rubiya.kr Lord of SQLInjection 19번 xavis if(preg_match('/prob|_|\.|\(\)/i', $_GET[pw])) exit("No Hack ~_~"); 필터링 1) prob 2) _ 3) . 4) () if(preg_match('/regex|like/i', $_GET[pw])) exit("HeHe"); 필터링 1) regex (정규표현식) 2) like if(($result['pw']) && ($result['pw'] == $_GET['pw'])) solve("xavis"); 정확한 pw를 구해야 하는 문제이다. pw 길이 구하기 import requests url="https..
Lord of SQLInjection 18번 nightmare https://los.rubiya.kr/ Lord of SQLInjection los.rubiya.kr Lord of SQLInjection 18번 nightmare if(preg_match('/prob|_|\.|\(\)|#|-/i', $_GET[pw])) exit("No Hack ~_~"); 필터링 1) prob 2) _ 3) . 4) () 5) # 6) - if(strlen($_GET[pw])>6) exit("No Hack ~_~"); pw 문자열을 6글자로 제한이 되어있다. query : select id from prob_nightmare where pw=('') and id!='admin' 쿼리를 보면 pw는 ('')로 묶여 있다. MySQL Automatic type cast 즉, 자동형변환 ..
Lord of SQLInjection 17번 zombie_assassin https://los.rubiya.kr/ Lord of SQLInjection los.rubiya.kr Lord of SQLInjection 17번 zombie_assassin $_GET['id'] = strrev(addslashes($_GET['id'])); $_GET['pw'] = strrev(addslashes($_GET['pw'])); - strrev는 문자열을 역으로 바꾸는함수이다. - addslashes는 싱글쿼터, 더블쿼터, 백슬래시, Null문자가 포함되어 있다면 해당 문자 앞에 백슬래시를 추가해주는 함수이다. 방법 1) 위와 같이 더블쿼터를 입력하게 되면 id='"\'가 된다. addslashes($_GET['id']) : \" strrev(addslashes($_GET['id'])) :..
Lord of SQLInjection 16번 succubus https://los.rubiya.kr/ Lord of SQLInjection los.rubiya.kr Lord of SQLInjection 16번 succubus if(preg_match('/prob|_|\.|\(\)/i', $_GET[id])) exit("No Hack ~_~"); if(preg_match('/prob|_|\.|\(\)/i', $_GET[pw])) exit("No Hack ~_~"); if(preg_match('/\'/',$_GET[id])) exit("HeHe"); if(preg_match('/\'/',$_GET[pw])) exit("HeHe"); 필터링은 5가지가 있다. 1) prob 2) _ 3) . 4) () 5) ' 이 중 싱글쿼터(')를 우회해야 하는 문제이다. 싱글쿼터 우..
Lord of SQLInjection 15번 assassin https://los.rubiya.kr/ Lord of SQLInjection los.rubiya.kr Lord of SQLInjection 15번 assassin if(preg_match('/\'/i', $_GET[pw])) exit("No Hack ~_~"); - 싱글쿼터가 필터링 되어 있다. - pw 뒤에 like로 pw 길이를 확인할 수 있다. like로 문자열을 비교할 때 _(underscore)는 모든 문자열을 뜻하기 때문에 underscore 수로 알 수 있다. 길이 구하는 파이썬 코드 import requests url="https://los.rubiya.kr/chall/assassin_14a1fd552c61c60f034879e5d4171373.php" cookies={"PHPSESSID"..
Lord of SQLInjection 14번 giant https://los.rubiya.kr/ Lord of SQLInjection los.rubiya.kr Lord of SQLInjection 14번 giant query : select 1234 fromprob_giant where 1 - 우선 쿼리를 보면 from 뒤에 오는 테이블명 사이에 공백이 없다. if(strlen($_GET[shit])>1) exit("No Hack ~_~"); - 값을 받아오는 shit은 1글자 이상 쓸 수가 없게 되어있다. if(preg_match('/ |\n|\r|\t/i', $_GET[shit])) exit("HeHe"); - 공백, \n, \r, \t가 필터링되어 있다. - 공백=%20 - \n=%0a - \r=%0d - \t=%09 이것을 제외한 공백 우회방법 중에 ..
[PortSwigger] Lab: Insecure direct object references https://portswigger.net/web-security/access-control/lab-insecure-direct-object-references Lab: Insecure direct object references | Web Security Academy This lab stores user chat logs directly on the server's file system, and retrieves them using static URLs. Solve the lab by finding the password for the ... portswigger.net Access control_액세스 제어 : 액세스 제어(또는 권한 부여)는 누가(또는 무엇을) 시도한 작업을 수행하거나 요청한 리소..

반응형