A botnet is a collection of internet-connected gadgets, which may include computers, smartphones, IoT devices, that are infected and controlled by a common type of malware. Botnets can be used to perform a large range of malicious activities, consisting of dispersed denial of service (DDoS) attacks, click scams, and spam.