The paper surveys various attacks and corresponding prevention and detection techniques in Mobile Ad-Hoc Networks (MANETs) and wireless sensor networks. It highlights the complexity of securing MANETs due to their dynamic nature and discusses several intrusion detection methods, including the Enhanced Adaptive Acknowledgment (EAACK) system, which addresses issues like malicious nodes and improves network performance. Recommendations for future research are provided to encourage the development of hybrid algorithms for better security in these networks.