Malicious domain name access identification method based on large language model

Through the combination of multi-source domain name module and large language model, multi-source domain names in network traffic are extracted and identified, which solves the problems of poor interpretability and strong prior knowledge dependence in malicious domain name recognition, and achieves rapid malicious domain names , accurate identification and comprehensive improvement.

CN118972123AInactive Publication Date: 2024-11-15WEIHAI BLUE OCEAN BANK CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202411062447.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2024-11-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art has problems such as poor interpretability, strong dependence on prior knowledge and a single source of domain names when identifying malicious domain names in network traffic, especially in terms of difficulty in identifying encrypted data.

Method used

The multi-source domain name module is used to extract domain names from different protocols, build a multi-source domain name list, and use a large language model to identify malicious domain names, provide recognition rules, combine embedded vector representation and similarity matching to build a malicious domain name library and interpretable rule library , solve the identification problem.

Benefits of technology

It realizes fast and accurate identification of malicious domain names, improves the comprehensiveness and interpretability of identification, reduces the dependence on prior knowledge, and can efficiently identify malicious domain names without prior knowledge.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118972123A_ABST
    Figure CN118972123A_ABST
Patent Text Reader

Abstract

The invention provides a malicious domain name access identification method based on a large language model, and the method employs a multi-source domain name module and a malicious domain name identification module for identification, the multi-source domain name module can identify protocols in traffic, extract domain names in different protocols, form a multi-source domain name list, and then input the multi-source domain name list to a subsequent module. The malicious domain name recognition module recognizes a domain name to be recognized through a large language model, recognizes whether the domain name is a malicious domain name or not, gives a recognition rule, constructs an interpretable rule base, and recognizes domain names which cannot be recognized by the model again through similarity matching. The method solves the technical problems that at present, recognition of rowang malicious domain names is generally carried out by utilizing machine learning to train a related model or based on mode comparison, most domain names in DNS flow are extracted and recognized only, domain name sources are single, and the comprehensiveness of malicious domain name access recognition is affected. The method can be widely applied to identification of malicious network domain names.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a network identification method, in particular to an identification method for malicious domain name access based on a large language model. Background Art

[0002] As cyber attacks become increasingly complex and frequent, the use of malicious domain names has become an important means for attackers to launch cyber attacks. These attacks not only affect the Internet experience of network users and pose a threat to their personal information and property security, but may also affect the normal operations of network companies and operators and damage economic benefits.

[0003] In order to protect user privacy and data security, more and more network communications adopt encryption technologies, such as HTTPS. While these protocols increase the security of data transmission, they also bring challenges to the identification of malicious domain names in network traffic. Because the content of encrypted data is invisible to network monitoring systems, malicious domain names are usually hidden in encrypted traffic, making traditional content-based identification methods gradually ineffective.

[0004] At present, the identification method for malicious domain name access in network traffic usually uses machine learning to train related models or pattern comparison-based methods for identification. However, the use of machine learning to train related models has the problem of poor interpretability, and the pattern comparison-based method is highly dependent on the provided domain name access blacklist to establish a malicious domain name access behavior model library. At the same time, it requires rich prior knowledge. Most of the current research only extracts and identifies domain names in DNS traffic. The source of domain names is relatively single, which affects the comprehensiveness of malicious domain name access identification. Summary of the invention

[0005] In view of the above technical problems, the present invention provides a method for identifying malicious domain name access based on a large language model. The method for identifying malicious domain name access based on a large language model identifies the protocols contained in the traffic, extracts domain names from different protocols, and constructs a multi-source domain name list. Then, the large language model is called to use its rich world knowledge to identify the malicious domain names of the input domain names to be identified, and identification rules are given to build a malicious domain name library and expand the interpretable rule library for malicious domain name identification. Finally, for domain names that cannot be identified by the large language model, similarity matching is performed with the domain names in the malicious domain name library to further confirm whether the accessed domain name is malicious. This solves the current method of using machine learning to train related models, which leads to poor interpretability, and the method of using pattern comparison, which has a strong dependence on prior knowledge and a single source of domain names. Technical problems.

[0006] To this end, the technical solution of the present invention is a method for identifying malicious domain name access based on a large language model, which uses a multi-source domain name module and a malicious domain name identification module for identification;

[0007] Among them, the multi-source domain name module can identify the protocols in the traffic and extract the domain names in different protocols to form a multi-source domain name list, which is then input into the subsequent modules;

