The document proposes and evaluates an architecture and algorithm for detecting worm infections that use various scanning techniques. It analyzes different scan methods worms could use, such as random scanning, scanning only addresses in routing tables, and hitlist scanning. It then presents a generic worm detection architecture that monitors for malicious activities by analyzing statistics on scan traffic, such as the number of source addresses and traffic volume. The paper introduces an algorithm called the victim number based algorithm that relies solely on increases in the number of source addresses to detect infections. Simulation results show this algorithm can detect a Code Red-like worm when only 4% of machines are infected.