## 1 Introduction  
As a critical driver of the social evolution progress, the Internet has significantly transformed the way things communicate with each other. The Internet of Things (IoT) aims to promote this stride further to seamlessly connect people and various things, transforming society toward becoming intelligent, convenient, and efficient (ICE) with potentially excessive economic and environmental profits [1; 2]. At the bottom layer of the IoT, smart, low-power, and micro-sensor devices are typically deployed to measure the physical conditions of the object or environment being monitored. These sensor devices are typically networked through wireless mediums, forming a wireless sensor network (WSN). Due to some IoT application domains' safety-critical or mission-critical features, it is compulsory that the WSN operate robustly throughout the intended mission time and mission environment. In other words, robustness is one of the crucial requirements for the adoption of the WSN in critical applications [3; 4; 5; 6; 7]. Malfunctions of WSN devices, failing to capture data, network outage, data corruption, or loss may cause catastrophic effects, such as mission failure, financial loss, and harm to people and environments. For a more robust WSN, considerable research efforts have been disbursed in modeling and designing the reliability of WSN in the past decades. These studies are distributed at different levels, including the component level, path level, and system level [8]. The component-level reliability models aim to produce a realistic estimation of reliability or related attributes of nodes or links. [PERSON] et al. [9] modeled the battery-powered sensor node (BPSN) reliability as the battery component, while [PERSON] et al. [10] evaluated the BPSN reliability by considering the failures and dependencies of its four major constituent components. To make WSN resilient to sensor node failures, refs [11; 12] studied several reliability designs using hot or cold standby sparing techniques. As for the path level, refs [13; 14; 15] analyzed the connectivity-based reliability of an end-to-end path (selected using a specific routing algorithm). The system-level WSN reliability has been defined and modeled based on the function performed. Researchers focus on the information transfer from sink node to sensor node [16; 17; 18] and/or the opposite direction [19; 20; 21]. Although the levels are different, it is undoubted that these component parameter estimations are crucial foundations of the reliability analysis at the path level and system level of WSN. In addition, higher network connectivity usually leads to higher resistance to node failure because it can provide multiple alternative connectivity paths. Recently, increasing attention has been paid to the security of WSN. This trend has triggered our consideration of the security of WSN networks. According to current WSN reliability research, the information domain (for example, software failure and malware-related failure) is seldom considered in the reliability modeling of sensor nodes. To the best of our knowledge, no modeling work combines the propagation of malware and the impact of malware on the reliability of sensor nodes. WSN with high connectivity robustness needs a high average degree network topology, which will also accelerate the spread of malware, which may eventually reduce the connectivity robustness of WSN. If we only consider the component reliability or malware propagation factors to select the WSN network topology with higher connectivity reliability, then the results of selection may be quite different. Consequently, in this work, an agent-based model (ABM) is proposed to analyze the malware propagation in WSN together with component reliability. We identify the individual physical-domain and information-domain characteristics of the agents involved, as well as the agent-agent and agent-environment interactions.