Wireless sensor networks consist of distributed autonomous devices that can monitor various environmental conditions. Securing these networks is challenging due to constraints on sensors' processing, memory, and battery power. Attacks on wireless sensor networks can target security mechanisms or routing mechanisms. Common attacks include denial of service through jamming, spoofing and altering information in transit, replication attacks, and physical node destruction. Effective security schemes must provide data confidentiality, integrity, and freshness given sensors' limitations. Developing efficient detection of compromised nodes reporting false data while ensuring holistic security in wireless sensor networks remains an important research challenge.