The proliferation of Internet of Things (IoT) devices is revolutionizing various aspects of life. With projections by International Data Corporation (IDC) reaching two trillion devices in the near future, IoT applications are empowering individuals through smart gadgets. However, this interconnected landscape also presents a growing attack surface for malicious actors. As businesses and consumers embrace IoT, robust security becomes paramount. This paper proposes a comprehensive security framework for detecting and mitigating IoT device attacks. The framework addresses the increasing vulnerability of IoT devices, particularly to botnet attacks. The infamous Mirai botnet, with its publicly available code spawning variants, highlights the critical need for proactive security measures. Our framework outlines a multi-layered approach for effective threat mitigation. It encompasses methods for IoT botnet discovery, investigation, and neutralization. The initial module focuses on identifying vulnerable ports and attack vectors specific to IoT applications