Now that smart phones can interact with computers through various interface technologies such as Bluetooth, infrared, or the 802.11 family of IEEE specifications, they are working in an environment where malware can propagate. While many studies have modeled the spread of malware, little has been done to take into account the different types of devices that may exist in an ad hoc wireless network. We have therefore developed a model which considers heterogeneous entities, interactions between different classes of entities, and diversity of entities as they affect the spread of a disease. We propose this analytical model as an aid to understanding the spread of malware through a network. In addition, we also have developed a formula to calculate the basic reproduction number, which is understandable as the possible average number of newly infected items, to investigate viral states of the considered system.