I learned from a recent "Malware Must Die" post about a Linux malware sample that is associated with DNS amplification attacks. As mentioned in the MMD post, several researchers have posted on this, or similar malware. Since I'm particularly interested in Linux malware, especially if it has a DDoS component, I thought I'd also take a look.
I was able to get the malware to execute on my Linux sandbox and connect to the C&C. While I've yet to see any DDoS related activity, I did pcap the C2 comms and snap an image for Volatility analysis. Links to the pcap and memory image can be found at the bottom of this post.
The malware was downloaded from hxxp://198.2. [.] 192.204:22/disknyp The MD5 hash value of the sample I obtained is 260533ebd353c3075c9dddf7784e86f9 The C2 is located at 22.214.171.124:59870
Referencing the supplied pcap, the compromised host connected to the C2 at 18:46 EST. Upon connection to the C2, the compromised host sends information about the current Linux kernel, in this case, "Linux 2.6.32-33-generic-pae"
bot sending kernel info to C2
It's interesting to note that the bot's C2 communications is via a persistent connection. Unlike typical HTTP bot check-in traffic, this bot maintains a connection to the remote host on port 59870. Since this is all one huge session, if you attempt "Follow TCP stream" in Wireshark, it will take a bit of time to present the output.
The C2 then sends 4 bytes, "0x04 0x00 0x00 0x00" upon which the bot sends back 27 bytes of all 0x00.
At 21:13, the C2 sends 75 bytes of hex:
Initial 75 byte sequence from C2 to bot
Approx. every thirty seconds, the C2 sends a new 75 byte sequence to the bot, for example:
Byte offset decimal 09 appears to be a counter, incrementing by one each time on each sequence from the C2. The contents at decimal offset 28 and and 71 initially vary between 0xC6 and 0xC7. This continues until 22:06 EST when the pattern changes and varied values are seen:
section of 'strings' output for PID 1241 segment 0x8048000
We note the string "fake.cfg" that was mentioned in other posts related to this malware. Attempting to find the file in the original /tmp directory:
linux_find_file for 'fake.cfg'
Let's use the 'yarascan' plugin to see if there are any other references to 'fake.cfg' in this image.
searching for other references to 'fake.cfg' using the linux_yarascan plugin
We see that the string 'fake.cfg' is only found in PID 1241, 'disknyp'. Again using the 'linux_find_file' plugin, we can dump the contents of 'fake.cfg' located at inode 0xed9dc088.
Contents of 'fake.cfg'
This appears to be some Proof of Concept or "testing" malware. There are several aspects to this sample that make me wonder if it was just put out there to see how quickly it would be detected and analyzed.
Analysis of the original file as downloaded from hxxp://198.2. [.] 192.204:22/disknyp that it is statically linked, not stripped.
The C2 communications is somewhat noisy. Maintaining a persistent connection with checkins every few seconds is not very stealthy.
No attempt to hide the process. In hours of running this, I didn't see any child processes or variance in the process on the local host.
'fake.cfg' is created in the malware's working directory. 'fake.cfg' really?
As I mentioned earlier in the post, I have yet to see any DoS related traffic from this sample. I'm also not aware of DoS activity being seen by other researchers. If anyone has learned otherwise, I'd love to hear from you!
Packet capture of initial malware download and execution - disknyp.pcap