Over the last decade botnets survived by adopting a sequence of
increasingly sophisticated strategies to evade detection and take
overs, and to monetize their infrastructure. At the same time, the
success of privacy infrastructures such as Tor opened the door to
illegal activities, including botnets, ransomware, and a marketplace
for drugs and contraband. We contend that the next waves of botnets
will extensively attempt to subvert privacy infrastructure and
cryptographic mechanisms. In this work we propose to preemptively
investigate the design and mitigation of such botnets. We first,
introduce OnionBots, what we believe will be the next generation of
resilient, stealthy botnets. OnionBots use privacy infrastructures for
cyber attacks by completely decoupling their operation from the
infected host IP address and by carrying traffic that does not leak
information about its source, destination, and nature. Such bots live
symbiotically within the privacy infrastructures to evade detection,
measurement, scale estimation, observation, and in general all
IP-based current mitigation techniques. Furthermore, we show that with
an adequate self-healing network maintenance scheme, that is simple to
implement, OnionBots can achieve a low diameter and a low degree and
be robust to partitioning under node deletions. We develop a
mitigation technique, called SOAP, that neutralizes the nodes of the
basic OnionBots. In light of the potential of such botnets, we
believe that the research community should proactively develop
detection and mitigation methods to thwart OnionBots, potentially
making adjustments to privacy infrastructure.