728x90
https://webhacking.kr/challenge/web-01/
Challenge 1
webhacking.kr
접속하여 소스코드를 확인하면 아래와 같은 코드를 확인 가능하다.
<?php
include "../../config.php";
if($_GET['view-source'] == 1){ view_source(); }
if(!$_COOKIE['user_lv']){
SetCookie("user_lv","1",time()+86400*30,"/challenge/web-01/");
echo("<meta http-equiv=refresh content=0>");
}
?>
<html>
<head>
<title>Challenge 1</title>
</head>
<body bgcolor=black>
<center>
<br><br><br><br><br>
<font color=white>
---------------------<br>
<?php
if(!is_numeric($_COOKIE['user_lv'])) $_COOKIE['user_lv']=1;
if($_COOKIE['user_lv']>=4) $_COOKIE['user_lv']=1;
if($_COOKIE['user_lv']>3) solve(1);
echo "<br>level : {$_COOKIE['user_lv']}";
?>
<br>
<a href=./?view-source=1>view-source</a>
</body>
</html>
쿠키값이 3보다는 크지만 4 이상이 되면 안 된다.
쿠키값을 확인해보았다.
user_lv이 1로 되어있다.
이 부분을 3.5로 고쳐보았다.
Clear!
728x90
'WEB > Webhacking.kr' 카테고리의 다른 글
[Challenge(Old)] old-05 (30) (0) | 2021.09.19 |
---|---|
[Challenge(Old)] old-03 (35) (0) | 2021.09.18 |
[Challenge(Old)] old-19 (15) (0) | 2021.09.08 |
[Challenge(Old)] old-12 (25) (0) | 2021.09.08 |
[Challenge(Old)] old-10 (25) (0) | 2021.09.08 |