This work aims to (1) secure IoT networks against the threat of Botnets using machine learning and deep learning techniques. We have presented one solution for IoT gateway and another one is under development for Raspberry Pi3 grade IoT devices. (2) Develop protocols for IoT swarms to self-heal (detect malicous behavior and remove it if possible).