Suhail, One of the ways is to use a network simulation software such as OPNET or NetSim (which I have used), and simulate the attack using that. The link https://tetcos.com/file-exchange.html has some codes and documentation for a DDOS Attack in IOT, related to NetSim.