- About us
- Code of Conduct
- Google SoC
- Recent posts
- Security Workshops
While it seems to be impossible to say whether waledac is the successor of storm or not, what we can do is take a look at the traffic encryption. They guys over at Shadowserver have already blogged some details about this. We at the Giraffe Chapter investigated waledac's communication protocol further. Here are our results.
Waledac uses regular HTTP request to transmit command requests and to retrieve responses. It uses HTTP fast-flux proxies to hide the true origin of the command&control (C&C) server. Due to the fact that the regular Windows HTTP API (
WinINet) is used, the traffic is hard to differentiate from regular HTTP traffic. Furthermore, it even allows Waledac to use proxy servers after the user has generally authenticated. The requests use POST and encrypted + encoded payload data:
Waledac relies on up-to-date encryption technologies, like e.g., RSA. We reverse engineered important parts of the traffic encryption engine inside the executable and extracted the important encoding and decoding parts. This enables us to read Waledac traffic. Thanks to Greg Sinclair, a design fault has been found that allows a fast crypto attack and offline decoding. We have developed a traffic decoder that has been used to gather information about the C&C protocol underneath.
The first request is of type
0xff and is used to exchange encryption keys between the infected node and the botnet master. The traffic is nicely formatted using XML. Each request and response start with "
lm" and a command enclosed in "
t"-tags. The "
v"-tag holds the protocol version, which varies among different generations of waledac binaries. The "
i"-tag uniquely identifies the infected node and stays the same after reboots. Here is the decoding of the message from above:
As we can see, for the handshake, the
getkey command is issued. The payload contains an X.509 certificate that holds a self-signed version of the node's public key. It is always generated on the fly even though containing a validity of one year. Details about the certificate can be found here.
The response looks very similar. Version and command tags are duplicated. Instead of the certificate, a base64 encoded session key is exchanged that is encrypted using the RSA key contained in the request's certificate. This session key is then used for all subsequent C&C traffic.
After a successfull handshake, waledac zombies issue a
notify request containing an entity to contact, like e.g., "
mirabella_site". Information about the host's clock is also included, possibly for time synchronization:
The next reponse contains a lot of information: The node's external ip-address and hostname together with a special DNS IP and SMTP address. Both are not related to the node's IP address, but probably related to the fast-flux and spamming engine. In this case the DNS IP address belongs to an open DNS server in the US, the SMTP IP address points to an SMTP server at Google:
Very interesting are the "
dos"-tags (denial of service?), and the commands attribute. The "
p"-tag, in this case, contains an "
update" command that results in the download of a picture of the Governor of California shown below. Besides the real image data, it carries additional data piggybacked that is to be executed on the node. This additional data is actually a Windows PE file, ecnrypted with a static key. We have observed several such updates, all with varying executables.
We are not done with our investigations, yet. And there are still a lot of open question. We will keep you up to date here. Other interesting commands, like the following, are likely to come: