Ph4nt0m 1ntrud3r

by sealldev
PicoCTF icon PicoCTF forensics
easy
Suggested: #network-forensics #cyberchef
Ph4nt0m 1ntrud3r
Ph4nt0m 1ntrud3r

Description

A digital ghost has breached my defenses, and my sensitive data has been stolen! ๐Ÿ˜ฑ๐Ÿ’ป Your mission is to uncover how this phantom intruder infiltrated my system and retrieve the hidden flag. To solve this challenge, you'll need to analyze the provided PCAP file and track down the attack method. The attacker has cleverly concealed his moves in well timely manner. Dive into the network traffic, apply the right filters and show off your forensic prowess and unmask the digital intruder!
Find the PCAP file here Network Traffic PCAP file and try to get the flag.

Hint: Filter your packets to narrow down your search.
Hint: Attacks were done in timely manner.
Hint: Time is essential

We start with a myNetworkTraffic.pcap which can be opened with Wireshark, so letโ€™s start there.

packets.png

There are a total of 22 TCP packets. Selecting a packet we can see what looks to be Base64 data in the tcp.segment_data: dataexample.png

Letโ€™s use tshark to extract the data:

$ tshark -r myNetworkTraffic.pcap -T fields -e tcp.segment_data
54636c672f33733d
626e52666447673064413d3d
...
39447049626b413d
514b7a46582b633d

Letโ€™s decode the hex in bash (This can also be done manually with CyberChef, Dcode.fr, etc):

$ tshark -r myNetworkTraffic.pcap -T fields -e tcp.segment_data | while read line; do echo $line | xxd -r -p; echo; done
Tclg/3s=
bnRfdGg0dA==
RHxhtS4=
...
9DpIbkA=
QKzFX+c=

Letโ€™s now decode the Base64 strings!

$ tshark -r myNetworkTraffic.pcap -T fields -e tcp.segment_data | while read line; do echo $line | xxd -r -p | base64 -d; echo; done
M๏ฟฝ`๏ฟฝ{
nt_th4t
D|a๏ฟฝ.
...
๏ฟฝ:Hn@
@๏ฟฝ๏ฟฝ_๏ฟฝ

Now were getting somewhere, Iโ€™m now going to filter it to human readable characters!

$ tshark -r myNetworkTraffic.pcap -T fields -e tcp.segment_data | while read line; do echo $line | xxd -r -p | base64 -d; echo; done | grep '^[A-Za-z0-9/\{\}\._-]*$'
nt_th4t
66d0bfb
{1t_w4s
_34sy_t
picoCTF
bh_4r_9
}

We can now visually reconstruct the flag!

Flag: picoCTF{1t_w4snt_th4t_34sy_tbh_4r_966d0bfb}

Share this writeup

Contribute

Found an issue or want to improve this writeup?

Edit on GitHub