반응형

 

문제 페이지에 접속하면 위와 같이 창이 뜨고 확인을 누르면 아래와 같이 홈 화면으로 리다이렉션 된다.

 

 


HTTP/1.1 200 OK
Date: Tue, 12 Jul 2022 19:39:43 GMT
Server: Apache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Vary: Accept-Encoding
Content-Length: 184
Connection: close
Content-Type: text/html; charset=UTF-8

<html>
<head>
<title>Challenge 15</title>
</head>
<body>
<script>
  alert("Access_Denied");
  location.href='/';
  document.write("<a href=?getFlag>[Get Flag]</a>");
</script>
</body>

 

웹 프록시(burp suite)를 이용해 response의 내용을 확인하면 위와 같이 뜬다.

(url 맨 앞에 "view-source:" 를 붙여도 볼 수 있다.)

 

document.write() 부분에 <a href=?getFlag> 라고 적혀져 있다.

 

document.write()로 인해 페이지에 [Get Flag] 문자열이 적혀지고 하이퍼링크로 ?getFlag 페이지로 이동되어야 하지만

location.href로 인해 루트 페이지로 이동되었으므로 해당 문자열을 볼 수 없다.

 

해당 문제 페이지 url 뒤에 ?getFlag를 붙여 접속하면 되는 듯 하다.

 

 

 

반응형

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

[Webhacking.kr] old-17  (0) 2022.07.13
[Webhacking.kr] old-16  (0) 2022.07.13
[Webhacking.kr] old-26  (0) 2022.07.13
[webhacking.kr] old-4  (0) 2022.07.11
[webhacking.kr] old-19  (0) 2022.05.06

+ Recent posts