Cuppa Joe

mhsctf2022 Web 문제입니다.

 

Description :

A new coffee shop is opening up in my neihborhood! It's called Cuppa Joe and I can't wait to check it out! It would ahem be a real shame if someone were to ahem hack their website and, hypothetically, get their secret flag. mhsctf-cuppajoe.0xmmalik.repl.co (you may need to wait for the site to wake up)

 

Cuppa Joe 카페 웹사이트에서 플래그를 획득하라고 합니다.

 

문제 분석

index-page

웹 페이지 첫화면입니다.

sitemap에 index, flag, message php가 있다고 알려주고 있습니다.

하지만 flag.php 파일에는 직접적인 접근이 안됩니다.

 

/message.php

때문에 다른 부분부터 살표보도록 하겠습니다.

하단에 message 칸에 값을 입력하면 message.php에서 입력값을 그대로 출력해줍니다.

이 기능에서 XSS가 가능하지 시도해보도록하겠습니다.

 

XSS

<script>alert(1);</script>

위 구문을 사용하여 XSS 가능 여부를 확인했습니다.

 

문제 풀이

<script>location.href = '/flag.php'</script>

페이지를 이동하는 구문을 사용하여 message 페이지를 경유하여 접근해보니 문제가 해결되었습니다.

더보기

flag{c0ff33_be4nz}

 

 

'Challenge > CTF' 카테고리의 다른 글

[CODEGATE2022] CAFE  (0) 2022.03.05
[MHSCTF] Erlenmeyer Biscuits (Cuppa Joe 2)  (0) 2022.02.23
[MHSCTF] James Harold Japp  (0) 2022.02.20
[MHSCTF] Crash Hacker (Em Dee 2)  (0) 2022.02.20
[MHSCTF] Peanuts  (0) 2022.02.20

+ Recent posts