[0008] The malicious domain name identification module can provide a large language model to identify the domain name to be identified, identify whether the domain name to be identified is a malicious domain name, and provide identification rules and build an interpretable rule library. For domain names that cannot be identified by the model, similarity matching is used to identify them again;

[0009] The identification method includes the following steps:

[0010] Step (1): Identify the protocol category in the traffic through the multi-source domain name module, extract domain names from different protocols for different protocol categories, and construct a multi-source domain name list as the domain name to be identified input by the malicious domain name identification module;

[0011] Step (2): Prompt design is performed on the domain name to be identified through the large language model provided by the malicious domain name identification module. Then, in combination with the constructed multi-source domain name list, the large language model is called to identify the input domain name to be identified as a malicious domain name, confirm whether the input domain name to be identified is a malicious domain name, and then output the identification rules through the large language model;

[0012] For domain names identified as malicious, embedding vectors are used to represent them, and a malicious domain name library is constructed, and the identified malicious domain names are stored in the malicious domain name library;

[0013] For the output malicious domain name identification rules, an interpretable rule base for malicious domain name identification is constructed;

[0014] Step (3): For the domain names that cannot be identified by the large language model in step (2), an embedding vector is used to represent them, and similarity is calculated with the domain name embedding vector in the malicious domain name library to identify whether the domain name is a malicious domain name again. For the domain names identified as malicious, they are stored in the malicious domain name library. The specific similarity calculation formula is:

[0015]

[0016] Wherein, A represents the domain name embedding vector that cannot be recognized by the large language model in step (3), and B represents the domain name embedding vector that is recognized as malicious by the large language model in step (2). When the similarity between the domain name that cannot be recognized by the large language model and the domain name in the malicious domain name library exceeds the set threshold, it is identified as a malicious domain name and stored in the malicious domain name library.

[0017] Preferably, in step (1), when the protocol type is the DNS protocol, the domain name is extracted from the Qname field of the query part.

[0018] Preferably, in step (1), when the protocol category is HTTP protocol, the access domain name is extracted from the URI field in the request line.

[0019] Preferably, in step (1), when the protocol category is the encrypted TLS protocol, the domain name is extracted from the SNI extension field in the handshake message ClientHello or ServerHello.

[0020] Preferably, the encrypted TLS protocol is the HTTPS protocol.

[0021] Preferably, in step (2), the prompt design includes four parts: task description, input data format, output data format, and actual input and output examples.

[0022] Preferably, in step (2), the recognition rules output by the large language model include whether the domain name content is likely to mislead users, the similarity between the domain name and a well-known brand or trademark, whether the registration and use purpose of the domain name is compliant, whether the registration and holder information of the domain name is fully documented, whether the domain name length is too long, and whether the domain name content contains too many meaningless characters.

[0023] The beneficial effects of the present invention are:

[0024] 1. In this identification method, a prompt is designed for the domain name to be identified input by the malicious domain name identification module, so as to make targeted prompts to the large language model. By providing clear and concise instructions or questions, the ability of the large model is fully utilized, so that it can better understand user needs and obtain better model output;

[0025] At the same time, the user combines and calculates the task description, input data format, output data format, and actual input and output examples in the prompt design, and then calls the large language model interface to identify the domain name to be identified, and can quickly and accurately obtain the specific reasons for the identification results;

[0026] Among them, task description can improve the accuracy and pertinence of the model and reduce the number of model outputs that are irrelevant to the task or erroneous results. It is necessary to provide the model with clear directions through clear task descriptions to avoid deviations in the model's understanding of the task and ensure that the model focuses on the correct instructions.

[0027] The input data format defines the specific way and structure of the model receiving data. By specifying the input data format, the large language model can accurately parse and understand the input information, ensuring that the large language model can receive and process data that conforms to a specific format, avoiding errors and reduced recognition performance caused by data format mismatch, thereby improving the efficiency of the large language model in processing input data and enabling it to analyze and identify malicious domain names more quickly;

[0028] The output data format defines the specific method and structure of the large language model to return results. By specifying the output data format, the large language model can return results in a unified way, which is convenient for subsequent processing and analysis, improves the readability and interpretability of the results, and enables users to more intuitively understand the judgment basis of the large language model;

[0029] The actual input and output examples provide specific training samples and reference results for the large language model. By showing real data examples of malicious domain names and legitimate domain names and the corresponding classification results, the large language model can more intuitively understand the requirements and expected outputs of the task, thereby improving the model's intuitive understanding and generalization capabilities, enabling it to better adapt to malicious domain name identification scenarios.

