The purpose of network security auditing is to safeguard network and information security through the assessment of network security vulnerabilities. Data mining is mainly used to mine potential information from massive amounts of log data, which can provide both accurate and valuable auxiliary data for network security auditing and relevant information for monitoring and management of terminals in different network environments. Firstly, the theory of data mining technology is explained, secondly, some data mining algorithms applied to network security audit are discussed, and finally, the design difficulties and functions of the network security audit system based on data mining are studied, aiming to provide reference for securing network and identifying hidden risks.