https://dreamhack.io/wargame/challenges/128/
mongoboard
Description node와 mongodb로 구성된 게시판입니다. 비밀 게시글을 읽어 FLAG를 획득하세요. MongoDB < 4.0.0
dreamhack.io
no를 구하는 문제이다.
publish_date가 써있는 것을 보니 힌트일 것이다.
no의 규칙성을 보면,
60e869ee1363ea8d2351e0d5
60e869f31363ea8d2351e0d6
?
60e869fb1363ea8d2351e0d8
중간값 두글자와 마지막 한 글자를 제외하고 같다.우선 마지막 글자는 1씩 증가하므로 7일 것이다.
60e869__1363ea8d2351e0d7
클릭하면 secret document라고 나온다. 이 문서 안에 flag가 담겨있을 것이다.http://host1.dreamhack.games:13347/detail/60e869ee1363ea8d2351e0d5게시물을 클릭하면 /detail/[no] 링크로 들어갈 수 있는데, 내가 직접 url에 치면 게시글이 안뜬다.즉 /detail/[no]로는 바로 접속할 수 없다.코드 파일을 보면,
:board_id는 변수 불러오기라고 한다.
아무튼 /api/board/:board_id를 치면 board내용이 나올 것이라는 것을 추측할 수 있다.
우선 나는
60e869f31363ea8d2351e0d6
?
60e869fb1363ea8d2351e0d8
f4부터 fa까지 입력해보면 되겠지하고
http://host1.dreamhack.games:13347/api/board/60e869f71363ea8d2351e0d7
이거 쳐서 flag를 구했다.
근데 timestamp를 이용해서 구할 수도 있다.
https://steveridout.github.io/
MongoDB ObjectId to Timestamp Converter
Did you know that each MongoDB ObjectId contains an embedded timestamp of its creation time? From the mongo shell, you can use getTimestamp() to retrieve the timestamp from the ObjectId, but there's no built in function to generate an ObjectId from a times
steveridout.github.io
이 사이트에서 60e869__ 부분을 작성된 시간을 대입하여 구할 수 있다.
'보안공부 > 워게임' 카테고리의 다른 글
suninatas -web 1,2,3,4,5 (0) | 2021.07.17 |
---|---|
LordofSQLInjection 4,5 (0) | 2021.07.16 |
Mango (0) | 2021.07.03 |
XSS game 1,2,3,4 (0) | 2021.05.28 |
LordofSQLInjection 1,2,3 (0) | 2021.05.27 |