[0030] 2. This identification method analyzes a large number of existing benign and malicious domain name site access traffic data, identifies the protocols contained in the traffic, extracts domain names from different protocols, builds a multi-source domain name list, calls a large language model for the input domain name to be identified, identifies malicious domain names, and gives identification rules, thereby building a malicious domain name library and expanding the interpretable rule library for malicious domain name identification. Then, the domain names that cannot be identified by the large language model are matched with the domain names in the malicious domain name library for similarity, and further confirm whether the malicious domain name is accessed. By extracting multi-source domain names from multiple protocols, efficient malicious domain name identification and corresponding identification rules are output based on the large language model without any prior knowledge, effectively solving the technical problems of single domain name source, poor interpretability of machine learning, and strong dependence of pattern comparison on prior knowledge. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a logical schematic diagram of the multi-source domain name module and the malicious domain name identification module of the present invention;

[0032] Figure 2 It is a logical schematic diagram of the identification rules of the present invention. DETAILED DESCRIPTION

[0033] The present invention will be further described below in conjunction with embodiments.

[0034] pass Figure 1-Figure 2 It can be seen that the identification method of malicious domain name access based on the large language model adopts a multi-source domain name module and a malicious domain name identification module for identification.

[0035] Among them, the multi-source domain name module can identify the protocols in the traffic, extract the domain names in different protocols, form a multi-source domain name list, and then input it into the subsequent modules.

[0036] The malicious domain name identification module can provide a large language model to identify the domain name to be identified and whether it is a malicious domain name. At the same time, it provides identification rules and builds an interpretable rule library. For domain names that cannot be identified by the model, they are re-identified through similarity matching.

[0037] The identification method includes the following steps:

[0038] Step (1): Identify the protocol category in the traffic through the multi-source domain name module, extract domain names from different protocols for different protocol categories, and construct a multi-source domain name list as the domain name to be identified input by the malicious domain name identification module.

[0039] Step (2): Prompt design is performed on the domain name to be identified through the large language model provided by the malicious domain name identification module. Then, combined with the constructed multi-source domain name list, the large language model is called to identify the input domain name to be identified as a malicious domain name, confirm whether the input domain name to be identified is a malicious domain name, and then output the identification rules through the large language model.

[0040] For domain names identified as malicious, an embedding vector is used to represent them, and a malicious domain name library is constructed, and the identified malicious domain names are stored in the malicious domain name library.

[0041] For the output malicious domain name identification rules, an interpretable rule base for malicious domain name identification is constructed.

[0042] Step (3): For the domain names that cannot be identified by the large language model in step (2), an embedding vector is used to represent them, and similarity is calculated with the domain name embedding vector in the malicious domain name library to identify whether the domain name is a malicious domain name again. For the domain names identified as malicious, they are stored in the malicious domain name library. The specific similarity calculation formula is:

[0043]

[0044] Wherein, A represents the domain name embedding vector that cannot be recognized by the large language model in step (3), and B represents the domain name embedding vector that is recognized as malicious by the large language model in step (2). When the similarity between the domain name that cannot be recognized by the large language model and the domain name in the malicious domain name library exceeds the set threshold, it is identified as a malicious domain name and stored in the malicious domain name library.

[0045] In step (1), when the protocol type is the DNS protocol, the domain name is extracted from the Qname field of the query part.

[0046] In step (1), when the protocol category is HTTP protocol, the access domain name is extracted from the URI field in the request line.

[0047] In step (1), when the protocol category is the encrypted TLS protocol, the domain name is extracted from the SNI extension field in the handshake message ClientHello or ServerHello.

[0048] The encrypted TLS protocol is the HTTPS protocol.

[0049] In step (2), the prompt design includes four parts: task description, input data format, output data format, and actual input and output examples.

[0050] Among them, task description can improve the accuracy and pertinence of the model and reduce the number of model outputs that are irrelevant to the task or are erroneous. It is necessary to provide the model with clear direction through clear task description to avoid deviations in the model's understanding of the task and ensure that the model focuses on the correct instructions.

[0051] The input data format defines the specific way and structure of the model receiving data. By specifying the input data format, the large language model can accurately parse and understand the input information, ensuring that the large language model can receive and process data that conforms to a specific format, avoiding errors caused by data format mismatch and reducing recognition performance, thereby improving the large language model's processing efficiency of input data and enabling it to analyze and identify malicious domain names more quickly.

