Abstract: In the rapidly evolving digital landscape, cyber security has become increasingly challenging due to the proliferation of connected devices and the Internet of Things (IoT). Traditional cyber security measures often rely on static algorithms, which are insufficient to counter the dynamic nature of modern cyber threats. This paper presents a machine learning-based approach to enhance cyber security by automating the detection of malicious URLs and files in connected USB devices. The proposed system processes data collected from online public sources, preprocesses it, and trains an ML model to classify inputs as malicious or legitimate. The system's performance is evaluated through rigorous testing, demonstrating its effectiveness in real-world scenarios. The findings suggest that integrating AI into cyber security can significantly improve detection accuracy and reduce reliance on manual interventions.