반응형
반응형

패킷 파일이 주어집니다.

처음에 바로 FTP 패킷들이 보이는데, FTP로 파일을 받았는지 확인해봅니다.

 

Wh1t3H4T.zip 이라는 파일을 전송받았음을 확인할 수 있으며,

해당 파일을 간단하게 추출할 수 있습니다.

 

해당 파일을 살펴보면, flag.png가 들어있는데 암호화가 걸려있습니다.

 

패킷 파일에 ftp 패킷 외에도 다양한 패킷들이 담겨 있으니 다른 패킷들을 살펴보겠습니다.

 

ftp 통신은 192.168.146.1(server) 와 192.168.143.137 (client) 사이에서 이루어졌습니다.

192.168.146.1과 추가적으로 통신을 한 흔적이 있는 지 확인해봅니다.

 

ftp통신 이후 TLSv1으로 통신을 한 것을 찾을 수 있습니다.

해당 패킷 내용 복호화를 시도하기 위해서 인증서 내용을 추출합니다.

 

modulus값을 소인수분해할 수 있는지 알아봅니다.

 

factordb.com에서 factor를 찾을 수 있었습니다.

구한 p, q 값을 가지고 pem파일을 생성합니다.

 

 

wireshark에서 Edit > Preferences > Protocols > TLS > RSA key list에 private.pem을 추가합니다.

 

 

패킷 내용이 복호화되었으며, pw를 찾을 수 있었습니다.

반응형

'WAR GAME > [DigitalForensic] with CTF' 카테고리의 다른 글

D-CTF [DefCoN#22 #1]  (0) 2021.07.08
D-CTF [DefCoN#21 #1]  (0) 2021.07.06
D - CTF [tom-and-jerry]  (0) 2021.07.04
D - CTF [계속 주시해라!] 풀이  (0) 2020.10.14
D - CTF [Find Key(moon)] 풀이  (0) 2020.10.14
반응형

cat.pcapng 파일이 주어진다.

usb cap이다.

 

 

DESCRIPTOR  Response DEVICE 패킷을 확인해보면, wacom 펜 타블렛임을 확인할 수 있다.

 

tshark를 이용해서 데이터를 추출한다.

 

tshark -r ./Cat.pcapng -Y 'usb.capdata && usb.data_len == 9' -T fields -e usb.capdata > usbPcapData

 

데이터는 이러한 구조를 가지고 있다고 한다.

Example:
02:f0:50:1d:72:1a:00:00:12
Bytes:
02:f0: -- Header
50:1d: -- X
72:1a: -- Y
00:00: -- Pressure
12 -- Suffix

 

x, y 좌표값에 대한 데이터를 추출하여 좌표평면에 표시하면 된다.

z=0 필압이 없는 경우를 제외하기 위해 z값도 추출

awk -F: '{x=$3$4;y=$5$6}{z=$7}$1=="02"{print x,y,z}' usbPcapData > xydata

 

wacom_decode.py

1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/python
from pwn import *
 
for line in open('xydata').readlines():
  coord = line.strip().split(' ')
  x = int(coord[0],16)
  y = int(coord[1],16)
 
  if z > 0:
    print u16(struct.pack(">H",x)),u16(struct.pack(">H",y))
 
cs

z가 0인 경우를 제외하며, xy값을 10진수로 표현

python wacom_decode.py > out.txt
gnuplot
plot "out.txt"

 

 

png로 export이후 

convert -flop flag.png flag-f.png

이미지 좌우반전

반응형

'WAR GAME > [DigitalForensic] with CTF' 카테고리의 다른 글

D-CTF [DefCoN#21 #1]  (0) 2021.07.06
D-CTF [Find Key(WhiteHat)]  (0) 2021.07.04
D - CTF [계속 주시해라!] 풀이  (0) 2020.10.14
D - CTF [Find Key(moon)] 풀이  (0) 2020.10.14
D - CTF [Find Key(butterfly)] 풀이  (0) 2020.10.14
반응형

Forensics

What App is on Fire?

 

Open chall.E01 with FTK Imager

In Recycle.Bin, i found meaningful data in two txt files.

and

But there is a flag.txt (not flaag.txt) in Desktop/ and it has fake flag.

Likewise, there is only zero size flag.bmp in Documents/my content/ .

So, I used NTFS log tracker to find location where flaag.txt and credentials.txt were moved.

$RVL2F46.txt was flaag.txt

and it's fake flag :) hehe.

 

Next!

credentials.txt was zipped and renamed to $R002W8L.txt (moved to Recycle.BIN).

credentilas.zip was deleted.

 

and $R002W8L.txt is zero size in given E01 file.

 

flag.bmp is meaningless.

haha :)

 

 

IE history modified log between credentials.txt logs.

 

IE history :

hmmmmmm..............

--------

[add something after ctf ends.]

왜 저 credentials.zip .txt 를 붙잡고 있었지.. 문제 제목에서도 whatsapp 써먹는거 알 수 있는데..

 

at first, Investigate chats from WhatsApp messages DB.


--------

Next! i checked firefox history.

I think flag is in there.

 

But it need id and pw.

 

id and pw were stored in logins.json and they were encrypted.

To decrypt them, 

create new profile

move logins.json and key4.db to new profile folder

 

start firefox

 

yeah!

 

?????????????

 

 

oh, another login page is at ./ and i use same account to login.

then i got half of flag.

 

반응형

'CTF Write Up' 카테고리의 다른 글

RTLxHA CTF 21 write up  (0) 2021.08.01
Securebug.se CTF Loki 2021 write up  (0) 2021.07.19
LINE CTF 2021 write up  (0) 2021.03.21
Codefest CTF 2021 Write up  (0) 2021.03.20
UTCTF 2021 write up  (0) 2021.03.15

+ Recent posts