In two tiered architecture of sensor networks, the storage node serves as an intermediate tier between the sensor and the sink during storing data and processing queries. This model is widely adopted due to its processing efficiency and power saving and storing benefits. However, the storage node becomes attractive for the attackers due to its importance. SafeQ protocol is a protocol which prevents attackers from gaining information from sensor collected data and sink issued queries. SafeQ protocol also helps sink to detect comprised storage nodes when they misbehave.