반응형

 

 

 

<?php
  include "../../config.php";
  if($_GET['view_source']) view_source();
?><html>
<head>
<title>Challenge 11</title>
<style type="text/css">
body { background:black; color:white; font-size:10pt; }
</style>
</head>
<body>
<center>
<br><br>
<?php
  $pat="/[1-3][a-f]{5}_.*$_SERVER[REMOTE_ADDR].*\tp\ta\ts\ts/";
  if(preg_match($pat,$_GET['val'])){
    solve(11);
  }
  else echo("<h2>Wrong</h2>");
  echo("<br><br>");
?>
<a href=./?view_source=1>view-source</a>
</center>
</body>
</html>

1 ~ 3 사이의 값 하나 + a ~ f 사이의 값들 중 5개 + ' _(언더바) ' + 임의의 문자열 + [접속자 IP] + 임의의 문자열 + tap키 + p + tap키 + a + tap키 + s + tap키 + s를 조합하면 preg_match를 통해 정규표현식과 GET 방식 val 변수의 값과 확인하여 매칭이 되면 문제가 풀린다.

 

1. 1 ~ 3 사이의 아무 값이나 가능하다.

2. a ~ f 사이의 아무 값으로 5개만 고르면 된다.

3. 임의의 문자열은 0개 이상의 아무 문자열이나 다 된다.

4. tap 기능은 URL 인코딩으로 %09이다.

 

=> 1abcde_slayxxx.xxx.xxx.xxxslay%09p%09a%09s%09s

 

반응형

'전쟁 > Webhacking.kr' 카테고리의 다른 글

[webhacking.kr] old-6  (0) 2022.05.06
[webhacing.kr] old-12  (0) 2022.05.04
[webhacking.kr] old-33  (0) 2022.05.02
[webhacking.kr] old-14  (0) 2022.04.30
[webhacking.kr] old-10  (0) 2022.04.30

+ Recent posts