The document surveys security threats in wireless sensor networks (WSNs) within the Internet of Things (IoT), focusing on the unique security requirements and challenges posed by resource-constrained environments. It reviews various security solutions, including intrusion detection systems (IDS), examining both signature-based and anomaly-based detection methods, as well as the effectiveness of different attack detection techniques. The conclusion emphasizes the need for optimized detection mechanisms to handle multiple attack types while balancing resource consumption.