Data Siege
Challenge Description :
"It was a tranquil night in the Phreaks headquarters, when the entire district erupted in chaos. Unknown assailants, rumored to be a rogue foreign faction, have infiltrated the city's messaging system and critical infrastructure. Garbled transmissions crackle through the airwaves, spewing misinformation and disrupting communication channels. We need to understand which data has been obtained from this attack to reclaim control of the and communication backbone. Note: flag is splitted in three parts."opening the pcap using wireshark and then clicking on statistics -> protocol hierarchy we can see http protocol and tcp data so let's filter by this for now

now on the first packet right click follow tcp stream and we can see a bunch of base64 strings and finally base64 encoded powrshell code

Third Part of The Flag :
let's decode it using cyberchef

let's filter by http protocol now

we have two endpoints, the first endpoint invokes powershell command to hit the endpoint /aQ4caZ.exe in the remote server

and the endpoint /aQ4caZ.exe is downloading the binary since we can see MZ which is the magic bytes of an executable

let's export this executable. go to File -> Export Objects -> HTTP

viewing the executable using detect it easy program we can see that it's 32 bit .Net executable so let's reverse it using dnSpy
looking at the functions we can see 2 interesting functions which are encrypt and decrypt

since we have a pcap file and malware that encrypts that means that we have encrypted traffic that we have to decrypt and this traffic is what we have saw previously on tcp data

analyzing the Decrypt function we can see that the encryptKey used is a constant that means that the encryption key is hard coded so we can recover it

double click on the EncryptKey we get this

double clicking on _encryptKey we get the value

Encryption Key :
now let's use the decrypt c# function and the encryption key to decrypt the encrypted traffic
you can use any online c# compiler
First Part of The Flag :
decrypting this base64 part yeilds the third part of the flag

Second Part of The Flag :
decrypting this base64 part yeilds the second part of the flag

Flag :
Last updated
Was this helpful?