The popularity of peer-to-peer (P2P) networks makes them an attractive target to the creators of viruses and other malicious code. Recently a number of viruses designed speciﬁcally to spread via P2P networks have emerged. Pollution has also become increasingly prevalent as copyright holders inject
multiple decoy versions in order to impede item distribution. In this paper we derive deterministic epidemiological models for the propagation of a P2P virus through a P2P network and the dissemination of pollution. We report on discrete simulations that provide some veriﬁcation that the models remain sufﬁciently accurate despite variations in individual peer conduct to provide insight into the behaviour of the system. The paper examines the steady-state behaviour and illustrates how the models may be used to estimate in a computationally efﬁcient manner how effective object reputation schemes will be in mitigating the impact of viruses and preventing the spread of pollution.