Security or Privacy is the most important challenges in network. These challenges and issues are mostly affected in Wireless than Wired network because medium is open and less limited resources. Sensor is a tiny and low cost device. Wireless Sensor Network (WSN) is operated remotely and can be used in various fields like military surveillance, environmental monitoring, traffic monitoring, health monitoring and etc. In this paper, analysis of various security attacks and security techniques of WSN was done.