Network attack processing method and device based on large model honeypot, medium and equipment
By creating large model honeypots in containers and deploying them in Kubernetes clusters, we learn and simulate network attacker strategies, solving the problem of traditional honeypots being easily detected, achieving effective responses to network attacks and improving enterprise security.
Patent Information
- Application Number
- CN202411056170.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-08-02
AI Technical Summary
Traditional honeypot methods rely on static data and rules, which are easily detected by network attackers or malware, and are difficult to effectively identify and respond to network attacks.
Create a honeypot with a large model in the container, deploy it in the Kubernetes cluster, learn the attacker's strategy through the deep learning model, and simulate services and ports based on the learned strategy to attract the attacker and respond.
By learning attackers' strategies through large models, we can continuously adapt to network attacks, improve deception effects, and avoid detection, thereby more effectively protecting the security of enterprises and customers.
Smart Images

Figure CN118784346A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network security technology, and in particular to a network attack processing method, device, medium and equipment based on a large model honeypot. Background Art
[0002] Given that cyberattacks pose a significant threat to businesses and individuals, it is critical to establish effective prevention and detection measures. One of these measures is to use honeypot technology, a computer system designed to attract and intercept cyber criminals or malware to conduct in-depth research on their attack strategies and techniques. Traditional honeypot methods mainly rely on static data and rules to identify attackers. However, these methods are easily detected by cyber attackers or malware. Summary of the invention
[0003] In view of at least one of the above technical problems, an embodiment of the present invention provides a network attack processing method, device, medium, and equipment based on a large model honeypot.
[0004] According to the first aspect, the network attack processing method based on the large model honeypot provided by the embodiment of the present invention includes:
[0005] Creating a honeypot with a large model in a container; wherein the large model is a deep learning model that learns the attacker's attack strategy;
[0006] Deploy the honeypot built in the container in the Kubernetes cluster;
[0007] Creating a configuration file for each honeypot deployed in the kubernetes cluster so that the honeypot simulates services and ports according to the configuration file;
[0008] The honeypot is controlled to open simulated services and ports to attract attackers, and the instructions of the attracted attackers are passed to the large model. The attack strategy of the attacker is learned through the large model in the honeypot, and the attacker is responded to according to the learned attack strategy.
[0009] In one embodiment, creating a honeypot with a large model in a container includes:
[0010] If the large model is a pre-trained model, the honeypot is configured through a local plug-in of the large model, and a virtualized terminal is generated; wherein the virtualized terminal is a window for an attacker to interact with the honeypot.
[0011] In one embodiment, the configuration file created for the port includes at least one of the following: the version of the configuration file, the protocol used, the monitored IP address and port, server description information, response rules for multiple URL paths or multiple instructions, and the status code of the response information.
[0012] In one embodiment, the configuration file for port 80 also includes response header information; for the response rules for multiple URL paths, if the URL path in a request matches any one of the multiple URL paths, a preset HTML page is used as the response information of the request, and a first status code is returned, which is a status code indicating a successful response; if the URL path in a request does not match any of the multiple URL paths, a second status code is returned, which is a status code indicating a failed response.
[0013] In one embodiment, the configuration file for port 8080 has two response rules: a first response rule and a second response rule, wherein the first response rule includes a matching first URL path, a first response header information, and a first response information, and the first response rule corresponds to a first status code; the second response rule includes a matching second URL path, a second response header information, and a second response information, and the second response rule corresponds to a second status code; the first status code is a status code indicating a successful response; the second status code is a status code indicating a failed response.
[0014] In one embodiment, the configuration file for port 22 has response rules for multiple instructions, each response rule includes response information for one instruction; the configuration file for port 22 also includes a regular expression for matching user passwords and a session timeout limit.
[0015] According to the second aspect, the network attack processing device based on the large model honeypot provided by the embodiment of the present invention includes:
[0016] A first creation module is used to create a honeypot with a large model in a container; wherein the large model is a deep learning model for learning an attacker's attack strategy;
[0017] The first deployment module is used to deploy the honeypot built in the container in the kubernetes cluster;
[0018] A second creation module is used to create a configuration file for each honeypot deployed in the kubernetes cluster, so that the honeypot simulates services and ports according to the configuration file;
[0019] The first simulation module is used to control the honeypot to open simulated services and ports to attract attackers, pass the instructions of the attracted attackers to the large model, learn the attacker's attack strategy through the large model in the honeypot, and respond to the attacker according to the learned attack strategy.
[0020] In one embodiment, the first creation module is specifically used to: if the large model is a pre-trained model, configure the honeypot through a local plug-in of the large model and generate a virtualized terminal; wherein the virtualized terminal is a window for an attacker to interact with the honeypot.
[0021] According to a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, enables the computer to execute the method provided in the first aspect.
[0022] According to a fourth aspect, an embodiment of the present invention provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method provided in the first aspect is implemented.
[0023] The network attack processing method, device, medium, and equipment based on the large model honeypot provided by the embodiment of the present invention first create a honeypot with a large model in a container, then deploy the honeypot built in the container in a kubernetes cluster, and then create a configuration file for each honeypot deployed in the kubernetes cluster, so that the honeypot simulates services and ports according to the configuration file; control the honeypot to open simulated services and ports to attract attackers, pass the instructions of the attracted attackers to the large model, learn the attacker's attack strategy through the large model in the honeypot, and respond to the attacker according to the learned attack strategy. It can be seen that compared with the prior art that relies on static data and rules to identify attackers, the embodiment of the present invention learns the attacker's attack strategy through a large model, has the ability to continuously adapt to network attack strategies, and is not easily detected by network attackers or malware, thereby helping enterprises to more effectively protect the security of themselves and their customers. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a flowchart of a network attack processing method based on a large model honeypot in one embodiment of the present invention;
[0025] Figure 2 It is a structural block diagram of a network attack processing device based on a large model honeypot in one embodiment of the present invention. DETAILED DESCRIPTION
[0026] In a first aspect, an embodiment of the present invention provides a network attack processing method based on a large model honeypot, see Figure 1 The method comprises the following steps S110 to S140:
[0027] S110, creating a honeypot with a large model in a container; wherein the large model is a deep learning model for learning an attacker's attack strategy;
[0028] For example, you can use Docker Compose to build a honeypot. Specifically, you can use the command docker-compose build to build the container image, and use the command docker-compose up-d to start the honeypot in detached mode.
[0029] In one embodiment, the step of creating a honeypot with a large model in a container in S110 may specifically include: if the large model is a pre-trained model, configuring the honeypot through a local plug-in of the large model, and generating a virtualized terminal; wherein the virtualized terminal is a window for an attacker to interact with the honeypot.
[0030] Among them, the pre-trained model is the GPT model, which stands for Generative Pre-Trained. It is a text-generating deep learning model based on the Internet and trained with available data.
[0031] For example, the local plug-in of the large model can be a ChatGPT plug-in, a ChatGPT plug-in and a secret key to configure the honeypot, and then generate a virtualized terminal. Generating a virtualized terminal is equivalent to the entrance of the honeypot, which can be combined with the attacker's instructions and output the feedback of the honeypot. It can be seen that the honeypot interacts with the attacker through the virtualized terminal.
[0032] Among them, the honeypot can give prompts to the big model when receiving instructions, telling the big model what to do, so that the big model can learn and give a response.
[0033] S120, deploy the honeypot built in the container in the kubernetes cluster;
[0034] For example, you can use the helm component to deploy a honeypot on a kubernetes cluster. First install the helm component, and then deploy the honeypot based on the helm component using the following commands: helm install beelzebub. / beelzebub-chart, helm upgrade beelzebub. / beelzebub-chart.
[0035] S130, creating a configuration file for each honeypot deployed in the kubernetes cluster, so that the honeypot simulates services and ports according to the configuration file;
[0036] It can be seen that in order to ensure that the honeypot can simulate specific services and ports, corresponding configuration files must be created. These configuration files include simulated services, response rules, response information, and other related settings. The writing and management of configuration files is crucial to deceiving attackers in order to capture the attacker's behavior and intentions.
[0037] S140, controlling the honeypot to open simulated services and ports to attract attackers, passing the attracted attacker's instructions to the large model, learning the attacker's attack strategy through the large model in the honeypot, and responding to the attacker according to the learned attack strategy.
[0038] It can be seen that the honeypot opens simulated services and ports to attract attackers. When the attacker interacts with the honeypot, the attack instructions and output information can be recorded and stored in the history for subsequent analysis. By learning the attacker's attack instructions, it can continuously adapt to the attacker's attack strategy, improve the deception effect, and ensure that the honeypot remains effective in the ever-changing threat environment.
[0039] In one embodiment, the configuration file created for the port may include at least one of the following: the version of the configuration file, the protocol used, the monitored IP address and port, server description information, response rules for multiple URL paths or multiple instructions, and the status code of the response information.
[0040] Among them, the configuration file for port 80 also has response header information; for the response rules of multiple URL paths, if the URL path in a request matches any one of the multiple URL paths, the preset HTML page is used as the response information of the request, and a first status code is returned, which is a status code indicating a successful response; if the URL path in a request does not match any of the multiple URL paths, a second status code is returned, which is a status code indicating a failed response.
[0041] For example, the configuration code and corresponding explanation of the configuration file for port 80 are as follows:
[0042] apiVersion: specifies the version of the configuration file as "v1";
[0043] protocol: specifies the protocol used as "http";
[0044] address: specifies the IP address and port to be monitored. Here, ":80" means monitoring port 80 of all IP addresses.
[0045] description: The specified description is "WordPress 6.0";
[0046] commands: define the response rules for multiple URL paths. Here, three URL paths are defined: " / index.php", " / index.html" or the root path " / ". When the URL path in the request matches any of these paths, the request is successful.
[0047] handler: defines a preset HTML page. When the URL path in the request matches any of these paths, this preset HTML page is returned as a response;
[0048] headers: defines the header information of the response, and specifies the values of the three header fields: Content-Type, Server, and X-Powered-By;
[0049] statusCode: defines the status code of the response. The first status code is 200, indicating that the request is successful.
[0050] In this configuration code, three response rules are defined, corresponding to different URL paths. When the requested path matches one of the URL paths, the preset HTML page is returned as a response. Other requests will return a 404 status code and the corresponding error page.
[0051] Among them, the configuration file for port 8080 has two response rules: a first response rule and a second response rule. The first response rule includes a matching first URL path, a first response header information and a first response information, and the first response rule corresponds to a first status code; the second response rule includes a matching second URL path, a second response header information and a second response information, and the second response rule corresponds to a second status code; the first status code is a status code indicating a successful response; the second status code is a status code indicating a failed response.
[0052] For example, the configuration code and corresponding explanation of the configuration file for port 8080 are as follows:
[0053] apiVersion: The version of the configuration file is set to "v1";
[0054] protocol: The protocol used is set to "http";
[0055] address: The listening address and port are set to ":8080", which means listening to port 8080 of all IP addresses;
[0056] description: This is the description of the server, here it is set to "WordPress 6.0".
[0057] commands: This is a list that defines the server's response rules for different URL paths. There are two response rules here:
[0058] The first response rule is to respond to requests with the first path being "index.php". When the URL path in the request matches "index.php", a "mocked response" is returned as the response. At the same time, the response header information is set to "Content-Type:text / html", "Server:Apache / 2.4.53(Debian)", and "X-Powered-By:PHP / 7.4.29", and the status code is set to 200, indicating that the request was successful.
[0059] The second response rule responds to requests with paths " / wp-login.php" or " / wp-admin". When the URL path in the request matches one of these two paths, a "mocked response" is returned as the response. Similarly, the response header information is set to "Content-Type: text / html", "Server: Apache / 2.4.53 (Debian)", and "X-Powered-By: PHP / 7.4.29", and the status code is set to 400, indicating that the request has a syntax error.
[0060] The configuration file for port 22 includes response rules for multiple instructions, each of which includes response information for one instruction; the configuration file for port 22 also includes a regular expression for matching user passwords and a session timeout limit.
[0061] For example, the configuration code and corresponding explanation of the configuration file for port 22 are as follows:
[0062] apiVersion: The version of the configuration file is set to "v1";
[0063] protocol: The protocol used is set to "ssh";
[0064] address: The listening address and port are set to ":22", which means listening to port 22 of all IP addresses;
[0065] description: This is the description of the server, which is "SSH interactive";
[0066] commands: This is a list that defines the server's responses to different commands:
[0067] When the command entered is "ls", the returned response is "Documents Images DesktopDownloads.m2.kube.ssh.docker".
[0068] When the command input is "pwd", the returned response is " / home / ".
[0069] When the command input is "uname -m", the response returned is "x86_64";
[0070] When the command input is "docker ps", the response returned is "CONTAINER ID IMAGE COMMANDCREATED STATUS PORTS NAMES";
[0071] When the command entered starts with "docker", the response returned is "Error response from daemon: dial unix docker.raw.sock: connect: connection refused";
[0072] When the command input is "uname", the response returned is "Linux";
[0073] When the input command is "ps", the returned response is "PID TTY TIME CMD\n21642ttys000 0:00.07 / bin / dockerd";
[0074] When the input command does not meet any of the above rules, the response returned is "command not found";
[0075] serverVersion: This is the version information of the SSH server, which is set to "OpenSSH" here;
[0076] serverName: This is the name of the SSH server, here it is set to "ubuntu";
[0077] passwordRegex: This is a regular expression used to match user passwords. Here it is set to "^(root|qwerty|Smoker666)$", which means that users are allowed to log in using "root", "qwerty" or "Smoker666" as passwords.
[0078] deadlineTimeoutSeconds: This is the timeout of the SSH session in seconds, which is set to 60 seconds here. If there is no activity from the user within 60 seconds, the SSH session will be automatically closed.
[0079] In summary, firstly, a honeypot with a large model is created in a container, and then the honeypot built in the container is deployed in a kubernetes cluster, and then a configuration file of each honeypot deployed in the kubernetes cluster is created, so that the honeypot simulates services and ports according to the configuration file; the honeypot is controlled to open simulated services and ports to attract attackers, and the instructions of the attracted attackers are passed to the large model, and the attacker's attack strategy is learned through the large model in the honeypot, and the attacker is responded to according to the learned attack strategy. It can be seen that compared with the prior art that relies on static data and rules to identify attackers, the embodiment of the present invention learns the attacker's attack strategy through a large model, has the ability to continuously adapt to network attack strategies, and is not easily detected by network attackers or malware, thereby helping enterprises to more effectively protect the security of themselves and their customers.
[0080] According to a second aspect, an embodiment of the present invention provides a network attack processing device based on a large model honeypot, see Figure 2 , the device 100 comprises:
[0081] A first creation module 110 is used to create a honeypot with a large model in a container; wherein the large model is a deep learning model for learning an attacker's attack strategy;
[0082] A first deployment module 120 is used to deploy the honeypot built in the container in the kubernetes cluster;
[0083] A second creation module 130 is used to create a configuration file for each honeypot deployed in the kubernetes cluster, so that the honeypot simulates services and ports according to the configuration file;
[0084] The first simulation module 140 is used to control the honeypot to open simulated services and ports to attract attackers, pass the instructions of the attracted attackers to the large model, learn the attacker's attack strategy through the large model in the honeypot, and respond to the attacker according to the learned attack strategy.
[0085] In one embodiment, the first creation module is specifically used to: if the large model is a pre-trained model, configure the honeypot through a local plug-in of the large model and generate a virtualized terminal; wherein the virtualized terminal is a window for an attacker to interact with the honeypot.
[0086] In one embodiment, the configuration file created for the port includes at least one of the following: the version of the configuration file, the protocol used, the monitored IP address and port, server description information, response rules for multiple URL paths or multiple instructions, and the status code of the response information.
[0087] In one embodiment, the configuration file for port 80 also includes response header information; for the response rules for multiple URL paths, if the URL path in a request matches any one of the multiple URL paths, a preset HTML page is used as the response information of the request, and a first status code is returned, which is a status code indicating a successful response; if the URL path in a request does not match any of the multiple URL paths, a second status code is returned, which is a status code indicating a failed response.
[0088] In one embodiment, the configuration file for port 8080 has two response rules: a first response rule and a second response rule, wherein the first response rule includes a matching first URL path, a first response header information, and a first response information, and the first response rule corresponds to a first status code; the second response rule includes a matching second URL path, a second response header information, and a second response information, and the second response rule corresponds to a second status code; the first status code is a status code indicating a successful response; the second status code is a status code indicating a failed response.
[0089] In one embodiment, the configuration file for port 22 has response rules for multiple instructions, each response rule includes response information for one instruction; the configuration file for port 22 also includes a regular expression for matching user passwords and a session timeout limit.
[0090] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the device provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.
[0091] In a third aspect, an embodiment of the present invention provides a computer-readable medium, on which computer instructions are stored. When the computer instructions are executed by a processor, the processor executes the method provided in the first aspect.
[0092] Specifically, a system or device equipped with a storage medium can be provided, on which software program code that implements the functions of any of the above-mentioned embodiments is stored, and a computer (or CPU or MPU) of the system or device can be enabled to read and execute the program code stored in the storage medium.
[0093] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
[0094] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.
[0095] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.
[0096] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or expansion module is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.
[0097] It is understandable that the explanation, specific implementation methods, beneficial effects, examples, etc. of the relevant contents in the computer-readable medium provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.
[0098] In a fourth aspect, an embodiment of the present specification provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements the method in any embodiment of the specification.
[0099] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the computing device provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.
[0100] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0101] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the present invention can be implemented by hardware, software, widgets, or any combination thereof. When implemented by software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.
[0102] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.
Claims
1. A network attack processing method based on large model honeypot, It is characterized in that include: Creating a honeypot with a large model in a container; wherein the large model is a deep learning model that learns the attacker's attack strategy; Deploy the honeypot built in the container in the Kubernetes cluster; Creating a configuration file for each honeypot deployed in the kubernetes cluster so that the honeypot simulates services and ports according to the configuration file; The honeypot is controlled to open simulated services and ports to attract attackers, and the instructions of the attracted attackers are passed to the large model. The attack strategy of the attacker is learned through the large model in the honeypot, and the attacker is responded to according to the learned attack strategy.
2. The method according to claim 1, It is characterized in that The step of creating a honeypot with a large model in a container includes: If the large model is a pre-trained model, the honeypot is configured through a local plug-in of the large model, and a virtualized terminal is generated; wherein the virtualized terminal is a window for an attacker to interact with the honeypot.
3. The method according to claim 1, It is characterized in that The configuration file created for the port includes at least one of the following: the version of the configuration file, the protocol used, the monitored IP address and port, the server description information, the response rules for multiple URL paths or multiple instructions, and the status code of the response information.
4. The method according to claim 3, It is characterized in that The configuration file for port 80 also includes response header information; for the response rules for multiple URL paths, if the URL path in a request matches any one of the multiple URL paths, the preset HTML page is used as the response information of the request, and a first status code is returned, which is a status code indicating a successful response; if the URL path in a request does not match any of the multiple URL paths, a second status code is returned, which is a status code indicating a failed response.
5. The method according to claim 3, It is characterized in that The configuration file for port 8080 has two response rules: a first response rule and a second response rule. The first response rule includes a matched first URL path, first response header information and first response information, and the first response rule corresponds to a first status code; the second response rule includes a matched second URL path, second response header information and second response information, and the second response rule corresponds to a second status code; The first status code is a status code indicating a successful response; the second status code is a status code indicating a failed response.
6. The method according to claim 3, It is characterized in that The configuration file for port 22 has response rules for multiple instructions, and each response rule includes response information for one instruction; the configuration file for port 22 also includes a regular expression for matching user passwords and a session timeout limit.
7. A network attack processing device based on a large model honeypot, It is characterized in that include: A first creation module is used to create a honeypot with a large model in a container; wherein the large model is a deep learning model for learning an attacker's attack strategy; The first deployment module is used to deploy the honeypot built in the container in the kubernetes cluster; A second creation module is used to create a configuration file for each honeypot deployed in the kubernetes cluster, so that the honeypot simulates services and ports according to the configuration file; The first simulation module is used to control the honeypot to open simulated services and ports to attract attackers, pass the instructions of the attracted attackers to the large model, learn the attacker's attack strategy through the large model in the honeypot, and respond to the attacker according to the learned attack strategy.
8. The device according to claim 7, It is characterized in that The first creation module is specifically used for: if the large model is a pre-trained model, configuring the honeypot through a local plug-in of the large model and generating a virtualized terminal; wherein the virtualized terminal is a window for an attacker to interact with the honeypot.
9. A computer-readable storage medium, It is characterized in that A computer program is stored thereon, and when the computer program is executed in a computer, the computer is caused to execute the method according to any one of claims 1 to 6.
10. A computing device, It is characterized in that The method comprises a memory and a processor, wherein the memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Industrial control protocol honey pot with self-learning function oriented to industrial internet and application
CN107770199A
Attack intelligent trapping system and method based on virtualization
CN110011982A
Service simulation method and device, computer equipment and storage medium
CN117596087A
Deception defense method and device based on reinforcement learning high attack and defense interaction in multi-honeypot scene
CN117938473A
Cited By
Trapping system implementation method based on intelligent large model
CN119996017A
Processing method based on service attack, electronic equipment, storage medium and program product
CN120639427A