[0052] The output data format defines the specific method and structure of the large language model's return results. By specifying the output data format, the large language model can return results in a unified manner, which is convenient for subsequent processing and analysis, improves the readability and interpretability of the results, and enables users to more intuitively understand the judgment basis of the large language model.

[0053] The actual input and output examples provide specific training samples and reference results for the large language model. By showing real data examples of malicious domain names and legitimate domain names and the corresponding classification results, the large language model can more intuitively understand the requirements and expected outputs of the task, thereby improving the model's intuitive understanding and generalization capabilities, enabling it to better adapt to malicious domain name identification scenarios.

[0054] The following are sample formats for reference for the four parts of Prompt design:

[0055] Task description: "Identify whether a given domain name is malicious or not."

[0056] Input data format:

[0057] "example1.com", "example2.org", "example3.net"

[0058] Output data format:

[0059] {"example1.com":0.9,Reason: XXXX}

[0060] {"example2.org":0.1,Reason: XXXX}

[0061] {"example3.net":0.7,Reason: XXXX}

[0062] Actual input and output examples:

[0063] enter:

[0064] “malicious-domain.com”

[0065] “safe-domain.org”

[0066] “suspicious-domain.net”

[0067] Output:

[0068] {"malicious-domain.com":0.99,Reason: XXXX}

[0069] {"safe-domain.org":0.01,Reason: XXXX}

[0070] {"suspicious-domain.net":0.6,reason:XXXX}].

[0071] By designing prompts for the domain names to be identified that are input into the malicious domain name identification module, targeted prompts can be given to the large language model. By providing clear and concise instructions or questions, the capabilities of the large model can be fully utilized, enabling it to better understand user needs and thus obtain better model output.

[0072] At the same time, the user combines and calculates the task description, input data format, output data format, and actual input and output examples in the Prompt design, and then calls the large language model interface to identify the domain name to be identified, and can quickly and accurately obtain the specific reason for the identification result.

[0073] In step (2), the recognition rules output by the large language model include whether the domain name content is likely to mislead users, the similarity between the domain name and well-known brands or trademarks, whether the registration and use purposes of the domain name are compliant, whether the registration and holder information of the domain name is fully documented, whether the domain name length is too long, and whether the domain name content contains too many meaningless characters.

[0074] In step (3), the similarity threshold is set to 0.8, which is set based on the historical data analysis of the embedding vectors of malicious domain names and normal domain names. It can avoid misjudging too many normal domain names as malicious domain names while maintaining a high recognition accuracy.

[0075] The following is an explanation of the setting standard of the similarity threshold based on specific experimental data:

[0076] The dataset collection method is as follows: we use the top 1 million domain names from Alexa to mark benign domain names, and obtain malicious domain names from three sources: malware, normshield, and ransomwaretracker.

[0077] Threshold range: 0.5-0.9, step size is 0.1.

[0078] Performance indicator judgment criteria: accuracy, precision, recall and F1 score.

[0079] The experimental results are as follows:

[0080] Threshold Accuracy Accuracy Recall F1 score 0.5 96.84% 96.88% 97.45% 0.97164 0.6 97.08% 96.96% 97.01% 0.96985 0.7 97.55% 97.12% 96.97% 0.97044 0.8 97.78% 97.48% 96.85% 0.97164 0.9 98.76% 97.67% 96.54% 0.97102

[0081] From the above experimental results, it can be seen that when the threshold is set to 0.8 and 0.5, the F1 score of the model is the highest, reaching 0.97164. Therefore, 0.8 as a similarity threshold standard is an effective setting standard, which can reduce underreporting while ensuring a high recognition rate.

[0082] It should be noted that since different similarity thresholds have a significant impact on the recognition effect, in practical applications, it is necessary to set an appropriate similarity threshold standard according to specific needs and data conditions to achieve the best recognition effect.

[0083] The identification method analyzes a large number of existing benign and malicious domain name site access traffic data, identifies the protocols contained in the traffic, extracts domain names from different protocols, builds a multi-source domain name list, calls a large language model for the input domain name to be identified, identifies malicious domain names, and gives identification rules, thereby building a malicious domain name library and expanding the interpretable rule library for malicious domain name identification. Then, the domain names that cannot be identified by the large language model are matched with the domain names in the malicious domain name library for similarity, and further confirm whether the malicious domain name is accessed. By extracting multi-source domain names from multiple protocols, efficient malicious domain name identification and corresponding identification rules are output based on the large language model without any prior knowledge, effectively solving the technical problems of single domain name source, poor interpretability of machine learning, and strong dependence of pattern comparison on prior knowledge.

