Host intrusion detection method and device
By combining static signal data and dynamic signal data, the SVM model trained by particle swarm optimization algorithm is used to perform host intrusion detection, which solves the problems of insufficient detection of unknown attack behavior and high false alarm rates in the existing technology, and achieves higher detection accuracy and business stability.
Patent Information
- Application Number
- CN201810796167.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-07-19
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2038-07-19
AI Technical Summary
The existing host model intrusion detection methods cannot effectively detect unknown attack behavior, and the false alarm rate of abnormal detection is high, affecting normal business stability.
The combination of static signal data and dynamic signal data is adopted, and the SVM model trained by the particle swarm optimization algorithm is used for detection, and the detection rules are automatically generated and the feature library is updated to reduce the false alarm rate and improve the detection rate of unknown attack behavior.
It improves the detection rate of unknown attack behavior, reduces the detection false alarm rate of normal operations, ensures the stability of normal business, reduces the cost of manual intervention, and shortens the response time to unknown attack behavior.
Smart Images

Figure CN110737891B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a host intrusion detection method and device. Background Art
[0002] With the widespread application of intentets and the rapid growth of information flow in cyberspace, while various fields benefit from the development of the network, the security of their data has also been seriously threatened. In terms of data detection, intrusion detection can be divided into two types: network-based intrusion detection and host-based intrusion detection. Network-based intrusion detection mainly detects the original data packets on the network to determine whether there is an attack behavior in the data packets; host-based intrusion detection mainly determines whether the host is under attack by analyzing various information such as logs on the host, host traffic, process behavior, etc.
[0003] For host-based intrusion detection, the two main methods currently used are misuse detection and anomaly detection. Misuse detection is to use a known feature library to detect user behavior; anomaly detection is to collect a large amount of normal data, model the behavior, and identify the behavior that does not conform to the model as an attack.
[0004] Existing host-based intrusion detection methods have at least the following deficiencies:
[0005] (1) Misuse detection cannot effectively detect unknown attack behaviors;
[0006] (2) The false alarm rate of anomaly detection is relatively high, which has a certain impact on normal business. Summary of the invention
[0007] In view of this, an embodiment of the present invention provides a host intrusion detection method and device, which can improve the detection rate of unknown attack behaviors; reduce the false alarm rate of normal operation detection and ensure the stability of normal business; automatically generate detection rules and update the detection feature library when attack behaviors are detected, reduce the cost of manual intervention, and shorten the response time to unknown attack behaviors.
[0008] According to one aspect of an embodiment of the present invention, a host intrusion detection method is provided.
[0009] The host intrusion detection method according to an embodiment of the present invention includes:
[0010] Collect signal data from the host, the signal data includes: static signal data n and dynamic signal data s;
[0011] Search the static detection rules that match the static signal data from the preset feature library s ;
[0012] Get dynamic prediction results ret based on dynamic signal data and SVM model d ;The training parameters of the SVM model are obtained using the particle swarm optimization algorithm;
[0013] According to the static detection rule ret s And the dynamic prediction result ret d Determine whether the current process of the host is an attack behavior.
[0014] Optionally, the static signal data includes at least one of the following: CPU usage, memory usage, number of generated socket connections, sensitive file change information;
[0015] The dynamic signal data is determined based on the system call sequence generated when the host runs the current process.
[0016] Optionally, the preset feature library includes: a plurality of preset detection results, and a detection rule corresponding to each detection result; searching the preset feature library for a static detection rule matching the static signal data. s ,include:
[0017] Searching for detection results matching the static signal data from a preset feature library;
[0018] The detection rule corresponding to the detection result is used as the static detection rule ret that matches the static signal data s .
[0019] Optionally, obtain the dynamic prediction result ret based on the dynamic signal data and the SVM model d ,include:
[0020] Step A: Read the training sample set and pass the dynamic signal data to the training parameters of the SVM model to complete the first training and obtain the initial prediction model;
[0021] Step B: Read the test sample set, and use the initial prediction model to complete the situation value prediction of the test sample to obtain the initial prediction result;
[0022] Step C: Use the fitness function F in the particle swarm algorithm to calculate the error between the initial prediction result and the true situation value in the test sample set;
[0023] Step D: If the F convergence condition is met, the initial prediction model is the final prediction model; otherwise, the particle swarm algorithm is used to iterate and pass the second set of training parameters to the SVM model, and then steps A to C are executed repeatedly until the final prediction model that meets the F convergence condition is obtained; the prediction result corresponding to the final prediction model is the dynamic prediction result ret d .
[0024] Optionally, according to the static detection rules ret s And the dynamic prediction result ret d Determine whether the current process of the host is an attack behavior, including:
[0025] According to the static detection rule ret s And the dynamic prediction result ret d Generate the detection result R(ret s ,ret d );
[0026] When the detection result R of the current process is within the preset threshold If it is within the range, the current process of the host is determined to be an attack behavior; otherwise, the current process of the host is determined not to be an attack behavior.
[0027] Optionally, after determining that the current process of the host is an attack behavior, the following is further included:
[0028] The attack signature of the attack behavior is extracted to form a detection rule for the attack behavior, and the detection result and detection rule corresponding to the attack behavior are saved in the signature library of the host.
[0029] Optionally, the host intrusion detection method of the embodiment of the present invention further includes: updating the detection results and detection rules stored in the feature library of the host to the feature libraries of other hosts.
[0030] According to one aspect of an embodiment of the present invention, a host intrusion detection device is provided.
[0031] The host intrusion detection device according to an embodiment of the present invention includes:
[0032] A data acquisition module collects signal data from the host, the signal data includes: static signal data n and dynamic signal data s;
[0033] The detection and judgment module searches for static detection rules that match the static signal data from the preset feature library. s ;According to the dynamic signal data and SVM model, the dynamic prediction result ret is obtained d ; The training parameters of the SVM model are obtained using the particle swarm optimization algorithm; according to the static detection rule ret s And the dynamic prediction result ret d Determine whether the current process of the host is an attack behavior.
[0034] Optionally, the static signal data includes at least one of the following: CPU usage, memory usage, number of generated socket connections, sensitive file change information;
[0035] The dynamic signal data is determined based on the system call sequence generated when the host runs the current process.
[0036] Optionally, the preset feature library includes: a plurality of preset detection results, and a detection rule corresponding to each detection result; the detection judgment module is further used to:
[0037] Search the detection result that matches the static signal data from the preset feature library; use the detection rule corresponding to the detection result as the static detection rule that matches the static signal data. s .
[0038] Optionally, the detection and judgment module obtains the dynamic prediction result ret according to the state signal data and the SVM model d ,include:
[0039] Step A: Read the training sample set and pass the dynamic signal data to the training parameters of the SVM model to complete the first training and obtain the initial prediction model;
[0040] Step B: Read the test sample set, and use the initial prediction model to complete the situation value prediction of the test sample to obtain the initial prediction result;
[0041] Step C: Use the fitness function F in the particle swarm algorithm to calculate the error between the initial prediction result and the true situation value in the test sample set;
[0042] Step D: If the F convergence condition is met, the initial prediction model is the final prediction model; otherwise, the particle swarm algorithm is used to iterate and pass the second set of training parameters to the SVM model, and then steps A to C are executed repeatedly until the final prediction model that meets the F convergence condition is obtained; the prediction result corresponding to the final prediction model is the dynamic prediction result ret d .
[0043] Optionally, the detection and judgment module is further used to:
[0044] According to the static detection rule ret s And the dynamic prediction result ret d Generate the detection result R(ret s ,ret d ); When the detection result R of the current process is within the preset threshold If it is within the range, the current process of the host is determined to be an attack behavior; otherwise, the current process of the host is determined not to be an attack behavior.
[0045] Optionally, the detection and judgment module is further used to:
[0046] The attack signature of the attack behavior is extracted to form a detection rule for the attack behavior, and the detection result and detection rule corresponding to the attack behavior are saved in the signature library of the host.
[0047] Optionally, the host intrusion detection device of the embodiment of the present invention further includes: a centralized management and control module, which updates the detection results and detection rules stored in the feature library of the host to the feature libraries of other hosts.
[0048] According to another aspect of an embodiment of the present invention, a host intrusion detection electronic device is provided.
[0049] A host intrusion detection electronic device according to an embodiment of the present invention includes:
[0050] one or more processors;
[0051] a storage device for storing one or more programs,
[0052] When the one or more programs are executed by the one or more processors, the one or more processors implement the host intrusion detection method provided by the first aspect of the embodiment of the present invention.
[0053] According to still another aspect of an embodiment of the present invention, a computer readable medium is provided.
[0054] The computer-readable medium according to the embodiment of the present invention stores a computer program, which, when executed by a processor, implements the host intrusion detection method provided by the first aspect of the embodiment of the present invention.
[0055] An embodiment of the above invention has the following advantages or beneficial effects: by combining static signal data and dynamic signal data, using an improved SVM model to identify unknown attacks, the detection rate of unknown attack behaviors can be improved; the false alarm rate of normal operation detection can be reduced to ensure the stability of normal business. When attack behaviors are detected, detection rules are automatically generated and the feature libraries of the current host and other hosts are updated, which can reduce the cost of manual intervention and shorten the response time to unknown attack behaviors.
[0056] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with specific implementation examples. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0058] Figure 1 is a schematic diagram of the main process of the host intrusion detection method according to an embodiment of the present invention;
[0059] Figure 2 It is a schematic diagram of the main process of obtaining dynamic prediction results in an optional embodiment of the present invention;
[0060] Figure 3 is a schematic diagram of main modules of a host intrusion detection device according to an embodiment of the present invention;
[0061] Figure 4 is a schematic diagram of an application scenario of a host intrusion detection device according to an embodiment of the present invention;
[0062] Figure 5 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0063] Figure 6 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0064] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0065] According to one aspect of an embodiment of the present invention, a host intrusion detection method is provided.
[0066] Figure 1 FIG. 1 is a schematic diagram of the main process of the host intrusion detection method according to an embodiment of the present invention. Figure 1 As shown, the host intrusion detection method according to the embodiment of the present invention includes: step S101, step S102, step S103 and step S104.
[0067] Step S101: Collect signal data of the host, where the signal data includes: static signal data n and dynamic signal data s.
[0068] Any computer connected to the Internet is called a host, and each host has a unique IP address, and each host has an equal status on the Internet. The host in the embodiment of the present invention can be any terminal device that sends and receives information, such as a computer, a notebook, a mobile phone, etc.
[0069] Static signal data and dynamic signal data are key signal data of the host. Among them, static signal data is signal data related to system resources, such as CPU (Central Processing Unit) usage, memory usage, number of generated socket connections, and changes in sensitive files (some files are set as sensitive files according to actual conditions to facilitate distinction from other files). Dynamic signal data refers to signal data related to the process running in the host, which can be determined based on the system call sequence generated when the host runs the current process, such as intercepting a character string of a certain length (for example, length S) from the system call sequence generated when the host runs the current process as dynamic signal data.
[0070] The collected static signal can be an N-dimensional vector generated after preprocessing by deduplication, aggregation, cleaning, etc., wherein N represents the type of system resource selected. Preprocessing by deduplication, aggregation, cleaning, etc. can improve the accuracy of host intrusion detection. The collected static signal data and dynamic signal data can be reported in real-time vectors (n, s) via RPC (Remote Procedure Call Protocol) for subsequent analysis and processing. RPC is a protocol that requests services from a remote computer program over a network without the need to understand the underlying network technology. Reporting signal data using RPC facilitates the development of a system that uses the host intrusion detection method of an embodiment of the present invention.
[0071] Step S102: Search the preset feature library for a static detection rule that matches the static signal data. s .
[0072] Some detection rules are configured in the preset feature library. These detection rules can be basic rules defined by users or detection rules for unknown attack behaviors that are updated to the feature library after attack behaviors are detected.
[0073] In this step, the matching is to first use the rules in the feature library to match the static signal data to determine whether the match is successful. If the match is successful, stop and output the static detection rule ret s ; If the match fails, continue to match the next detection rule until the static detection rule is matched. s .
[0074] Optionally, the preset feature library includes: a plurality of preset detection results, and a detection rule corresponding to each detection result; searching the preset feature library for a static detection rule matching the static signal data. s, including: searching for a detection result matching the static signal data from a preset feature library; using the detection rule corresponding to the detection result as a static detection rule matching the static signal data. s .
[0075] Step S103: Obtain dynamic prediction result ret based on dynamic signal data and SVM model d ; The training parameters of the SVM model are obtained using the particle swarm optimization algorithm.
[0076] When using the SVM (Support Vector Machine) model as a prediction model to obtain dynamic prediction results, there is a problem of blindness in the selection of training parameters. In the embodiment of the present invention, the particle swarm optimization algorithm is used to obtain the training parameters of the SVM model, which can avoid the problem of blindness in the selection of training parameters and improve the accuracy of the prediction model. Based on the improved SVM model, unknown attack behaviors can be actively identified, greatly improving the detection rate of various unknown attack behaviors.
[0077] Figure 2 FIG. 1 is a schematic diagram of the main process of obtaining dynamic prediction results in an optional embodiment of the present invention. Figure 2 As shown, the dynamic prediction result ret is obtained based on the dynamic signal data and SVM model d , which may include:
[0078] Step A: Read the training sample set and pass the dynamic signal data to the training parameters of the SVM model to complete the first training and obtain the initial prediction model;
[0079] Step B: Read the test sample set, and use the initial prediction model to complete the situation value prediction of the test sample to obtain the initial prediction result;
[0080] Step C: Use the fitness function F in the particle swarm algorithm to calculate the error between the initial prediction result and the true situation value in the test sample set;
[0081] Step D: If the F convergence condition is met, the initial prediction model is the final prediction model; otherwise, the particle swarm algorithm is used to iterate and pass the second set of training parameters to the SVM model, and then steps A to C are executed cyclically until the final prediction model that meets the F convergence condition (for example, when F> convergence threshold e is determined to meet the F convergence condition) is obtained; the prediction result corresponding to the final prediction model is the dynamic prediction result ret d .
[0082] Step S104: According to the static detection rule ret s And the dynamic prediction result ret d Determine whether the current process of the host is an attack behavior.
[0083] The processes running on different hosts may not be the same. For example, each host has its own unique business. The processes running on the same host at different times may not be the same. Therefore, the detection rules will be essentially different. The embodiment of the present invention combines static signal data with dynamic signal data detection to further improve the reliability and effectiveness of the prediction model, reduce the false alarm rate, and avoid affecting normal business.
[0084] Optionally, according to the static detection rules ret s And the dynamic prediction result ret d Determine whether the current process of the host is an attack behavior, including:
[0085] According to the static detection rule ret s And the dynamic prediction result ret d Generate the detection result R(ret s ,ret d );
[0086] When the detection result R of the current process is within the preset threshold If the value is within the range, the host's current process is considered an attack behavior; otherwise, the host's current process is considered not an attack behavior. The detection result R is a vector. When the modulus of the vector is within the preset threshold When the detection result R is within the preset threshold Within range. Threshold The setting can be selectively performed according to actual conditions, and the embodiment of the present invention does not specifically limit this.
[0087] After determining that the current process of the host is an attack behavior, the following may also be included: extracting the attack feature code of the attack behavior to form a detection rule for the attack behavior, and saving the detection result and detection rule corresponding to the attack behavior in the feature library of the host. When an attack behavior is detected, the detection rule is automatically generated and the detection feature library is updated, reducing the cost of manual intervention. When the attack behavior appears again, it can be quickly identified, shortening the reaction time to the attack behavior.
[0088] Optionally, the host intrusion detection method of the embodiment of the present invention may further include: updating the detection results and detection rules stored in the feature library of the host to the feature libraries of other hosts. When a host detects an attack behavior, the detection results and detection rules of the attack behavior are updated to other hosts, which can reduce the cost of manual intervention and shorten the reaction time of other hosts to the attack behavior.
[0089] According to one aspect of an embodiment of the present invention, a host intrusion detection device is provided.
[0090] Figure 3Schematic diagram of the main modules of the host intrusion detection device according to some embodiments of the present invention. Figure 3 As shown, the host intrusion detection device 300 according to an embodiment of the present invention includes:
[0091] The data acquisition module 301 collects signal data of the host, and the signal data includes: static signal data n and dynamic signal data s;
[0092] The detection judgment module 302 searches for a static detection rule matching the static signal data from a preset feature library. s ;According to the dynamic signal data and SVM model, the dynamic prediction result ret is obtained d ; The training parameters of the SVM model are obtained using the particle swarm optimization algorithm; according to the static detection rule ret s And the dynamic prediction result ret d Determine whether the current process of the host is an attack behavior.
[0093] Optionally, the static signal data includes at least one of the following: CPU usage, memory usage, number of generated socket connections, sensitive file change information;
[0094] The dynamic signal data is determined based on the system call sequence generated when the host runs the current process.
[0095] Optionally, the preset feature library includes: a plurality of preset detection results, and a detection rule corresponding to each detection result; the detection judgment module is further used to:
[0096] Search the detection result that matches the static signal data from the preset feature library; use the detection rule corresponding to the detection result as the static detection rule that matches the static signal data. s .
[0097] Optionally, the detection and judgment module obtains the dynamic prediction result ret according to the state signal data and the SVM model d ,include:
[0098] Step A: Read the training sample set and pass the dynamic signal data to the training parameters of the SVM model to complete the first training and obtain the initial prediction model;
[0099] Step B: Read the test sample set, and use the initial prediction model to complete the situation value prediction of the test sample to obtain the initial prediction result;
[0100] Step C: Use the fitness function F in the particle swarm algorithm to calculate the error between the initial prediction result and the true situation value in the test sample set;
[0101] Step D: If the F convergence condition is met, the initial prediction model is the final prediction model; otherwise, the particle swarm algorithm is used to iterate and pass the second set of training parameters to the SVM model, and then steps A to C are executed repeatedly until the final prediction model that meets the F convergence condition is obtained; the prediction result corresponding to the final prediction model is the dynamic prediction result ret d .
[0102] Optionally, the detection and judgment module is further used to: ret according to the static detection rule s And the dynamic prediction result ret d Generate the detection result R(ret s ,ret d ); When the detection result R of the current process is within the preset threshold If it is within the range, the current process of the host is determined to be an attack behavior; otherwise, the current process of the host is determined not to be an attack behavior.
[0103] Optionally, the detection and judgment module is further used to: extract the attack feature code of the attack behavior to form a detection rule for the attack behavior, and save the detection result and the detection rule corresponding to the attack behavior to the feature library of the host.
[0104] Figure 4 Schematic diagram of main modules of a host intrusion detection device according to other embodiments of the present invention. Figure 4 As shown, the host intrusion detection device 400 according to an embodiment of the present invention includes:
[0105] The data acquisition module 401 acquires signal data of the host, the signal data includes: static signal data n and dynamic signal data s;
[0106] The detection judgment module 402 searches for a static detection rule matching the static signal data from a preset feature library. s ;According to the dynamic signal data and SVM model, the dynamic prediction result ret is obtained d ; The training parameters of the SVM model are obtained using the particle swarm optimization algorithm; according to the static detection rule ret s And the dynamic prediction result ret d Determine whether the current process of the host is an attack behavior.
[0107] Optionally, the static signal data includes at least one of the following: CPU usage, memory usage, number of generated socket connections, sensitive file change information;
[0108] The dynamic signal data is determined based on the system call sequence generated when the host runs the current process.
[0109] Optionally, the preset feature library includes: a plurality of preset detection results, and a detection rule corresponding to each detection result; the detection judgment module is further used to:
[0110] Search the detection result that matches the static signal data from the preset feature library; use the detection rule corresponding to the detection result as the static detection rule that matches the static signal data. s .
[0111] Optionally, the detection and judgment module obtains the dynamic prediction result ret according to the state signal data and the SVM model d ,include:
[0112] Step A: Read the training sample set and pass the dynamic signal data to the training parameters of the SVM model to complete the first training and obtain the initial prediction model;
[0113] Step B: Read the test sample set, and use the initial prediction model to complete the situation value prediction of the test sample to obtain the initial prediction result;
[0114] Step C: Use the fitness function F in the particle swarm algorithm to calculate the error between the initial prediction result and the true situation value in the test sample set;
[0115] Step D: If the F convergence condition is met, the initial prediction model is the final prediction model; otherwise, the particle swarm algorithm is used to iterate and pass the second set of training parameters to the SVM model, and then steps A to C are executed repeatedly until the final prediction model that meets the F convergence condition is obtained; the prediction result corresponding to the final prediction model is the dynamic prediction result ret d .
[0116] Optionally, the detection and judgment module is further used to: ret according to the static detection rule s And the dynamic prediction result ret d Generate the detection result R(ret s ,ret d ); When the detection result R of the current process is within the preset threshold If it is within the range, the current process of the host is determined to be an attack behavior; otherwise, the current process of the host is determined not to be an attack behavior.
[0117] Optionally, the detection and judgment module is further used to: extract the attack feature code of the attack behavior to form a detection rule for the attack behavior, and save the detection result and the detection rule corresponding to the attack behavior to the feature library of the host.
[0118] Optionally, the host intrusion detection device of the embodiment of the present invention further includes: a centralized management and control module 403, which updates the detection results and detection rules stored in the feature library of the host to the feature libraries of other hosts.
[0119] Since each cloud region deploys different services, Figure 4 In the optional embodiment shown, a detection and judgment module 402 is deployed in each Region. The main functions include data analysis, SVM model training, attack detection, and task delivery. The data analysis module uses the feature library to match the static signal data n reported by the host Agent to determine whether the match is successful. If the match is successful, stop and output the matching result ret s ; If the match fails, continue to match the next rule until all the rules of the feature library are matched. The centralized control module 403 is the brain of the entire device and supports horizontal expansion and distributed deployment. The main functions include managing the rule base, analyzing and displaying security events, and alerting related attacks. Among them, the rule update function is responsible for the management of the rule base, mainly including user-defined rules (some basic rules have been built-in) and the rules automatically generated by the detection and judgment module 402 in the region. In addition, when new attack behaviors appear, the rule base can be updated in time and pushed to the detection and judgment module 402 (Server) of each host area. Security event analysis mainly analyzes the alarm information, and can find webshell (a command execution environment in the form of web page files such as asp, php, jsp or cgi, which can also be called a web backdoor) writing behavior, abnormal login behavior, abnormal network connection behavior, abnormal command call behavior, etc. from the information of various dimensions, so as to realize real-time alarm of intrusion behavior. Among them, the alarm level can be three parts: alarm only, log only, and alarm + log.
[0120] exist Figure 4 In the optional embodiment shown, the host intrusion detection device also includes a data storage part, including: a distributed ES (Elasticsearch, an open source system with both search engine and NoSQL database functions) cluster, and a distributed Mongo database (Mongo database is a high-performance, open source, modeless, document-based database based on distributed file storage, written in C++ language). The former is mainly used to save the training sample set for model training and the detection results of attack behaviors; the latter is mainly used to save the relevant information of the detection and judgment module 402 process, such as the process PID (process identifier), the environment variables when the process is running, etc.
[0121] According to another aspect of an embodiment of the present invention, a host intrusion detection electronic device is provided.
[0122] A host intrusion detection electronic device according to an embodiment of the present invention includes:
[0123] one or more processors;
[0124] a storage device for storing one or more programs,
[0125] When the one or more programs are executed by the one or more processors, the one or more processors implement the host intrusion detection method provided by the first aspect of the embodiment of the present invention.
[0126] Figure 5 An exemplary system architecture 500 is shown to which the host intrusion detection method or host intrusion detection device according to the embodiment of the present invention can be applied.
[0127] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, 503, a network 504 and a server 505. Network 504 is used to provide a medium for communication links between terminal devices 501, 502, 503 and server 505. Network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0128] Users can use terminal devices 501, 502, 503 to interact with server 505 through network 504 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 501, 502, 503, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0129] The terminal devices 501 , 502 , and 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0130] The server 505 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 501, 502, and 503. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only an example) to the terminal device.
[0131] It should be noted that the host intrusion detection method provided in the embodiment of the present invention is generally executed by the server 505 , and accordingly, the host intrusion detection device is generally disposed in the server 505 .
[0132] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0133] Reference below Figure 6, which shows a schematic diagram of the structure of a computer system 600 of a terminal device suitable for implementing an embodiment of the present invention. Figure 6 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0134] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0135] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.
[0136] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present invention are executed.
[0137] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0138] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0139] The modules involved in the embodiments of the present invention can be implemented by software or hardware. The modules described can also be set in a processor, for example, it can be described as: a processor includes: a data acquisition module 301, which collects signal data of the host, the signal data includes: static signal data n and dynamic signal data s; a detection and judgment module 302, which searches for static detection rules ret that match the static signal data from a preset feature library s ;According to the dynamic signal data and SVM model, the dynamic prediction result ret is obtained d ; The training parameters of the SVM model are obtained using the particle swarm optimization algorithm; according to the static detection rule ret s And the dynamic prediction result ret d Determine whether the current process of the host is an attack behavior. The names of these modules do not constitute a limitation on the module itself in some cases. For example, the data acquisition module can also be described as "searching for static detection rules matching static signal data from the preset feature library". s Modules".
[0140] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: collecting signal data of the host, the signal data includes: static signal data n and dynamic signal data s; searching for static detection rules ret matching the static signal data from a preset feature library; s ;According to the dynamic signal data and SVM model, the dynamic prediction result ret is obtained d ; The training parameters of the SVM model are obtained using the particle swarm optimization algorithm; according to the static detection rule ret s And the dynamic prediction result ret d Determine whether the current process of the host is an attack behavior.
[0141] The technical solution according to the embodiment of the present invention has the following advantages or beneficial effects: by combining static signal data and dynamic signal data, and using an improved SVM model to identify unknown attacks, the detection rate of unknown attack behaviors can be improved; the false alarm rate of normal operation detection can be reduced to ensure the stability of normal business. When attack behaviors are detected, detection rules are automatically generated and the feature libraries of the current host and other hosts are updated, which can reduce the cost of manual intervention and shorten the response time to unknown attack behaviors.
[0142] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A host intrusion detection method, characterized in that: include: Collecting signal data of the host, the signal data includes: static signal data n and dynamic signal data s; the static signal data is signal data related to system resources; Search the preset feature library for a static detection rule that matches the static signal data. s ; According to the dynamic signal data and the SVM model, a dynamic prediction result ret is obtained. d ; The training parameters of the SVM model are obtained using a particle swarm optimization algorithm; According to the static detection rule ret s and the dynamic prediction result ret d Determine whether the current process of the host is an attack behavior; The collected static signal data is an N-dimensional vector generated after pre-processing by deduplication, aggregation, and cleaning, where N represents the type of selected system resources; the dynamic signal data is a character string of a certain length intercepted from the system call sequence generated when the host runs the current process; the collected static signal data and dynamic signal data are reported in real-time vector (n, s) via RPC.
2. The method according to claim 1, characterized in that The static signal data includes at least one of the following: CPU usage, memory usage, number of generated socket connections, and sensitive file change information.
3. The method according to claim 1, characterized in that The preset feature library includes: a plurality of preset detection results and a detection rule corresponding to each detection result; searching the preset feature library for a static detection rule matching the static signal data. s ,include: Searching for a detection result matching the static signal data from a preset feature library; The detection rule corresponding to the detection result is used as the static detection rule ret that matches the static signal data. s .
4. The method according to claim 1, characterized in that According to the dynamic signal data and the SVM model, a dynamic prediction result ret is obtained. d ,include: Step A: Read the training sample set, and pass the dynamic signal data to the training parameters of the SVM model to complete the first training and obtain the initial prediction model; Step B: Read the test sample set, and use the initial prediction model to complete the situation value prediction of the test sample to obtain the initial prediction result; Step C: Use the fitness function F in the particle swarm algorithm to calculate the error between the initial prediction result and the true situation value in the test sample set; Step D: If the F convergence condition is met, the initial prediction model is the final prediction model; otherwise, the particle swarm algorithm is used to iterate and pass the second set of training parameters to the SVM model, and then steps A to C are executed repeatedly until the final prediction model that meets the F convergence condition is obtained; the prediction result corresponding to the final prediction model is the dynamic prediction result ret d .
5. The method according to claim 1, characterized in that According to the static detection rule ret s and the dynamic prediction result ret d Determining whether the current process of the host is an attack behavior includes: According to the static detection rule ret s and the dynamic prediction result ret d Generate the detection result R(ret s ,ret d ); When the detection result R of the current process is within the preset threshold If the host is within the range, the current process of the host is determined to be an attack behavior; otherwise, the current process of the host is determined not to be an attack behavior.
6. The method according to claim 5, characterized in that After determining that the current process of the host is an attack behavior, the method further includes: The attack feature code of the attack behavior is extracted to form a detection rule for the attack behavior, and the detection result and the detection rule corresponding to the attack behavior are stored in the feature library of the host.
7. The method according to claim 6, characterized in that Also includes: The detection results and detection rules stored in the feature library of the host are updated to the feature libraries of other hosts.
8. A host intrusion detection device, characterized in that: include: A data acquisition module collects signal data of the host, wherein the signal data includes: static signal data n and dynamic signal data s; the static signal data is signal data related to system resources; The detection judgment module searches for a static detection rule matching the static signal data from a preset feature library. s ; Obtain dynamic prediction results ret based on the dynamic signal data and SVM model d ; The training parameters of the SVM model are obtained by using a particle swarm optimization algorithm; according to the static detection rule ret s and the dynamic prediction result ret d Determine whether the current process of the host is an attack behavior; The collected static signal data is an N-dimensional vector generated after pre-processing by deduplication, aggregation, and cleaning, where N represents the type of selected system resources; the dynamic signal data is a character string of a certain length intercepted from the system call sequence generated when the host runs the current process; the collected static signal data and dynamic signal data are reported in real-time vector (n, s) via RPC.
9. The device according to claim 8, characterized in that The static signal data includes at least one of the following: CPU usage, memory usage, number of generated socket connections, and sensitive file change information.
10. The device according to claim 8, characterized in that The preset feature library includes: a plurality of preset detection results and detection rules corresponding to each detection result; the detection judgment module is also used for: Searching for a detection result that matches the static signal data from a preset feature library; using the detection rule corresponding to the detection result as a static detection rule that matches the static signal data. s .
11. The device according to claim 8, characterized in that The detection and judgment module obtains the dynamic prediction result ret according to the dynamic signal data and the SVM model d ,include: Step A: Read the training sample set, and pass the dynamic signal data to the training parameters of the SVM model to complete the first training and obtain the initial prediction model; Step B: Read the test sample set, and use the initial prediction model to complete the situation value prediction of the test sample to obtain the initial prediction result; Step C: Use the fitness function F in the particle swarm algorithm to calculate the error between the initial prediction result and the true situation value in the test sample set; Step D: If the F convergence condition is met, the initial prediction model is the final prediction model; otherwise, the particle swarm algorithm is used to iterate and pass the second set of training parameters to the SVM model, and then steps A to C are executed repeatedly until the final prediction model that meets the F convergence condition is obtained; the prediction result corresponding to the final prediction model is the dynamic prediction result ret d .
12. The device according to claim 8, characterized in that The detection and judgment module is also used for: According to the static detection rule ret s and the dynamic prediction result ret d Generate the detection result R(ret s ,ret d ); When the detection result R of the current process is within the preset threshold If the host is within the range, the current process of the host is determined to be an attack behavior; otherwise, the current process of the host is determined not to be an attack behavior.
13. The device according to claim 12, characterized in that The detection and judgment module is also used for: The attack feature code of the attack behavior is extracted to form a detection rule for the attack behavior, and the detection result and the detection rule corresponding to the attack behavior are saved in a feature library of the host.
14. The device according to claim 13, characterized in that Also includes: The centralized control module updates the detection results and detection rules stored in the feature library of the host to the feature libraries of other hosts.
15. A host intrusion detection electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
16. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method and device for processing terminal bugs
CN102750190A
Intrusion detection system and detection method with self-learning capability
CN103745154A
Intrusion detection system based on Android platform
CN104008332A
Method and device for detecting security of application programs of mobile devices
CN104361285A
Application program bug detection method, application program bug detection device and server
CN104537309A
