A botnet is a collection of internet-connected gadgets, which might include computer systems, smartphones, IoT devices, that are infected and managed by a common type of malware. Botnets can be used to perform a broad variety of harmful activities, including distributed denial of service (DDoS) attacks, click fraud, and spam.