Emotet pcap analysis
How a malicious DLL rides over HTTP

TL ; DR
Even though i mostly looked at the solved writeups, I solved half of it myself unknowingly lol.
Background
Today, i got curious on how to actually apply the things i learnt in Wireshark, so i searched up some platforms and found a pcap file from ISC Diary - December 2021 Contest: Forensic Challenge and went in blind.
Challenges
Provide the following information:
IP address of the infected Windows computer.
Host name of the infected Windows computer.
User account names from the infected Windows computer.
Date and time the infection activity began in UTC (the GMT or Zulu timezone).
The family of malware that caused this infection.
Answers
Infected IP:
10.12.3.66Hostname:
DESKTOP-LUOABV1User:
darin.figueroaStart:
2021-12-03 19:42:47 UTCFamily:
Emotet
Analysis
After trying things on my own and unintentionally solving half the challenges, here are the steps and wireshark filters i took:
nbns

I found that there is only one Windows client, which was suspicious.
Then i tried the kerberos filter since it was under the Active Directory(AD).
kerberos.CNameString
The CNameString outputs the AD username.

As you can see, the Windows user account name through Kerberos traffic darin.figueroa
Now, this is where i got stuck, i didn’t know where to look after this, so i looked up in the writeup/solution, and found out a simple HTTP filter can sort things out.
(http.request or tls.handshake.type eq 1) and !(ssdp)
What this basically does is, tells wireshark to "Show me any unencrypted HTTP request packet OR any initial HTTPS Client Hello packet, BUT make sure none of them are SSDP packets."

The two HTTP URLs used to retrieve the Emotet DLL were:
hxxp://gamaes[.]shop/wp-content/plugins/sSTToaEwCG5VASw/
hxxp://newsaarctech[.]com/wp-content/Sx9tvV5/
Then i got curious and went over to VirusTotal to check these links, and conveniently, they were actual live malwares.
The following IP addresses over TCP port 443 have been reported as C2 channels for Emotet:
172.104.227.98 port 443 [Link to IP address in Feodo Tracker]
163.172.50.82 port 443 [Link to IP address in Feodo Tracker]
With a basic web filter, scroll down a bit to find SSL/TLS traffic using TCP ports 465 and 587 starting at 20:09 UTC. This represents encrypted SMTP traffic, and it reveals our Emotet-infected host also acted as a spambot. Emotet uses Emotet-infected Windows hosts to help distribute new Emotet malspam.

Then, once again, i got stuck, oof, and looked it up at the solution and found out that since Emotet just spams mail on hosts, why not check the SMTP??
Yep, Thats what i did (shamefully copying)

Since we cant really read raw data properly, we will be using
smtp.data.fragment

You can extract these 17 emails using File --> Export Objects --> IMF... as shown below.

All of these emails are spoofed replies to legitimate email chains collected from previously-infected Windows hosts. All of these emails have attachments. Some of the attachments are Excel spreadsheets. Other attachments are password-protected zip archives. We can review the emails using an email client. Well, Linux automatically opens ThunderBird or something, so i will go with that.

Attachment : Excel spreadsheet
And that’s how i successfully managed to solve the forensics challenge.
Images and original solutions/writeups source:
https://isc.sans.edu/diary/December+2021+Forensic+Contest+Answers+and+Analysis/28160
About the author
- Just a SOC analyst doing detection engineering across banking-sector SIEM environments (LogPoint, FortiSIEM, Wazuh), with a habit of digging past the alert to the mechanism underneath. I build automation to cut manual triage overhead and write custom detection rules for endpoint and network anomalies. Outside work: built a DNS resolver from scratch against RFC 1035, an ARP spoofing detector in C , design CTF challenges and I read Linux kernel source for fun. I write about what I find at prayush.hashnode.dev.
Comments
Join the discussionNo comments yet. Be the first to comment.





