Denial-of-service(DoS) is a major attacking method in networks
which seriously influences normal operation of wireless sensor networks(WSNs).DoS attack in WSNs is analyzed
a detecting algorithm against DoS attack based on immune principle is proposed.Intrusion characteristic library is established
so that security system is provided with learning and memorizing abilities.Energy consumption and resource occupation in repeated test is reduced greatly.Uncertainty and imperfection of information are solved using rough set in WSNs.Simulation results show that the proposed detecting algorithm is feasible