Internet of Things (IoT) has infiltrated the digital realm, and critical efforts are being made to create robust security for these technologies. However, with increasingly sophisticated attacks, it is essential to understand IoT device security in depth. We orchestrated Denial of Service (DoS) attacks for four different IoT devices through network flooding to understand the device vulnerabilities from the network level. We conducted our experiment in the lab environment using other IoT devices, including the Amazon Echo, a smart light-bulb, a smart camera, and a smart garage door opener. We used Raspberry Pi as the main target to access other network devices with different protocols to conduct the DoS attack. We generated the DoS attack using Kali Linux installed in a virtual environment. This experiment demonstrated that hackers might exploit sensor vulnerabilities to gain unauthorized network access and use user data through various IoT devices. We proposed an effective Intrusion Detection technique using a combination of machine learning classifiers and deep learning. The machine learning models include logistic regression, decision tree, random forest, and support vector machine to detect and mitigate the attack. The outcomes show the algorithm which presents the highest degree of attack detection accuracy. Our findings also show that DoS attacks continue to be a significant concern even with improved technologies and security protocols. Finally, we provide design implications to address such critical security flaws.