TOPSpin Security
Blog

Every major incident leaves a trail of lessons for defenders.We read the record so the next alert is not ignored.

Identifying and Analyzing the Kelihos Botnet

A tangle of network cables plugged into a switch
A tangle of network cables plugged into a switch. Photo: Dirk Vorderstraße, CC BY 2.0, via Wikimedia Commons.

Kelihos is one of the most stubborn botnets in the history of the internet. It appeared around 2010, was declared dead several times and kept coming back, each time in a slightly different shape. For defenders it is a useful case study, because almost every lesson about peer-to-peer botnets can be found somewhere in its history.

A botnet that refused to stay down

The first coordinated takedown came in September 2011, when Microsoft and its partners went to court, seized the domains behind the botnet and disrupted its command structure. The operators did not try very hard to save the old network. They simply started building a new one, and a variant researchers called Kelihos.B was soon spreading.

In March 2012 a group of security companies and researchers sinkholed Kelihos.B, redirecting more than a hundred thousand infected machines to servers under their control. Again a new generation appeared almost immediately. In early 2013 researchers demonstrated a live sinkholing operation against the newest variant on stage at the RSA Conference in San Francisco. The botnet survived that too, and later variants kept adapting their infrastructure to avoid detection.

The story only ended in April 2017, when the US Department of Justice announced a takedown of the remaining network and the arrest in Spain of the man it identified as its operator. He was later extradited to the United States and pleaded guilty.

How Kelihos was built

Kelihos used a layered peer-to-peer design. Infected machines exchanged lists of peers with each other, some of them acted as relays, and a small hidden tier of back-end servers issued the actual orders. Because there was no single command server, blocking one address or domain did little. Takedowns worked only when researchers reverse-engineered the peer protocol and poisoned the peer lists faster than the operators could repair them.

The infected machines were put to work in several ways: sending large volumes of spam (including pump-and-dump stock scams), stealing credentials and wallet files, and acting as proxies for other criminal traffic. That mix is typical of modern botnets, which are rented out to whoever pays.

What defenders inside a company can see

A takedown is a job for law enforcement and large research teams. Inside an ordinary network, the useful question is simpler: is one of our machines part of something like this? Several signals give infected hosts away:

  • Workstations sending email directly to the internet on port 25 instead of through the company mail relay.
  • Many short outbound connections to residential IP addresses on unusual ports, typical of peer-to-peer traffic.
  • DNS lookups for domains that change their IP addresses every few minutes (fast-flux hosting).
  • Access attempts against internal file shares or decoy credentials that no legitimate user would touch.

The last signal is where deception helps. A bot that harvests stored credentials or browses network shares will eventually reach a planted decoy, and that single touch is a high-confidence alert. We describe the idea in more detail in our overview of decoy technology.

Why it still matters

Kelihos is gone, but the business model is not. Botnets built the same way are still rented out for spam, proxy traffic and automated login attacks. Online betting platforms see this every season: when a big tournament starts, rented bots replay leaked passwords against sportsbook accounts by the million. The defensive lessons from Kelihos, such as egress filtering, watching for peer-to-peer traffic and planting traps that only an intruder would touch, apply just as well there.

Back to Top