With the rapid development of network technology, the number of network security threats grows more quickly. As the members of the network interconnection use network protocols and network protocol itself is a highly complex set, also some programmers do not have rigorous programming habit, attacks against network protocols continue happens. In order to found a scalable platform for attack resistance test, this paper proposed a simulation method for network attack. The authors designed a modular framework and using XML to describe the test cases. They also realized both stateful and stateless attacks by socket programming and Jpcap packet forging method. Experiment results showed that the system has good scalability and provides a template-based testing circuit.