In a wireless sensor network (WSN), when an adversary physically captures one or more sensor nodes, all the information stored on these nodes may be exposed completely. Consequently, the adversary can use the information to attack the remaining part of the network. In this paper, we investigate the effects of different node capture attack patterns on state-of- the-art key management schemes. We find that a compromised WSN can be made resilient to such attacks by introducing new resources, such as new nodes and new keys. Based on this observation, we propose two recovering strategies, namely, link replacement strategy and node replenishment strategy, to replace the compromised links and the functions of the compromised region, respectively. Simulation results indicate that our proposed strategies can improve the network resilience of a compromised WSN significantly with a small amount of additional resources.