Monday, March 11, 2019

[Writeup] Pragyan CTF - Forensics

Welcome

We have a jpg file, I used HXD and see a zip file in it, then I used binwalk to get the zip file.


1
2
3
4
5
6
7
$ binwalk welcome.jpeg 

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
0             0x0             JPEG image data, JFIF standard 1.01
10600         0x2968          Zip archive data, at least v2.0 to extract, uncompressed size: 9886, name: d.zip
20483         0x5003          End of Zip archive

And what I got? One secret.bmp file and one zip file contain the flag but protected by password. Dig the bitmap file I saw a base64 strings is: dGhlIHBhc3N3b3JkIGlzOiBoMzExMF90aDNyMyE==
Decode and I got the password is: h3110_th3r3!
After have a.png I used stegsolve to check lsb and got the flag



Flag: pctf{st3gs0lv3_1s_u53ful}

Magic PNGs

The picture you_can't_see_me.png have wrong 2 point, first is the header, I changed the header

89 50 4E 47 2E 0A 2E 0A to 89 50 4E 47 0D 0A 1A 0A

then I look for chunk: 6, the iidat should be IDAT




fix it and I got the image:



And the password for zip file is md5(h4CK3RM4n)

Flag: pctf{y0u_s33_m33_n0w!}



Save Earth

In the left over data of pcap file I believe I recognize something interesting



But at that time I didn't know what it is and I wasted a lot of hour to read a lot of post and document but I receive nothing. Then one idea in my head, how about crypto? Something like binary 0 and 1 make a word. I ask crypto-man in my team and in a jiff he asked me: "Did you try morse code?". And I knew reason why I see these number so familiar.

Export file as CSV and delete the excess, I used notepad ++ to change 02 to - ,  04 to . and 01 is whitepsace. Decode morse at here I got flag.

Flag: ctfs4v3

Slow Realization

After do some stuff and got the password in mp3 file, and surprise it not a password, I tried to you pdfcrack and rockyou dictionary because it a last way to decrypt the password.


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
$ pdfcrack -f flag.pdf --wordlist=rockyou.txt

PDF version 1.4
Security Handler: Standard
V: 2
R: 3
P: -1028
Length: 128
Encrypted Metadata: True
FileID: 936f22840118a542401db0b9716930c8
U: c6417694dd485620f1629c6ae47a795700000000000000000000000000000000
O: ed2fd42c99e91c38c42eff249cacb3f968f3605be0ee9dc8586d5d38ab06c7f5
found user-password: 'congratulations'


And hell yeah !!

Flag: pctf{y0u_h34rd_m3_r1ght}

Late PR
You just need to use strings and grep command on linux and you will get the flag, I deleted the file so I can't put flag here

Related Posts:

  • [Writeup] Mates SS3 Round 2 Misc Round 2 Sanity Check Theo miêu tả của đề bài, tác giả nhấn mạnh vào chữ rotate, nên mình google với từ khóa rotate decrypt và truy cập trang http://rumkin.com/tools/cipher/rotate.php sau khi thử với Box… Read More
  • [Writeup] TuCTF 2018 Reverse Danger Zone: Đề bài cho ta một file pyc và khi thực thi ta được một đoạn string: =YR2XYRGQJ6KWZENQZXGTQFGZ3XCXZUM33UOEIBJ. Trông có vẻ giống chuỗi base64 bị đảo ngược, nhưng khi decode thì mình lại kí tự không đọc đ… Read More
  • [Writeup] Ice CTF 2018 - Forensics Modern Picasso: Trong bài này chúng ta có một file gif và nhìn hình thì ta có thể đoán rằng nếu tất cả các frame cùng ghép lại thành một bức ảnh thì có thể có được một bức hình chứa gì đó như QR code chẳng hạn. Vậy … Read More
  • [Writeup] PicoCTF2018 - Forensics Warmup 1 - Points: 50 - Extract file zip ta có được flag Flag: piocCTF{welcome_to_forensics} Warmup 2 - Points: 50  - Dựa vào header của file ta phải đổi đuôi thành .jpeg thay vì png nhưng mà windows thì n… Read More
  • [Writeup] Mates SS2 Round 4 - Forensics caigidzay Trong thử thách này để bài là một file dump, mbr/dos nên mình sẽ dùng auto spy để mở nó xem sao. Đập vào mắt mình là flag.jpg. Mình tốn kha khá thời gian với bức ảnh này vì lúc đầu tưởng đây là thử thách về stegano tuy n… Read More

0 comments:

Post a Comment