The truth is that IoT is a new trend, a new surface with a lot of possibilities, and one of the most popular IoT botnets is Mirai, here is a brief description of it:
Mirai (Japanese for "the future", 未来) is a malware that turns
networked devices running Linux into remotely controlled "bots" that
can be used as part of a botnet in large-scale network attacks. It
primarily targets online consumer devices such as IP cameras and home
routers. The Mirai botnet was first found in August 2016 by
MalwareMustDie, a whitehat malware research group, and has been
used in some of the largest and most disruptive distributed denial of
service (DDoS) attacks, including an attack on 20 September 2016 on
computer security journalist Brian Krebs's web site, an attack on
French web host OVH, and the October 2016 Dyn cyberattack.
According to a leaked chat log between Anna-senpai and Robert Coelho,
Mirai was named after the 2011 TV anime series Mirai Nikki.
If you want to check the source code, here it is. Also you can check this report from Arbor Networks about IoT DDoS Attacks for further information.
Hope it helps.