Botnets are networks consisting of computers that are infected with malicious codes (malware) and are consequently being remotely controlled by botnet operators. Botnets pose some of the most challenging security problems owing to their ubiquitousness, their size, their complexity, and the effectiveness with which they have been used to facilitate and perpetuate a wide range of cybercrimes.