The complexity increase in the software and hardware necessary to support more and more advanced applications for Wireless Sensor Networks conspicuously contribute to render them susceptible to security attacks. The nodes of most complex WSN applications sport desktop-level operating systems and this reliance on software make them ideal prey for traditional threats, like viruses and general malware. To address these problems, in this paper we devise a system for a dedicated mobile node to locate, track, access and cure the infected elements of a WSN, threatened by a proximity malware infection. In parallel, we provide a mathematical formulation for the aforementioned operations. We perform extended simulations, comparing our proposal against classic solutions in different network scenarios and we use the results of the mathematical formulation as a benchmark. Furthermore, we introduce a variation of our proposal, capable to support the concurrent operation of multiple mobile nodes and implement cooperation. (C) 2016 Elsevier B.V. All rights reserved.