Review Article

DDoS-Capable IoT Malwares: Comparative Analysis and Mirai Investigation

Listing 2

CNC Server handles both admin/user and bot connections.
root/mirai/cnc/main.go
if l == 4 &&  buf[0] == 0x00 && buf[1] == 0
  x00 &&  buf[2] == 0x00
     // …
     NewBot(conn, buf[3], "").Handle()
else
     NewAdmin(conn).Handle()