Wireless sensor networks (WSN) have received a lot of attention recently due to their wide applications such as target tracking, environment monitoring, and scientific exploration in dangerous environments. Time synchronization is an important component of sensor networks to provide a common clock time in sensor nodes. Time synchronization protocols provide a mechanism for synchronizing the local clocks of the nodes in a sensor network. Some of the sensor nodes may be malicious, which can disrupt the normal operation of a sensor network. In this paper, we find out malicious nodes and propose time synchronization based secure protocol for a group of non-malicious nodes.