[0084] However, what is described above is only a specific embodiment of the present invention and should not be used to limit the scope of implementation of the present invention. Therefore, the replacement of equivalent components, or equivalent changes and modifications made according to the scope of protection of the present invention should still fall within the scope covered by the claims of the present invention.

Claims

1. A method for identifying malicious domain name access based on a large language model, characterized by: Use multi-source domain name module and malicious domain name identification module for identification; The multi-source domain name module can identify the protocols in the traffic and extract the domain names in different protocols to form a multi-source domain name list, which is then input into the subsequent modules; The malicious domain name identification module can provide a large language model to identify the domain name to be identified, identify whether the domain name to be identified is a malicious domain name, and provide identification rules, and build an interpretable rule library, and re-identify the domain name that the model cannot identify through similarity matching; The identification method comprises the following steps: Step (1): Identify the protocol category in the traffic through the multi-source domain name module, extract domain names from different protocols for different protocol categories, and construct a multi-source domain name list as the domain name to be identified input by the malicious domain name identification module; Step (2): Prompt design is performed on the domain name to be identified through the large language model provided by the malicious domain name identification module. Then, in combination with the constructed multi-source domain name list, the large language model is called to identify the input domain name to be identified as a malicious domain name, confirm whether the input domain name to be identified is a malicious domain name, and then output the identification rules through the large language model; For domain names identified as malicious, embedding vectors are used to represent them, and a malicious domain name library is constructed, and the identified malicious domain names are stored in the malicious domain name library; For the output malicious domain name identification rules, an interpretable rule base for malicious domain name identification is constructed; Step (3): For the domain names that cannot be identified by the large language model in step (2), an embedding vector is used to represent them, and similarity is calculated with the domain name embedding vector in the malicious domain name library to identify whether the domain name is a malicious domain name again. For the domain names identified as malicious, they are stored in the malicious domain name library. The specific similarity calculation formula is: Wherein, A represents the domain name embedding vector that cannot be recognized by the large language model in step (3), and B represents the domain name embedding vector that is recognized as malicious by the large language model in step (2). When the similarity between the domain name that cannot be recognized by the large language model and the domain name in the malicious domain name library exceeds the set threshold, it is identified as a malicious domain name and stored in the malicious domain name library.

2. The method for identifying malicious domain name access based on a large language model according to claim 1, characterized in that: In the step (1), when the protocol type is the DNS protocol, the domain name is extracted from the Qname field of the query part.

3. The method for identifying malicious domain name access based on a large language model according to claim 1, characterized in that: In the step (1), when the protocol type is the HTTP protocol, the access domain name is extracted from the URI field in the request line.

4. The method for identifying malicious domain name access based on a large language model according to claim 1, characterized in that: In the step (1), when the protocol type is the encrypted TLS protocol, the domain name is extracted from the SNI extension field in the handshake message ClientHello or ServerHello.

5. The method for identifying malicious domain name access based on a large language model according to claim 4 is characterized in that: The encrypted TLS protocol is the HTTPS protocol.

6. The method for identifying malicious domain name access based on a large language model according to claim 1, characterized in that: In step (2), the prompt design includes four parts: task description, input data format, output data format, and actual input and output examples.

7. The method for identifying malicious domain name access based on a large language model according to claim 1, characterized in that: In step (2), the recognition rules output by the large language model include whether the domain name content is likely to mislead users, the similarity between the domain name and a well-known brand or trademark, whether the registration and use purpose of the domain name is compliant, whether the registration and holder information of the domain name is fully documented, whether the domain name length is too long, and whether the domain name content contains too many meaningless characters.

Citation Information

Patent Citations

  • Method for multi-dimensionally detecting malicious domain names

    CN111245784A

  • Management and control method, device, equipment and system for intranet malicious reverse connection behavior

    CN111865990A

  • Malicious domain name detection method and device, equipment and storage medium

    CN113542442A

  • Abnormal traffic interception method and device, abnormal domain name identification method and device, equipment and medium

    CN115037537A

  • Abnormal traffic detection method and system, and computer storage medium

    CN115606162A