Wireless sensor networks (WSNs) usually are applied in military systems, surveillance systems, etc. Since WSNs always are deployed in open environments, the security mechanisms in WSNs are very important. Although there are many security mechanisms in WSNs, such as intrusion detection and fault tolerant system, few of them are proposed to detect compromised sensors. In this paper, we propose an application-independent compromise detection model, distributed cross-layer compromise detection model (DCCD), making use of a distributed mechanism and the information of each layer in the communication protocol to detect which sensors were already compromised. Due to the characteristics of low power, low computation ability, low storage space, simplicity and high-efficiency is our design goal. Only when compromised sensors can be detected, the WSNs could be safer in practice.