문제 설명


익숙하게 웹해킹 문제 링크에 접속했는데,

음...

정말당황...

 

F12를 눌러 소스를 확인해 봤다

이렇게 총 20개의 png 파일이 보인다.

각각 눌러서 들어가 보면, 각 사진이 문자 또는 기호들이다. 

이 사진들이 날아다니고 있는 것으로 보인다.

 

각 사진 속의 문자를 나열해 보면

png 내용
o.png _
1.png x.x
2.png t
3.png h3
4.png h4
5.png sE
6.png _
7.png _H
8.png rd
9.png o_
10.png T
11.png e
12.png t
13.png o
14.png _
15.png r
16.png 4
17.png o
18.png S_
19.png C

아무래도 이 모든 문자를 나열하는 게 플래그일 것 같진 않다.

이쯤에서 html 코드도 확인해 본다. 

 

<html>
<head>
  <title>Web</title>
</head>
<body>
  <div id="box">
  </div>

  <style type="text/css">
    body{
      display: flex;
      width: 100vw;
      height:100vh;
      padding: 0px;

    }
    #box{
      display: flex;
      flex-direction: column;
      justify-content: space-around;
      width: 90%;
      height:100%;
    }
  </style>

  <script type="text/javascript">
    const img_files = ["/static/images/10.png", "/static/images/17.png", "/static/images/13.png", "/static/images/7.png","/static/images/16.png", "/static/images/8.png", "/static/images/14.png", "/static/images/2.png", "/static/images/9.png", "/static/images/5.png", "/static/images/11.png", "/static/images/6.png", "/static/images/12.png", "/static/images/3.png", "/static/images/0.png", "/static/images/19.png", "/static/images/4.png", "/static/images/15.png", "/static/images/18.png", "/static/images/1.png"];
    var imgs = [];
    for (var i = 0; i < img_files.length; i++){
      imgs[i] = document.createElement('img');
      imgs[i].src = img_files[i]; 
      imgs[i].style.display = 'block';
      imgs[i].style.width = '10px';
      imgs[i].style.height = '10px';
      document.getElementById('box').appendChild(imgs[i]);
    }

    const max_pos = self.innerWidth;
    function anim(elem, pos, dis){
      function move() {
        pos += dis;
        if (pos > max_pos) {
          pos = 0;
        }
        elem.style.transform = `translateX(${pos}px)`;
        requestAnimationFrame(move);
      }
      move();
    }

    for(var i = 0; i < 20; i++){
      anim(imgs[i], 0, Math.random()*60+20);
    }
  </script>
</body>
</html>

이 코드에서 27번째 줄만 수상할 정도로 길다.

 

    const img_files = ["/static/images/10.png", "/static/images/17.png", "/static/images/13.png",
    "/static/images/7.png","/static/images/16.png", "/static/images/8.png", "/static/images/14.png",
    "/static/images/2.png", "/static/images/9.png", "/static/images/5.png", "/static/images/11.png",
    "/static/images/6.png", "/static/images/12.png", "/static/images/3.png", "/static/images/0.png",
    "/static/images/19.png", "/static/images/4.png", "/static/images/15.png", "/static/images/18.png",
    "/static/images/1.png"];

그것만 따로 빼 와서 보니

다음과 같다.

 

아니나 다를까...

이미지 파일들을 원래 순서와 달리 섞어둔 게 보인다

이대로 문자를 나열해 보자

Too_H4rd_to_sEe_th3_Ch4rs_x.x

 

대박...

그렇다면,

Flag = DH{Too_H4rd_to_sEe_th3_Ch4rs_x.x}

이다!

 

구글링 하나도 없이 문제 혼자 푼 거 처음이당

끝~

'SWUFORCE > 워게임 풀이' 카테고리의 다른 글

[Dreamhack] Carve Party (web)  (0) 2024.05.01
[Dreamhack] simple-web-request (web)  (0) 2024.05.01
[Dreamhack] ex-reg-ex(web)  (0) 2024.04.02
[Dreamhack] file-download-1(web)  (0) 2024.03.26
[Dreamhack] cookie(web)  (1) 2024.03.26

+ Recent posts