It is imperative to take reliable measures against outbreaks of malware to enable large-scale application of mobile wireless sensor networks (MWSNs).An effective measure is through dissemination of security patches to immunize or heal the nodes.Considering the mobile behavior of nodes
a malware propagation dynamic model is proposed based on epidemic theories.We formulate an optimal objective function subject to this model with immunization and heal proportion as optimal control variables.Our goal is to minimize the cost of the two measures and the number of infected nodes.Through stability analysis of equilibrium
we find the threshold whether a malware propagates or dies out.We used Pontryagin's maximum principle to obtain the optimal levels of the two controls.Simulation results show that the model play a significant role in building up the strategies of preventing malware from propagation in MWSNs.