Alpha team’s whistleblower captured a packet that leaked internal information to the outside using ftp internal confidential data.
Analyze the packet and flag the password and information obtained for the ftp connection!
Flag format : KorNewbie{password_yougetinformation}
If there is a hash value, it will be md5.
File : vithim.pcap
Writeup
The pcap contains a lot of tcp and http traffics, however we’re interested in the ftp stream (description).
This is the only ftp connection on the pcap:
We can see that an user inserted as password : root, and uploaded a file badguy.txt.
Why can’t we see the content of the file?
Because ftp send controls over the port 21, and data over the port 20. In fact in wireshark to check the data transmitted with ftp there is another display filter.
The data is a simple base64 encoded file, let’s decode it :
charlist = string.hexdigits.lower() for i in range(1, 26): value = rot(raw, i) flag = 0 for v in value: if v notin charlist: flag = 1 break if flag == 0: print("Is it md5 ? : " + value + "\trot" + str(i) + "\n")
Output:
Is it md5 ? : d459bdb6f5c094f2efdacfb9527e81fe rot19
With rot19 the string is a valid md5. Let’s try to crack it on md5decrypt.
So the information we need is IronDragon.
Let’s try to resume what we did using a python script.
# Stage 3 rot possible values with open("./raw.txt", "r") as f: raw = f.read() print("raw downloaded : " + str(raw)) charlist = string.hexdigits.lower() for i in range(1, 26): value = rot(raw, i) flag = 0 for v in value: if v notin charlist: flag = 1 break if flag == 0: print("Is it md5 ? : " + value + "\trot" + str(i) + "\n")