Passive worm have posed serious security threats to the functioning of unstructured P2P networks. A delayed SEIRS epidemic model with death, off line and online rate is constructed based on the actual situation of P2P users. The basic reproduction number that governs whether a passive worm is extinct or not is obtained. In this model, time delay consists of latent and temporary immunity periods. The impact of different parameters on this model is studied with simulation results, especially the effect of time delay, which can provide an important guideline in the control of unstructured P2P networks as well as passive worm defense.