VEBEK is an energy-efficient framework for secure communication in wireless sensor networks. It uses dynamic encryption keys based on the residual virtual energy of sensor nodes, eliminating the need for rekeying messages. Each packet is encrypted with a different one-time key, improving security. VEBEK provides authentication, integrity, and non-repudiation without enlarging packets through modular design. It can efficiently detect and filter malicious data through two operational modes: VEBEK-1 watches all neighbors, VEBEK-2 watches some nodes statistically. Evaluation shows VEBEK eliminates malicious data without transmission overhead.