Enhancing Cyber Defense: Leveraging AI for Detection