A Survey of Attacks and Security Requirements in Wireless Sensor Networks