Wireless sensor networks (WSNs) which powered by batteries are widely used in military, healthcare, and scientific environments. One important challenge for setting WSN is the energy problem. Power management is one of efficient solutions for such problem and must be taken into account at all levels of the WSN. However, the power management may be out of action when the WSN suffers malicious attacks. In this paper, an Attack-Resistant Power Management (A-RPM for short) scheme is proposed for WSN to deal with the energy problem and prolong the operating time of sensor nodes as well as coordinators. Most importantly, the A-RPM is still effectual when WSN under malicious attacks such as denial-of-service attack. The A-RPM efficiently turns WSN nodes into sleep mode, which consumes less energy, but requires higher latency to awaken, when these nodes are idle and wake them up when necessary. A token based operating mode transition policy is developed to control the power of WSN nodes. Our simulation result shows that the A-RPM effectively reduces power consumption up to 16.35% when the network suffer malicious attacks compared with that of the standard power management scheme.