This paper addresses the critical security challenge posed by Sybil attacks in wireless sensor networks (WSNs), where a single node impersonates multiple identities to disrupt network operations. We propose a novel trust-rating mechanism based on evolutionary game theory, which incorporates incentives to foster cooperation and deter malicious behavior. By adjusting parameters such as P, \(\omega _{T}\) , \(\varphi\) , and \(\alpha\) , network operators can guide the evolution of strategies toward desirable outcomes, including complete collaboration \(x_{2} = 1\) . The stability of \(x_{2}\) ensures robust defense against Sybil attacks, while \(x_{3}^{*}\) identifies conditions under which partial collaboration may persist. Rigorous mathematical analysis and proofs support the mechanism’s foundation, showing that under favorable conditions (Theorem 2), collaboration strategies dominate, ensuring communication stability within the WSN. The derivation of evolutionarily stable strategies (ESS) demonstrates that system dynamics favor cooperation, which is validated through OMNET++ simulations. The results confirm the mechanism’s effectiveness in achieving ESS and enhancing WSN security, achieving a high true detection rate (TDR) of 99.8% and a low false detection rate (FDR) of 0.8%, outperforming existing Sybil detection methods.