In terms of the theories and techniques of network security, packet capture and protocol analysis are a branch of network security protocols, which depend on widely used insecure protocols at the present day. The paper mainly discusses the capture and analysis of network packets, and subsequently designs a capture program for network packets. Meanwhile, the working principle and the internal structure of function libraries captured by BPF based-on packets, namely Libpcap and Winpcap was analyzed carefully after the detailed analysis of some elementary implement principles, methods and approaches in the current capture and analysis system of network packets. By describing the hiberarchy of the capture and analysis system of network packets, a specific design and implement methods of the packet capturing and analyzing system by Winpcap were proposedin. In the end, the paper states and predicts the directions for implement methods of network data monitoring and analyzing.