[CTF Writeup / Web] VishwaCTF 2024 - Trip To Us
[Trip To Us]
IIT kharakpur is organizing a US Industrial Visit. The cost of the registration is $1000. But as always there is an opportunity for intelligent minds. Find the hidden login and Get the flag to get yourself a free US trip ticket.
Author : Samarth Ghante & Kanishk Kumar
숨겨진 로그인 페이지를 찾아 로그인 후 플래그를 획득하라고 되어있다.
구석구석 찾다가 dirb를 돌렸다.
$ dirb https://ch661266149309.ch.eng.run/
-----------------
DIRB v2.22
By The Dark Raver
-----------------
START_TIME: Sat Mar 2 14:20:00 2024
URL_BASE: https://ch661266149309.ch.eng.run/
WORDLIST_FILES: /usr/share/dirb/wordlists/common.txt
-----------------
GENERATED WORDS: 4612
---- Scanning URL: https://ch661266149309.ch.eng.run/ ----
==> DIRECTORY: https://ch661266149309.ch.eng.run/backups/
==> DIRECTORY: https://ch661266149309.ch.eng.run/db/
==> DIRECTORY: https://ch661266149309.ch.eng.run/Images/
+ https://ch661266149309.ch.eng.run/server-status (CODE:403|SIZE:290)
backups/ 하위에는 login.php가 있었지만, 접근 시 index.php로 302 리다이렉트 되었다.
db/ 하위에는 .sql 파일들이 있었고, 계정 정보가 적혀있었다.
.php 확장자를 고정하고 dirb를 한 번 더 돌렸다.
$ dirb https://ch661266149309.ch.eng.run/ -X .php
-----------------
DIRB v2.22
By The Dark Raver
-----------------
START_TIME: Sat Mar 2 14:32:09 2024
URL_BASE: https://ch661266149309.ch.eng.run/
WORDLIST_FILES: /usr/share/dirb/wordlists/common.txt
EXTENSIONS_LIST: (.php) | (.php) [NUM = 1]
-----------------
-----------------
GENERATED WORDS: 4612
---- Scanning URL: https://ch661266149309.ch.eng.run/ ----
+ https://ch661266149309.ch.eng.run/home.php (CODE:302|SIZE:0)
+ https://ch661266149309.ch.eng.run/logout.php (CODE:302|SIZE:0)
home.php가 나왔고, 접근 시 실제 로그인 페이지로 302 리다이렉트 된다.
아까 /db/ 에서 획득한 .sql 파일 내 계정정보로 로그인하면 플래그를 획득할 수 있다.
댓글
댓글 쓰기