Erlenmeyer Biscuits (Cuppa Joe 2)

mhsctf2022 Web 문제입니다.

 

Description :

You remember that coffee shop that just opened up, Cuppa Joe? Well there's now a competitor shop that's opening up across from them! It's called Erlenmeyer Biscuits, and here is their website. I really don't want Cuppa Joe to go out of business, so do you think you could dig up some dirt on Erlenmeyer Biscuits to stop them from opening? mhsctf-erlenmeyer-biscuits.0xmmalik.repl.co (you may need to wait for the site to wake up)

 

경쟁 카페의 웹사이트가 생겼습니다. 경쟁 카페로부터 flag를 획득해야됩니다.

 

 

문제 분석

index-page

웹 페이지 첫화면입니다.

이 페이지의 화면과 소스코드 말고는 다른 정보가 없었기에 우선 cookie 부터 확인해보았습니다.

 

cookie

cookie에 session으로 설정되어 있는 값을 확인하였고 형식을 토대로 짐작했을때 JWT로 짐작하였습니다.

 

 

문제 풀이

확인된 JWT token을 decode 하였습니다.

flag 값이 확인되었습니다.

 

더보기

flag{fl45k_s35510n_c00k13s_4r3_1n53cure}

 

 

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

[Codegate2022] PrimeGenerator  (0) 2022.03.07
[CODEGATE2022] CAFE  (0) 2022.03.05
[MHSCTF] Cuppa Joe  (0) 2022.02.20
[MHSCTF] James Harold Japp  (0) 2022.02.20
[MHSCTF] Crash Hacker (Em Dee 2)  (0) 2022.02.20

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

James Harold Japp

mhsctf2022 Web 문제입니다.

 

Description :

I need to be able to log in to this website. Can you tell me how to do it? mhsctf-jamesharoldjapp.0xmmalik.repl.co (you may need to wait for the site to wake up)

 

웹사이트에 로그인 하는 문제입니다.

정보가 너무 부족하니 페이지를 살펴보도록 하겠습니다.

 

문제 분석

index-page

Password를 입력하여 로그인 하는 문제로 보입니다.

소스 코드를 살펴보도록하겠습니다.

 

<head>
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=Lato:wght@300&family=Exo+2&display=swap" rel="stylesheet">
  <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
  <link rel="stylesheet" href="https://mhsctf-webexploitdata.0xmmalik.repl.co/style.css">
</head>
<body>
  <div class="w3-content">
    <label for="pwd">Password:</label>
    <input type="password" id="pwd" name="pwd">
    <button onclick="validatepwd()" type="button">Submit</button>

    <script>
      function validatepwd() {
        var x = document.getElementById("pwd").value;
        if (x == "this_is_a_really_secure_password") {
          window.open("/weirdpage.php?pwd=doublepassword")
        }
      }
    </script>
  </div>
</body>

소스코드중 script 부분에 기능이 적혀있습니다.

Password 값이 this_is_a_really_secure_password일 경우 로그인에 성공하는 것으로 보이며 특정 페이지로 이동하는 것으로 보입니다.

 

문제 풀이

login success

Password 입력결과 weirdpage.php?pwd=doublepassword로 이동하였습니다.

다시 한번 소스코드를 살펴보겠습니다.

 

<!doctype html><html><head><!--lol gottem here's the flag: flag{1n$p3ct0r_g3n3r@l}--><title>404 Not Found</title><style>
body { background-color: #fcfcfc; color: #333333; margin: 0; padding:0; }
h1 { font-size: 1.5em; font-weight: normal; background-color: #9999cc; min-height:2em; line-height:2em; border-bottom: 1px inset black; margin: 0; }
h1, p { padding-left: 10px; }
code.url { background-color: #eeeeee; font-family:monospace; padding:0 2px;}
</style>
</head><body><h1>Not Found</h1><p>The requested resource <code class="url">/weirdpage.php?pwd=doublepassword</code> was not found on this server.</p></body></html>

코드내에 flag값이 적혀있는것을 확인할 수 있습니다.

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

[MHSCTF] Erlenmeyer Biscuits (Cuppa Joe 2)  (0) 2022.02.23
[MHSCTF] Cuppa Joe  (0) 2022.02.20
[MHSCTF] Crash Hacker (Em Dee 2)  (0) 2022.02.20
[MHSCTF] Peanuts  (0) 2022.02.20
[MHSCTF] Em Dee  (0) 2022.02.20

Crash Hacker (Em Dee 2)

mhsctf2022 Cryptography 문제입니다.

 

Description :

Another super-secret message from Em! What does this one mean? b4b11af47f3086ce1293df4908d026d4 Remember to enter your answer in the "flag{...}" format! Hint: If at first you don't succeed, try, try again.

 

b4b11af47f3086ce1293df4908d026d4값을 분석하여 평문을 찾아내야 되는것으로 보입니다.

 

문제 분석

md5 crack

바로 평문이 나온것을 확인할수 있습니다.

 

문제 풀이

형식에 맞게 해시값을 넣어 작성해주면 문제가 풀립니다.

더보기

flag{mmm_p@$ta}

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

[MHSCTF] Cuppa Joe  (0) 2022.02.20
[MHSCTF] James Harold Japp  (0) 2022.02.20
[MHSCTF] Peanuts  (0) 2022.02.20
[MHSCTF] Em Dee  (0) 2022.02.20
[DefCamp CTF 21-22] casual-defence  (0) 2022.02.15

Peanuts

mhsctf2022 Cryptography 문제입니다.

 

Description :

Charlie Brown received this message from his good friend Pig-Pen, but it appears to be nonsense. What could it be? Remember to enter your answer in the "flag{...}" format; it's all lowercase.

 

Pig-Pen으로부터 받은 메시지인 첨부파일을 분석해야됩니다. 넌센스로 보입니다.

 

문제 분석

첨부 파일

pig-pen word로 보입니다.

구글링을 통해 확인한 표와 대칭시켜 해독하면 해결될것으로 보입니다.

 

문제 풀이

pig-pen word

해석하면 goodgriefchaliebrown이 나옵니다.

형식에 맞게 해시값을 넣어 작성해주면 문제가 풀립니다.

더보기

flag{goodgriefchaliebrown}

 

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

[MHSCTF] James Harold Japp  (0) 2022.02.20
[MHSCTF] Crash Hacker (Em Dee 2)  (0) 2022.02.20
[MHSCTF] Em Dee  (0) 2022.02.20
[DefCamp CTF 21-22] casual-defence  (0) 2022.02.15
[DefCamp CTF 21-22] para-code  (0) 2022.02.15

Em Dee

mhsctf2022 Cryptography 문제입니다.

 

Description :

I have a good friend named Em. She loves secret codes, so when she challenged me this time, I was well up for it! She told me that she encoded the word "happy" as "56ab24c15b72a457069c5ea42fcfc640" and "sad" as "49f0bad299687c62334182178bfd75d8" (without the quotes) and challenged me to encode "mhsctf" using her method! I can't figure it out! What would it be? Enter your answer in flag format: "flag{...}"

 

happy는 56ab24c15b72a457069c5ea42fcfc640값으로 sad는 49f0bad299687c62334182178bfd75d8값으로 암호화가 되었습니다. mhsctf는 어떤 값으로 암호화가 되는지를 묻는 문제입니다.

 

문제 분석

두개의 암호화값은 모두 32글자로 해시값으로 보여집니다.

때문에 rainbow table을 사용하여 평문이 올바르게 표시되는지 확인 과정을 거쳤습니다.

 

happy
sad

md5로 암호화되어 해시가 생성된것으로 확인 되었습니다.

두 평문과 해시값의 교차검증을 완료하였으니 문제를 풀어보도록 하겠습니다.

 

문제 풀이

평문 mhsctf 를 md5로 암호화하였습니다.

 

md5-mhsctf

형식에 맞게 해시값을 넣어 작성해주면 문제가 풀립니다.

더보기

flag{fc3e3c405a66f8fe7cb7f17a838ea88c}

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

[MHSCTF] Crash Hacker (Em Dee 2)  (0) 2022.02.20
[MHSCTF] Peanuts  (0) 2022.02.20
[DefCamp CTF 21-22] casual-defence  (0) 2022.02.15
[DefCamp CTF 21-22] para-code  (0) 2022.02.15
[DefCamp CTF 21-22] web-intro  (0) 2022.02.15

+ Recent posts