An operating system log audit method, system and storage medium based on ElasticStack
Through the method based on Elastic Stack, the problems of low efficiency, poor real-time performance, poor scalability and low degree of visualization of the log audit system when processing large-scale log data are solved, and high performance, real-time monitoring and early warning and intuitive analysis interface are realized, improving Improved security capabilities and system management convenience.
Patent Information
- Application Number
- CN202410329064.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-21
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-03-21
AI Technical Summary
Existing log audit systems have low efficiency, poor real-time performance, poor scalability and low visualization when processing large-scale log data, making it difficult to meet the needs of real-time auditing and large-scale data growth.
Using a method based on the Elastic Stack, through the data collection, storage, analysis and visualization stages, it uses components such as Syslog, Beats, Elasticsearch, Logstash and Kibana to achieve real-time log collection, in-depth analysis and visualization interfaces, and provides multi-dimensional data filtering and customization Report generation, and real-time monitoring of security threats for alerting.
It improves audit efficiency and scalability, realizes real-time monitoring and early warning, provides an intuitive visual analysis interface, and enhances security prevention capabilities and system management convenience.
Smart Images

Figure CN118170619B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of log auditing technology, and in particular to an operating system log auditing method, system and storage medium based on Elastic Stack. Background Art
[0002] In recent years, with the rapid development of big data and cloud computing technologies, log audit systems have been widely used in various industries. As an important means of recording computer system activities, the audit demand for operating system logs is growing. In order to meet this demand, various log audit systems have emerged and the technology is constantly improving. However, the existing log audit systems still have some problems when processing large-scale log data: 1. Low efficiency: Traditional log audit systems usually use file storage or relational databases for data storage and query. For large-scale log data, their processing efficiency is low and cannot meet the needs of real-time auditing. 2. Poor real-time performance: Due to the limited data processing speed of traditional log audit systems, it is difficult to achieve real-time auditing. For operating system logs that change in real time, it is impossible to capture and warn abnormal events in time. 3. Poor scalability: Traditional log audit systems are usually based on fixed hardware and software configurations, which are difficult to elastically expand according to actual needs and cannot cope with large-scale log data growth. 4. Low visualization: Existing log audit systems usually only provide simple text or table display methods, lack intuitive visualization interfaces and rich data analysis functions, and it is difficult for users to quickly understand and analyze audit results. Summary of the invention
[0003] The purpose of the present invention is to overcome the deficiencies of the prior art and provide an operating system log auditing method, system and storage medium based on Elastic Stack.
[0004] The objective of the present invention is achieved through the following technical solutions: The first aspect of the present invention provides: an operating system log audit method based on Elastic Stack, comprising the following steps:
[0005] S1: Data collection phase: deploy log collection tools, configure log collection tool parameters, and collect various operating system logs in real time as the first log;
[0006] S2: Data storage stage, the first log is transmitted to the open source distributed search engine for processing to obtain the second log for storage;
[0007] S3: Data analysis stage, the second log stored in the open source distributed search engine is deeply analyzed by the open source data collection engine to obtain analysis results, wherein the deep analysis includes multi-dimensional log analysis and multi-condition log analysis, and an alarm threshold is preset;
[0008] S4: Visualization stage: Use open source tools to provide a visualization interface for the analysis results. The visualization interface displays the operation status and security status of the log audit system in real time, and provides multi-dimensional data screening and customized report generation.
[0009] S5: Security event monitoring stage: Use the security event monitoring system to obtain the security status of the log audit system in real time. When security threats are found, alarms or warnings are issued for various risks and events based on customized alarm strategies.
[0010] Preferably, the log collection tool is Syslog or Beats, and S1 further comprises the following steps:
[0011] S11: Select and install Syslog or Beats;
[0012] S12: Configure the input and output of Syslog or Beats, define parsing rules, and standardize various logs of the operating system to obtain the first log.
[0013] Preferably, the open source distributed search engine is Elasticsearch, and S2 further includes the following steps:
[0014] S21: Configure storage settings and index settings for Elasticsearch;
[0015] S22: using an open source data collection engine to process the first log, first defining a filtering rule, then extracting preset information from the first log and performing data cleaning to obtain a cleaned log;
[0016] S23: Using the conversion function of the open source data collection engine, the cleaned log is converted into a preset format to obtain a second log and stored in Elasticsearch.
[0017] Preferably, the open source data collection engine is Logstash, and the S3 further comprises the following steps:
[0018] S31: receiving the second log pushed by the log collection tool at the input stage of Logstash;
[0019] S32: In the filtering stage of Logstash, data cleaning, format conversion and event processing are performed on the second log. The filter plug-in is used to parse, filter and aggregate the second log to obtain the third log.
[0020] S33: Send the third log to the open source distributed search engine in the output stage of Logstash.
[0021] Preferably, the open source tool is Kibana, and the S4 further comprises the following steps:
[0022] S41: Use Kibana to create dashboards and visualization views as visualization interfaces to display the operation status and security status of the log audit system; realize multi-dimensional data filtering and custom report generation by dragging and configuring fields;
[0023] S42: The operation status of the log audit system and the security status of the log audit system are transmitted to one or more preset systems through the API or plug-in provided by Kibana.
[0024] Preferably, the security threats include: external threats, hacker attacks, internal violation operations, and equipment abnormalities. S5 also includes the following steps:
[0025] S51: Notify the security threat through email and / or SMS and / or sound, call the automatic running program or automatic running script to handle the security threat, and generate alarm data;
[0026] S52: Storing the alarm data in an alarm database.
[0027] The second aspect of the present invention provides: an operating system log audit system based on Elastic Stack, used to implement any of the above-mentioned operating system log audit methods based on Elastic Stack, including:
[0028] The data collection module is used to deploy the log collection tool, configure the log collection tool parameters, and collect various logs of the operating system in real time as the first log;
[0029] A data storage module, used for transmitting the first log to an open source distributed search engine for processing to obtain a second log for storage;
[0030] A data analysis module, using an open source data collection engine to perform in-depth analysis on the second log stored in the open source distributed search engine to obtain an analysis result, wherein the in-depth analysis includes multi-dimensional log analysis and multi-condition log analysis, and an alarm threshold is preset;
[0031] The visualization module uses open source tools to provide a visualization interface for the analysis results. The visualization interface displays the operation status and security status of the log audit system in real time, and provides multi-dimensional data screening and customized report generation.
[0032] The security event monitoring module uses the security event monitoring system to obtain the security status of the log audit system in real time. When security threats are found, it will issue alarms or warnings for various risks and events based on customized alarm strategies.
[0033] The third aspect of the present invention provides: a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by a processor, any of the above-mentioned operating system log auditing methods based on Elastic Stack is implemented.
[0034] The beneficial effects of the present invention are:
[0035] 1) High performance: Elastic Stack adopts a distributed architecture, which can efficiently process large-scale data and improve audit efficiency.
[0036] 2) Scalability: Elastic Stack has good scalability and can be expanded horizontally or vertically according to actual needs.
[0037] 3) Visual analysis: Visual analysis is performed through the Kibana interface, allowing users to intuitively understand the system status and security threats.
[0038] 4) Real-time monitoring and early warning: The system supports real-time monitoring and early warning functions, which can detect abnormal behaviors and deal with them in time, thus improving security prevention capabilities.
[0039] 5) Friendly management interface: Provide a friendly management interface to facilitate users to configure and manage the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 This is a flow chart of the operating system log audit method based on Elastic Stack;
[0041] Figure 2 This is a schematic diagram of the structure of the operating system log audit system based on Elastic Stack;
[0042] Figure 3 This is a flowchart for implementing the operating system log audit system based on Elastic Stack. DETAILED DESCRIPTION
[0043] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0044] Elastic Stack: is a versatile collection of open source software tools that is primarily used to simplify the process from data collection to insights. It includes four components: Elasticsearch, Logstash, Kibana, and Beats.
[0045] Elasticsearch: is an open source distributed search engine based on Java, with distributed, zero configuration, automatic discovery, automatic index sharding, index copy mechanism, RESTful style interface, multiple data sources and automatic search load balancing and other functions.
[0046] Logstash: is a Java-based open source data collection engine for collecting, analyzing, and storing logs.
[0047] Kibana: is an open source Node.js-based tool for visualizing and exploring data collected through Logstash.
[0048] Beats: is a lightweight data collector that collects data on the server and sends it to Logstash for processing.
[0049] See also Figure 1-Figure 3 The first aspect of the present invention provides: an operating system log audit method based on Elastic Stack, comprising the following steps:
[0050] S1: Data collection phase: deploy log collection tools, configure log collection tool parameters, and collect various operating system logs in real time as the first log;
[0051] S2: Data storage stage, the first log is transmitted to the open source distributed search engine for processing to obtain the second log for storage;
[0052] S3: Data analysis stage, the second log stored in the open source distributed search engine is deeply analyzed by the open source data collection engine to obtain analysis results, wherein the deep analysis includes multi-dimensional log analysis and multi-condition log analysis, and an alarm threshold is preset;
[0053] S4: Visualization stage: Use open source tools to provide a visualization interface for the analysis results. The visualization interface displays the operation status and security status of the log audit system in real time, and provides multi-dimensional data screening and customized report generation.
[0054] S5: Security event monitoring stage: Use the security event monitoring system to obtain the security status of the log audit system in real time. When security threats are found, alarms or warnings are issued for various risks and events based on customized alarm strategies.
[0055] In some embodiments, the log collection tool is Syslog or Beats, and S1 further includes the following steps:
[0056] S11: Select and install Syslog or Beats;
[0057] S12: Configure the input and output of Syslog or Beats, define parsing rules, and standardize various logs of the operating system to obtain the first log.
[0058] In some embodiments, the open source distributed search engine is Elasticsearch, and S2 further includes the following steps:
[0059] S21: Configure storage settings and index settings for Elasticsearch;
[0060] S22: using an open source data collection engine to process the first log, first defining a filtering rule, then extracting preset information from the first log and performing data cleaning to obtain a cleaned log;
[0061] S23: Using the conversion function of the open source data collection engine, the cleaned log is converted into a preset format to obtain a second log and stored in Elasticsearch.
[0062] Data cleaning and conversion to a preset format is to make the data easier to analyze and visualize. Before or at the same time as extracting the first log, the information in the first log that needs data cleaning is set as preset information.
[0063] In some embodiments, the open source data collection engine is Logstash, and the S3 further includes the following steps:
[0064] S31: receiving the second log pushed by the log collection tool at the input stage of Logstash;
[0065] S32: In the filtering stage of Logstash, data cleaning, format conversion and event processing are performed on the second log. The filter plug-in is used to parse, filter and aggregate the second log to obtain the third log.
[0066] S33: Send the third log to the open source distributed search engine in the output stage of Logstash.
[0067] In some embodiments, the open source tool is Kibana, and the S4 further includes the following steps:
[0068] S41: Use Kibana to create dashboards and visualization views as visualization interfaces to display the operation status and security status of the log audit system; realize multi-dimensional data filtering and custom report generation by dragging and configuring fields;
[0069] S42: The operation status of the log audit system and the security status of the log audit system are transmitted to one or more preset systems through the API or plug-in provided by Kibana.
[0070] The purpose of transferring to a preset system is to better manage and monitor operating system logs.
[0071] In some embodiments, the security threats include: external threats, hacker attacks, internal violation operations, and device abnormalities. S5 further includes the following steps:
[0072] S51: Notify the security threat through email and / or SMS and / or sound, call the automatic running program or automatic running script to handle the security threat, and generate alarm data;
[0073] S52: The alarm data is stored in the alarm database. This is convenient for subsequent analysis and auditing. The alarm database can be queried to obtain detailed alarm information and related logs.
[0074] The second aspect of the present invention provides: an operating system log audit system based on Elastic Stack, used to implement any of the above-mentioned operating system log audit methods based on Elastic Stack, including:
[0075] The data collection module is used to deploy the log collection tool, configure the log collection tool parameters, and collect various logs of the operating system in real time as the first log;
[0076] A data storage module, used for transmitting the first log to an open source distributed search engine for processing to obtain a second log for storage;
[0077] A data analysis module, using an open source data collection engine to perform in-depth analysis on the second log stored in the open source distributed search engine to obtain an analysis result, wherein the in-depth analysis includes multi-dimensional log analysis and multi-condition log analysis, and an alarm threshold is preset;
[0078] The visualization module uses open source tools to provide a visualization interface for the analysis results. The visualization interface displays the operation status and security status of the log audit system in real time, and provides multi-dimensional data screening and customized report generation.
[0079] The security event monitoring module uses the security event monitoring system to obtain the security status of the log audit system in real time. When security threats are found, it will issue alarms or warnings for various risks and events based on customized alarm strategies.
[0080] Data collection module: Through Syslog, Beats and other log collection tools, various logs of the operating system are collected in real time, including system logs, security logs, application logs, etc. This module supports multiple data sources and can be customized according to actual needs. At the same time, this module can also collect logs in both agentless and agent modes.
[0081] Data storage module: Elasticsearch is used for data storage. Through the distributed storage and retrieval functions of Elasticsearch, efficient storage and fast retrieval of massive logs are achieved. At the same time, the near real-time analysis capabilities of Elasticsearch are used to efficiently analyze the stored logs. In addition, this module can also locate external threats, hacker attacks, internal violations, equipment anomalies, etc. by presetting multiple event association rules.
[0082] Data analysis module: Use Logstash to perform in-depth analysis on logs stored in Elasticsearch. Through custom analysis rules, multi-dimensional and multi-conditional log analysis can be achieved. This module supports simple and flexible definition of association rules, real-time warnings, and timely notification of warnings through email, SMS, sound, etc. At the same time, programs or scripts can be automatically run through interface calls. In addition, this module can also generate forensic reports, such as attack threat reports, Windows / Linux system audit reports, and compliance audit reports.
[0083] Visualization module: Use Kibana to provide an intuitive visualization interface for log analysis results. Users can use Kibana to view system operation status, security status and other information in real time, and support multi-dimensional data screening and custom report generation.
[0084] Security event monitoring system: By real-time monitoring of the security threat status of the entire network, it can detect external threats, hacker attacks, internal violations, equipment abnormalities, etc. In addition, you can also customize the alarm strategy to issue timely alarms or warnings for various risks and events.
[0085] The third aspect of the present invention provides: a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by a processor, any of the above-mentioned operating system log auditing methods based on Elastic Stack is implemented.
[0086] The above is only a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the concept described herein through the above teachings or the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art shall not deviate from the spirit and scope of the present invention, and shall be within the scope of protection of the claims attached to the present invention.
Claims
1. An operating system log audit method based on Elastic Stack, characterized by: The following steps are involved: S1: Data collection phase: deploy log collection tools, configure log collection tool parameters, and collect various operating system logs in real time as the first log; S2: Data storage stage, the first log is transmitted to the open source distributed search engine for processing to obtain the second log for storage; S3: Data analysis stage, the second log stored in the open source distributed search engine is deeply analyzed by the open source data collection engine to obtain analysis results, wherein the deep analysis includes multi-dimensional log analysis and multi-condition log analysis, and an alarm threshold is preset; S4: Visualization stage: Use open source tools to provide a visualization interface for the analysis results. The visualization interface displays the operation status and security status of the log audit system in real time, and provides multi-dimensional data screening and customized report generation. S5: Security event monitoring stage: Use the security event monitoring system to obtain the security status of the log audit system in real time. When security threats are found, according to the customized alarm strategy, various risks and events are warned or warned. The log collection tool is Syslog or Beats, and S1 further includes the following steps: S11: Select and install Syslog or Beats; S12: Configure the input and output of Syslog or Beats, define parsing rules, and standardize various logs of the operating system to obtain the first log; The open source distributed search engine is Elasticsearch, and the S2 further includes the following steps: S21: Configure storage settings and index settings for Elasticsearch; S22: using an open source data collection engine to process the first log, first defining a filtering rule, then extracting preset information from the first log and performing data cleaning to obtain a cleaned log; S23: using the conversion function of the open source data collection engine, convert the cleaned log into a preset format to obtain a second log and store it in Elasticsearch; The open source data collection engine is Logstash, and the S3 also includes the following steps: S31: receiving the second log pushed by the log collection tool at the input stage of Logstash; S32: In the filtering stage of Logstash, data cleaning, format conversion and event processing are performed on the second log. The filter plug-in is used to parse, filter and aggregate the second log to obtain the third log. S33: Send the third log to the open source distributed search engine in the output stage of Logstash; The open source tool is Kibana, and the S4 further includes the following steps: S41: Use Kibana to create dashboards and visualization views as visualization interfaces to display the operation status and security status of the log audit system; realize multi-dimensional data filtering and custom report generation by dragging and configuring fields; S42: Transmitting the operation status of the log audit system and the security status of the log audit system to one or more preset systems through the API or plug-in provided by Kibana; The security threats include: external threats, hacker attacks, internal violation operations, and equipment abnormalities. S5 also includes the following steps: S51: Notify the security threat through email and / or SMS and / or sound, call the automatic running program or automatic running script to handle the security threat, and generate alarm data; S52: Storing the alarm data in an alarm database.
2. An operating system log audit system based on Elastic Stack, characterized by: The method for implementing an operating system log audit method based on Elastic Stack as claimed in claim 1 comprises: The data collection module is used to deploy the log collection tool, configure the log collection tool parameters, and collect various logs of the operating system in real time as the first log; A data storage module, used for transmitting the first log to an open source distributed search engine for processing to obtain a second log for storage; A data analysis module, using an open source data collection engine to perform in-depth analysis on the second log stored in the open source distributed search engine to obtain an analysis result, wherein the in-depth analysis includes multi-dimensional log analysis and multi-condition log analysis, and an alarm threshold is preset; The visualization module uses open source tools to provide a visualization interface for the analysis results. The visualization interface displays the operation status and security status of the log audit system in real time, and provides multi-dimensional data screening and customized report generation. The security event monitoring module uses the security event monitoring system to obtain the security status of the log audit system in real time. When security threats are found, it will issue alarms or warnings for various risks and events based on customized alarm strategies.
3. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by the processor, the operating system log audit method based on Elastic Stack as claimed in claim 1 is implemented.
Citation Information
Patent Citations
Linux operation log audit system and method
CN109033813A
