In order to restrain botnet security issues arising from operation of the network, in the dissect of botnets based on the principle of a real botnet tracking, detection methods, effectively restrain botnet network security threats. Through the understanding of the concept of botnets and botnet generated on the principle of the internal working mechanism of development, type and risk of such a comprehensive study, gives the tracking, detection and prevention of specific methods of different botnets. Experiments show that this method is effective to inhibit the breeding of botnets in the slow extension of the network, defense and control of active botnets, strengthen the operation of the network user data safety and security has a very important significance.