The emerging usage of Internet of Things (IoT) paradigm brings,together with new services, new threats to Information Security.Among these threats, we have the Mirai Botnet that performed severalDistributed Denial of Service (DDoS) cyberattacks, exploringthe vulnerabilites of IoT devices. Within this context, this paperpresents a mechanism for detecting Mirai botnet attacks on IoTnetworks using ML techniques and comparing different approaches.The mechanism was evaluated using a set of traffic data from realIoT devices, achieving results with 99 % precision in detecting MiraiBotnet attacks.