kcsc-club / ctfs

repository for kscs-ctfs
8 stars 1 forks source link

Writeup for challenge Let's take a look at the operating system architecture #2

Closed SilverKnightKMA closed 2 years ago

SilverKnightKMA commented 3 years ago

Name: Let's take a look at the operating system architecture

Category: Forensics

Links & writeup: https://bit.ly/2WCKVLC

Description: We got some good files from the victim's computer. I think you know what to do with it. Find it up!

Questions:

  1. What is the originai name of the file "renamed" Hint length is 6
  2. What is the user of the computer in use? Flint length is 8
  3. This section is hosted on the Internet
  4. What is the name of the final file downloaded by the victim? Hint length is 4

Hint: Renamed file has more information than you think!

Point: 1000

ctfer: 5L1V3RKN16H7KM4

SilverKnightKMA commented 3 years ago

Let's take a look at the operating system architecture

Challenge Link :

https://bit.ly/2WCKVLC

Supportive Tools:

  • File
  • Registry Explorer/RECmd
  • DB Browser for SQLite

    Writeup

    Phân tích challenge

    Chúng ta nhận được 1 file chall.rar, xả nén ra ta có một folder Roaming và file renamed 1.png Theo như cấu trúc thư mục trong Roaming, mình nhận ra đây là một phần của folder AppData trên Windows. Dùng command File, ta có kết quả đây là registry file 2.png

    Q1

    What is the originai name of the file "renamed" Hint length is 6 Chúng ta tiến hành mở file renamed bằng Registry Explorer/RECmd 3.png Từ các key đã cho, chúng ta có thể xác nhận đây là hive HKEY_CURRENT_USER Trong Windows, hive HKEY_CURRENT_USER được đặt tại thư mục user với tên NTUSER.DAT 4.png

KMACTF{ntuser_

Q2

What is the user of the computer in use? Flint length is 8 

Từ hive HKEY_CURRENT_USER chúng ta nhận được ở trên, theo đường dẫn Control Panel\Desktop\Wallpaper, ta có đướng dẫn đến hình nền Desktop của user: 5.png

KMACTF{ntuser_kcsc0x21_

Q3

This section is hosted on the Internet 

Chúng ta kiểm tra thư mục Roaming, trong đó có thư mục Mozilla, theo google thì Firefox lưu trữ user profile ở đây, bao gồm Bookmarks, History, Cookie và lịch sử Download,... Chúng ta tiến hành mở file places.sqlite từ profile folder của Firefox 6.png bằng DB Browser for SQLite Lịch sử truy cập ở table moz_places 7.png Chúng ta có thể thấy (bài viết về vụ 2 vợ chồng mất tích ở Thanh Hoá) có một url từ github: https://raw.githubusercontent.com/dianguc38/CTF/master/part2.md 8.png

KMACTF{ntuser_kcsc0x21_w4s_h3r3_

Q4

What is the name of the final file downloaded by the victim? Hint length is 4

Từ file places.sqlite ở Q3, ta có thể truy cập lịch sử download bằng table moz_annos 9.png Chuyển thời gian sang dạng có thể đọc được 10.png

KMACTF{ntuser_kcsc0x21_w4s_h3r3_war601}

Tuy nhiên thì flag bị sai, và mình đã xin anh Khải hint, và chúng ta có:

Hint: Renamed file has more information than you think!

Sau một hồi đọc từng key trong HKEY_CURRENT_USER, mình đã tìm thấy flag ở key Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs 11.png Nhìn thời gian thì file war601 download sau cùng, tuy nhiên đề bài yêu cầu final file downloaded by the victim chứ không phải final file downloaded nên chúng ta có flag mới

KMACTF{ntuser_kcsc0x21_w4s_h3r3_0808}

Mình mất khoảng 5h để giải được bài này, chủ yếu ở Q4 vì không có định hướng và đề bài cũng khá lừa

kcsc-club commented 3 years ago

0808 -> Ngày sinh nhật CLB. Chứ không phải 8080 nhé :)

ghost commented 3 years ago

B ơi gthich cho mình vs

SilverKnightKMA commented 3 years ago

B ơi gthich cho mình vs

  • Hint có tác dụng gì nhỉ mình vẫn chưa hiểu?
  • Cả phần 1 của cờ nữa, sau file đó tên gốc lại là ntuser.dat nhỉ?

Q4 em đang bị stuck vì đã có file download wrar601.exe, em không tìm thấy định hướng tiếp theo, khi có hint từ anh Khải thì mới có thể tiếp tục tiến hành tìm kiếm sâu hơn Q1 em xác nhận đó là file ntuser.dat là bởi vì nội dung các key và subkey trong file rename là của khoá HKEY_CURRENT_USER, mà file chứa khoá HKEY_CURRENT_USER là ntuser.dat được đặt trong folder user của windows, như ảnh em đã chụp