ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • [Pragyan CTF] Pandora
    CTF Writeup 2020. 2. 24. 15:26

    [Pandora] http://ctf.pragyan.org:14000/index.php

     

    Pragyan CTF

    Pragyan CTF Login

    ctf.pragyan.org:14000

     

    로그인과 회원가입 폼이 주어져 있다.

    (SQL Injection을 시도해 보았지만 먹히지 않았다.)

     

    회원 가입 후 로그인을 하면 아래와 같이 profile.php로 갈 수 있다.

     

    message를 아직 쓰지 않았다고 한다.

    파라미터에 msg, message 등으로 값을 넘겨 주었으나 아무런 반응이 일어나지 않았다.

     

    success와 NAME의 파라미터를 이용해 SQL Injection을 시도해 보았다.

    (그냥 '나 "를 입력하는 것으로는 아무런 반응이 일어나지 않는다. 에러를 보여주지 않게 처리한 것 같다.)

     

    NAME에 ' or true-- 를 입력하니 msg 값이 출력된다.

    Injection PointNAME이다.

     

    아래 구문을 이용하여 Table 리스트를 출력하였다.

    ' union select 1, table_name from information_schema.tables--

     

    테이블은 pandoralocations, pandoramsg, pandorausers 가 존재한다.

     

    테이블의 컬럼 명은 아래 구문을 이용하여 알아낼 수 있다.

    ' union select 1, column_name from information_schema.columns where table_name='테이블명'--

     

    [pandoralocations] base, latitude, longitude
    [pandoramsg] msg, username
    [pandorausers] password, username

     

    알아낸 테이블과 컬럼을 이용하여 값을 출력해 보았다.

    ' union select base, latitude from pandoralocations--

     

    pandoralocations 테이블의 latitude 컬럼에서 flag를 얻을 수 있었다.

    'CTF Writeup' 카테고리의 다른 글

    [BSidesSF 2020 CTF] recipes  (0) 2020.02.26
    [BSidesSF 2020 CTF] had-a-bad-day  (0) 2020.02.25
    [Pragyan CTF] Kimi no Na Wa  (0) 2020.02.24

    댓글

@Jo Grini's Blog