[E-CTF25] Forensic 2

·2025년 2월 2일

Security

목록 보기
29/60

문제

문제 제목은 JUST A PCAP, 500점 짜리 문제였다.

풀이

일단 pcap 파일이라 와이어샤크에서 열었었는데, 크게 수상한 부분을 찾지 못했다.

사용된 프로토콜이 DNS라는 점이 다였고, 어떻게 건드려야할지 고민했다.

그러다가 tshark를 통해 dns 트래픽을 확인하기 위해서 실행시켰다.

┌──(kali㉿kali)-[~/Downloads]
└─$ tshark -r justapcap.pcap -Y "dns" -T fields -e dns.qry.name  
Warning: program compiled against libxml 212 using older 209
89504e470d0a1a0a0000000d49484452000004800000028808.000.exfil.attacker.com
06000000082b810d000000017352474200aece1ce900000004.001.exfil.attacker.com
67414d410000b18f0bfc6105000000097048597300000ec300.002.exfil.attacker.com
000ec301c76fa86400004f7149444154785eeddd0dd12cbb71.003.exfil.attacker.com
30605330865030874008865030833008832008821008813008.004.exfil.attacker.com
077fd5aea8acaf6f6b5733a3d91fedf35475d9f79cf79d5fa9.005.exfil.attacker.com
25f5cceef9d3df00000000d8da9ff21f00000000b017052000.006.exfil.attacker.com
000080cd2900010000006c4e010800000060730a4000000000.007.exfil.attacker.com
9b530002000000d89c0210000000c0e614800000000036a700.008.exfil.attacker.com
04000000b039052000000080cd2900010000006c4e01080000.009.exfil.attacker.com
0060730a40000000009b530002000000d89c0210000000c0e6.010.exfil.attacker.com
14800000000036a70004000000b039052000000080cd290001.011.exfil.attacker.com
0000006c4e010800000060730a40000000009b530002000000.012.exfil.attacker.com
d89c0210000000c0e614800000000036a70004000000b03905.013.exfil.attacker.com
2000000080cd2900010000006c4e010800000060730a400000.014.exfil.attacker.com
00009b530002000000d89c0210000000c0e614800000000036.015.exfil.attacker.com
a70004000000b039052000000080cd2900010000006c4e0108.016.exfil.attacker.com
00000060730a40000000009b530002000000d89c0210000000.017.exfil.attacker.com
c0e614800000000036a70004000000b039052000000080cd29.018.exfil.attacker.com
00010000006c4e010800000060730a40000000009b53000200.019.exfil.attacker.com

도메인 형식이 nnn.exfil.attacker.com으로 되어 있고, nnn 부분이 바뀌면서 요청이 발생하는 것을 보고 뭔가 이상하기도 했다.
가장 결정적으로 헤더 부분이 89 50 으로 시작하는 게 낯이 익어서 보니까 PNG 파일 헤더 시그니처길래 .nnn 앞부분을 따로 잘라 봐야겠다 생각했다.

cut 명령어를 사용하여 tshark -r justapcap.pcap -Y "dns" -T fields -e dns.qry.name | cut -d'.' -f1
이렇게 . 이전의 첫 필드 부분만을 추출하도록 했고, 추출한 부분들을 Hex Editor에 옮겨와 저장하니 Flag 가 나왔다.

profile
Whatever I want | Interested in DFIR, Security, Infra, Cloud

0개의 댓글