Mail abnormal account detection method and device, electronic equipment and storage medium
By building a knowledge graph of SMTP protocol logs and using path search and Wasserstein distance algorithms, the problem of low efficiency in email system log analysis is solved, rapid identification and association of abnormal accounts is achieved, and the security of the email system is improved.
Patent Information
- Application Number
- CN202310213342.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-07
- Publication Date
- 2024-09-10
AI Technical Summary
The existing technology is inefficient when analyzing email system logs and cannot quickly associate abnormal email accounts, resulting in the inability to effectively protect against hacker attacks.
By building a knowledge graph based on SMTP protocol logs, the path search algorithm and Wasserstein distance algorithm are used to calculate the entity similarity between accounts, and detect and mark potentially abnormal accounts in real time.
It realizes the rapid identification and association of abnormal login accounts and improves the security and protection efficiency of the email system.
Smart Images

Figure CN118631476A
Abstract
Description
Technical Field
[0001] The present application relates to the field of email security technology, and in particular to a method and device for detecting abnormal email accounts, an electronic device, and a storage medium. Background Art
[0002] The SMTP protocol is widely used in email communications, but it has many security risks and can be easily exploited by hackers to attack. However, its logs record a wide range of behaviors. The SMTP protocol log records information such as email account login and mail sending, especially the mail sending records, which can depict the relationship between users.
[0003] The number of logs generated by the mail system server every day is over TB level, and some of them record some abnormal user behaviors and even hacker attacks. Therefore, it is particularly important to analyze the mail logs and quickly find the hidden abnormal accounts for protection. However, due to the large volume of mail system logs, the use of traditional database search technology to analyze mail logs has the problem of low search efficiency and inability to quickly associate all similar mail accounts.
[0004] In the related art, there is still no good solution to the problem that the detection efficiency of abnormal email accounts is low and all similar email accounts cannot be quickly associated. Summary of the invention
[0005] The embodiments of the present application provide a method and device for detecting abnormal email accounts, an electronic device, and a storage medium to achieve real-time retrieval of email accounts with abnormal logins, and retrieval of potential abnormal accounts that are highly similar to abnormal login accounts.
[0006] The present application embodiment adopts the following technical solutions:
[0007] In a first aspect, an embodiment of the present application provides a method for detecting abnormal email accounts, characterized in that the method includes:
[0008] Build a knowledge graph based on STMP protocol logs;
[0009] According to the knowledge graph, determine the initial abnormal email login account and the abnormal email login IP address;
[0010] According to the initial abnormal email login account and the abnormal email login IP address, the abnormal account in the email system network is searched.
[0011] In some embodiments, searching for an abnormal account in the mail system network according to the initial abnormal mail login account and the abnormal mail login IP address includes:
[0012] A three-layer detection method is used for the abnormal email account, and the three-layer detection includes:
[0013] Find the account to be detected that is associated with the abnormal email account through a path search algorithm to obtain a filter set;
[0014] Calculate the entity similarity between the initial email abnormal login account and the account to be detected in the filtering set by using a preset distance algorithm;
[0015] The entities are sorted according to their similarity scores to obtain the abnormal email accounts that need to be found.
[0016] In some embodiments, the method of finding the account to be detected associated with the abnormal email account through a path search algorithm to obtain a filter set includes:
[0017] When the path of the breadth-first path algorithm is 1, find the account that has a direct email sending relationship with the abnormal email account;
[0018] When the breadth-first path is greater than 1 and less than N, find an account that is indirectly related to the abnormal email account;
[0019] A filter set is obtained according to the searched accounts to be detected that are associated with the abnormal email account and the filtering results between the accounts to be detected.
[0020] In some embodiments, the calculating the entity similarity between the initial abnormal email login account and the account to be detected in the filter set by using a preset distance algorithm includes:
[0021] The entity similarity between the initial abnormal email login account and the account to be detected in the filter set is calculated using the Wasserstein distance algorithm.
[0022] In some embodiments, the calculating of the entity similarity between the initial abnormal email login account and the account to be detected in the filter set by using the Wasserstein distance algorithm specifically includes:
[0023] Define the dynamic threshold T for the email abnormal account query filtering dynamic It changes with the number n of common paths between two nodes.
[0024]
[0025] The initial abnormal account node is recorded as q, the account node to be detected is recorded as g, the calculated weight is expressed as wi, the relevant attribute feature set of the initial email abnormal account is recorded as P1, the relevant attribute feature set of the account to be detected is recorded as P2, the account attributes and IP attributes corresponding to the P1 account are recorded as xi, and the corresponding account attributes and IP attributes corresponding to the P2 account are recorded as yi. The calculation method of the correlation similarity between the two accounts is:
[0026]
[0027] Where ∏(p1,p2) is the set of all possible joint distributions of P1 and P2, and inf represents the lower bound of the expected value of the set of all possible joint distributions.
[0028] In some embodiments, the sorting according to the entity similarity scores to obtain the abnormal email accounts to be found includes:
[0029] Sorting the entity similarity scores using a relevant sorting algorithm, and comparing the sorting results with corresponding filtering thresholds;
[0030] If the ranking result is greater than the corresponding filtering threshold, the query account at the preset ranking position is marked as a potential email abnormality account as an email abnormality account that needs to be found.
[0031] In some embodiments, searching for an abnormal account in the mail system network according to the initial abnormal mail login account and the abnormal mail login IP address includes:
[0032] For the abnormal login IP address, a breadth-first search algorithm is used to find an account that has a direct login relationship with the IP address, and the searched account is used as the abnormal account that needs to be found.
[0033] In a second aspect, an embodiment of the present application provides a device for detecting abnormal email accounts, the device comprising:
[0034] A graph building module, used to build a knowledge graph based on the STMP protocol log;
[0035] A query module, used to determine the initial abnormal email login account and the abnormal email login IP address according to the knowledge graph;
[0036] The query module is used to search for abnormal accounts in the mail system network according to the initial abnormal mail login account and the abnormal mail login IP address.
[0037] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor; and a memory arranged to store computer executable instructions, wherein the executable instructions, when executed, cause the processor to perform the above method.
[0038] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores one or more programs. When the one or more programs are executed by an electronic device including multiple application programs, the electronic device executes the above method.
[0039] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects:
[0040] The knowledge graph of the mail system is constructed using the SMTP protocol log, and then the association between entities is used to discover abnormal accounts. The association between mail system accounts is further constructed by using the knowledge graph, and the association characteristics of the knowledge graph are used to accurately and real-time discover the abnormal login initial abnormal account in the log and the potential abnormal account with a large similarity to the initial abnormal account. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0042] Figure 1 This is a flow chart of a method for detecting abnormal email accounts in an embodiment of the present application;
[0043] Figure 2 This is a schematic diagram of the structure of the abnormal email account detection device in the embodiment of the present application;
[0044] Figure 3 It is a schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0046] During research, the inventor discovered that the SMTP mail server logs in the related art are usually stored in a relational database or a distributed search engine for query when needed. However, due to the huge amount of log data generated every day, the speed of using traditional databases to retrieve abnormal email accounts can no longer meet the real-time requirements, and the efficiency is not very high when associating abnormal accounts.
[0047] In response to the above problems, an embodiment of the present application provides a method for detecting abnormal email accounts, which uses a knowledge graph to store SMTP email server logs, mainly to be able to retrieve email accounts with abnormal logins in real time, and to retrieve potential abnormal accounts that are highly similar to abnormal login accounts.
[0048] Furthermore, the knowledge graph is used to construct the association relationship between email system accounts, and the association characteristics of the knowledge graph are used to discover the initial abnormal account of abnormal login in the log and the potential abnormal account with a high similarity to the initial abnormal account.
[0049] First, in the knowledge graph, the initial abnormal account can be found through the number of account login failures within a period of time. Since there is a correlation between similar email accounts, the correlation similarity between accounts is calculated to obtain the associated account with a greater similarity to the initial abnormal account. If the similarity exceeds the previously set filtering threshold, it will be set as a potential abnormal account and an alarm will be issued for manual investigation.
[0050] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0051] The present application embodiment provides a method for detecting abnormal email accounts, such as Figure 1 As shown, a flow chart of a method for detecting abnormal email accounts in an embodiment of the present application is provided, and the method at least includes the following steps S110 to S130:
[0052] Step S110, establishing a knowledge graph based on the STMP protocol log.
[0053] Based on the STMP protocol, the initial abnormal point is found and a knowledge graph is established. In other words, the number of failed logins in the SMTP protocol within a period of time is used to analyze whether there are abnormal login accounts and abnormal login IPs in the log.
[0054] It should be noted that the <user> - <time>- Establish the corresponding knowledge graph framework through the connection between <IP address>, and further find the initial abnormal user and IP address.
[0055] In some embodiments, using the username, login time, and login IP as entities, and other records as attributes, through the establishment in the knowledge graph <user> - <time>- Establish the corresponding knowledge graph framework through the connection between <IP address>.
[0056] Step S120: Determine the initial email abnormal login account and the email abnormal login IP address according to the knowledge graph.
[0057] It can be understood that extracting relevant records from email log records includes but is not limited to account attributes, IP attributes, the association relationship between users and IPs, and the association relationship between users and users.
[0058] Among them, the account attributes include but are not limited to age, the unit to which the account belongs, the user position to which the account belongs, etc.; the IP attributes include but are not limited to geographical location information, the affiliated operator, the historical credit value obtained from the threat intelligence database, etc.
[0059] Step S130: Search for abnormal accounts in the email system network according to the initial email abnormal login account and the email abnormal login IP address.
[0060] According to the knowledge graph, use the initial abnormal nodes (i.e., abnormal accounts and abnormal IPs) to discover abnormal accounts in the entire email system network. Specifically, through the powerful association information ability of the knowledge graph, relevant attributes and entities can be quickly associated. The abnormal IP can directly use the breadth-first search algorithm to automatically find the accounts that have a direct login relationship with this IP, and the searched accounts are used as abnormal accounts for warning and manual investigation.
[0061] In some embodiments, an abnormal account refers to a situation where, when the user account and the login IP are fixed, if the number of account login failures within one hour exceeds the previously set threshold, it is determined that both the login account and the IP address of this user are abnormal.
[0062] In some embodiments, the abnormal IP refers to a situation where, when the IP addresses are the same but the users are different, if the number of users who fail to log in with this IP address within one hour exceeds the previously set threshold, it is determined that the login IP and the relevant users are abnormal.
[0063] In an embodiment of the present application, the searching for abnormal accounts in the email system network according to the initial email abnormal login account and the email abnormal login IP address includes:
[0064] Adopt a three-layer detection method for the email abnormal accounts, and the three-layer detection includes:
[0065] Find the accounts to be detected associated with the email abnormal account through the path search algorithm to obtain a filtered set;
[0066] Calculate the entity similarity between the initial email abnormal login account and the account to be detected in the filtering set by using a preset distance algorithm;
[0067] The entities are sorted according to their similarity scores to obtain the abnormal email accounts that need to be found.
[0068] In specific implementation, based on the powerful information association capability of the knowledge graph, related attributes and entities can be quickly associated. First, accounts with a high degree of association with abnormal accounts are found through path search, thereby filtering out a large number of irrelevant query accounts and obtaining a filtered set; then the Wasserstein distance is used to calculate the similarity between the initial abnormal account and the filtered account; finally, the obtained entity similarity scores are sorted and irrelevant accounts are filtered out through a threshold, and after the final abnormal account is obtained, an alarm is issued and manual investigation is carried out.
[0069] In one embodiment of the present application, the path search algorithm is used to find the account to be detected associated with the abnormal email account to obtain a filter set, including: when the path of the breadth-first path algorithm is set to 1, find the account that has a direct email sending relationship with the abnormal email account; when the breadth-first path algorithm path is greater than 1 and less than N, find the account that has an indirect relationship with the abnormal email account; obtain the filter set based on the searched account to be detected associated with the abnormal email account and the filtering results between the accounts to be detected.
[0070] In the specific implementation, at the entity relationship discovery stage, when the amount of data stored in the knowledge graph is large, performing association analysis on each node will generate huge computational consumption, which will greatly increase the time complexity of association calculation, resulting in the association analysis calculation of users no longer being suitable for email anomaly detection systems that have high real-time requirements.
[0071] Furthermore, in the entity relationship discovery phase, the breadth-first search algorithm of the graph can quickly find accounts with a high degree of association with abnormal accounts. When the path of the breadth-first algorithm is set to 1, accounts with direct email sending relationships with abnormal accounts can be found. When the breadth-first algorithm path is greater than 1 and less than N, accounts with indirect relationships with the account can be found. After finding the account related to the initial abnormal account through this method, the number of paths between the two accounts is calculated. The number of paths that can be obtained is the total number of public relationships between two different nodes and is recorded as n, which is used for subsequent filtering operations.
[0072] In one embodiment of the present application, the calculating the entity similarity between the initial email abnormal login account and the account to be detected in the filtering set by using a preset distance algorithm includes: calculating the entity similarity between the initial email abnormal login account and the account to be detected in the filtering set by using a Wasserstein distance algorithm.
[0073] In the specific implementation, during the user anomaly detection stage, the correlation between account attributes is used as the condition for relationship discovery. In the similarity query filtering method, a filtering threshold is generally defined as a condition. If the relationship similarity calculated for the account to be queried is greater than the filtering threshold, the account will be treated as a potential abnormal account.
[0074] In one embodiment of the present application, the calculating of the entity similarity between the initial abnormal email login account and the account to be detected in the filter set by using the Wasserstein distance algorithm specifically includes:
[0075] Define the dynamic threshold T for the email abnormal account query filtering dynamic It changes with the number n of common paths between two nodes.
[0076]
[0077] The initial abnormal account node is recorded as q, the account node to be detected is recorded as g, the calculated weight is expressed as wi, the relevant attribute feature set of the initial email abnormal account is recorded as P1, the relevant attribute feature set of the account to be detected is recorded as P2, the account attributes and IP attributes corresponding to the P1 account are recorded as xi, and the corresponding account attributes and IP attributes corresponding to the P2 account are recorded as yi. The calculation method of the correlation similarity between the two accounts is:
[0078]
[0079] Where ∏(p1,p2) is the set of all possible joint distributions of P1 and P2, and inf represents the lower bound of the expected value of the set of all possible joint distributions.
[0080] In the specific implementation, considering the differences in the relationship between different nodes, the threshold should not be unique, so a dynamic threshold T for abnormal account query filtering is defined dynamic As the number of common paths n between two nodes changes, we can get the formula:
[0081]
[0082] The Wasserstein distance is used to calculate the correlation similarity between user accounts. Wasserstein distance is also called Earth-Mover distance (EM distance). It is generally used to measure the distance between two distributions, and the geometric characteristics between distributions can also be taken into account. Each user's attribute corresponds to a joint probability distribution, so that the Wasserstein distance is used to calculate the similarity between user attributes. Based on the above viewpoints, it can be shown that Wasserstein distance is suitable for the problem to be solved by this system.
[0083] Furthermore, the initial abnormal account node is recorded as q, the account node to be detected is recorded as g, the calculated weight is expressed as wi, the relevant attribute feature set of the initial abnormal account is recorded as P1, and the relevant attribute feature set of the account to be detected is recorded as P2. The account attributes (for example: age, account unit, account user position, etc.) and IP attributes (for example: geographic location information, affiliated operator, historical reputation value obtained from the threat intelligence library, etc.) corresponding to the P1 account are recorded as xi, and the corresponding account attributes and IP attributes corresponding to P2 are recorded as yi. Then the calculation method of the correlation similarity between two accounts can be expressed as:
[0084]
[0085] Where ∏(p1,p2) is the set of all possible joint distributions of P1 and P2, and inf represents the lower bound of the expected value of the set of all possible joint distributions.
[0086] In one embodiment of the present application, the sorting is performed according to the entity similarity scores to obtain the abnormal email account that needs to be found, including: using a relevant sorting algorithm to sort the entity similarity scores, and comparing the sorting result with the corresponding filtering threshold; if the sorting result is greater than the corresponding filtering threshold, marking the query account at a preset ranking position as a potential abnormal email account as the abnormal email account that needs to be found.
[0087] In the specific implementation, in the association similarity sorting stage, in the final result set, the association similarities between accounts are automatically sorted using the relevant sorting algorithm, and the sorting results are compared with the corresponding filtering threshold.
[0088] Score (q,g) >T dynamic (n)
[0089] If the similarity of the queried accounts exceeds the filtering condition, the top ten queried accounts will be marked as potential abnormal accounts (if there are less than ten, the actual number will be marked), and an alarm will be issued for manual investigation.
[0090] In one embodiment of the present application, the abnormal account in the email system network is searched based on the initial abnormal email login account and the abnormal email login IP address, including: for the abnormal login IP address, a breadth-first search algorithm is used to find an account that has a direct login relationship with the IP address, and the searched account is used as the abnormal account that needs to be found.
[0091] In specific implementation, in addition to abnormal email login accounts, if it is an abnormal IP address, the breadth-first search algorithm can be used to automatically find accounts that have a direct login relationship with the IP address, and the searched account will be alerted as an abnormal account and manually checked.
[0092] The present application embodiment also provides an abnormal email account detection device 200, such as Figure 2 As shown, a schematic diagram of the structure of an abnormal email account detection device in an embodiment of the present application is provided. The abnormal email account detection device 200 at least includes: a graph establishment module 210, a query module 220 and a query module 230, wherein:
[0093] The graph building module 210 in the embodiment of the present application is used to build a knowledge graph based on the STMP protocol log.
[0094] Based on the STMP protocol, the initial abnormal point is found and a knowledge graph is established. In other words, the number of failed logins in the SMTP protocol within a period of time is used to analyze whether there are abnormal login accounts and abnormal login IPs in the log.
[0095] It should be noted that the <user> - <time>- Establish the corresponding knowledge graph framework through the connection between <IP addresses>, and further find the initial abnormal users and IP addresses.
[0096] In some embodiments, using the username, login time, and login IP as entities, and other records as attributes, through the <user> - <time>- Establish the corresponding knowledge graph framework through the connection between <IP address>.
[0097] The query module 220 in the embodiment of the present application is applied to determine the initial abnormal login account and abnormal login IP address of the email according to the knowledge graph.
[0098] It can be understood that extracting relevant records from the email log records includes but is not limited to account attributes, IP attributes, the association relationship between the user and the IP, and the association relationship between users.
[0099] Among them, the account attributes include but are not limited to age, the unit to which the account belongs, the user position to which the account belongs, etc.; the IP attributes include but are not limited to geographical location information, the affiliated operator, the historical reputation value obtained from the threat intelligence library, etc.
[0100] The query module 230 in the embodiment of the present application is applied to find abnormal accounts in the email system network according to the initial abnormal login account and abnormal login IP address of the email.
[0101] According to the knowledge graph, use the initial abnormal nodes (i.e., abnormal accounts and abnormal IPs) to discover abnormal accounts in the entire email system network. Specifically, through the powerful association information ability of the knowledge graph, relevant attributes and entities can be quickly associated. The abnormal IP can directly use the breadth-first search algorithm to automatically find the accounts that have a direct login relationship with this IP, and the searched accounts are used as abnormal accounts for alarm and manual investigation.
[0102] In some embodiments, an abnormal account refers to the situation where, when the user account and the login IP are fixed, if the number of account login failures within one hour exceeds the previously set threshold, it is determined that both the login account and the IP address of the user are abnormal.
[0103] In some embodiments, an abnormal IP refers to the situation where, when the IP addresses are the same but the users are different, if the number of users who fail to log in to this IP address within one hour exceeds the previously set threshold, it is determined that the login IP and the related users are abnormal.
[0104] Figure 3 It is a schematic structural diagram of an electronic device in an embodiment of the present application. Please refer to Figure 3 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.
[0105] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0106] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.
[0107] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming an abnormal email account detection device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:
[0108] Build a knowledge graph based on STMP protocol logs;
[0109] According to the knowledge graph, determine the initial abnormal email login account and the abnormal email login IP address;
[0110] According to the initial abnormal email login account and the abnormal email login IP address, the abnormal account in the email system network is searched.
[0111] The above application Figure 1 The method performed by the abnormal email account detection device disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0112] The electronic device may also perform Figure 1 The method executed by the abnormal email account detection device in the Figure 1 The functions of the illustrated embodiment will not be described in detail in the embodiments of the present application.
[0113] The present application also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by an electronic device including multiple application programs, enable the electronic device to execute Figure 1 The method performed by the email abnormal account detection device in the embodiment shown is specifically used to perform:
[0114] Build a knowledge graph based on STMP protocol logs;
[0115] According to the knowledge graph, determine the initial abnormal email login account and the abnormal email login IP address;
[0116] According to the initial abnormal email login account and the abnormal email login IP address, the abnormal account in the email system network is searched.
[0117] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0118] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0119] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0120] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0121] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0122] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0123] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0124] It should also be noted that the term "includes", "comprising" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the existence of other identical elements in the process, method, commodity or device including the element.
[0125] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0126] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.< / time> < / user> < / time> < / user> < / time> < / user> < / time> < / user>
Claims
1. A method for detecting abnormal email accounts, characterized in that: The method include:. Build a knowledge graph based on STMP protocol logs; According to the knowledge graph, determine the initial abnormal email login account and the abnormal email login IP address; According to the initial abnormal email login account and the abnormal email login IP address, the abnormal account in the email system network is searched.
2. The method according to claim 1, characterized in that: The step of searching for an abnormal account in the mail system network according to the initial abnormal mail login account and the abnormal mail login IP address includes: A three-layer detection method is used for the abnormal email account, and the three-layer detection includes: Find the account to be detected that is associated with the abnormal email account through a path search algorithm to obtain a filter set; Calculate the entity similarity between the initial email abnormal login account and the account to be detected in the filtering set by using a preset distance algorithm; The entities are sorted according to their similarity scores to obtain the abnormal email accounts that need to be found.
3. The method according to claim 2, characterized in that The path search algorithm is used to find the account to be detected that is associated with the abnormal email account, and a filter set is obtained, including: When the path of the breadth-first path algorithm is 1, find the account that has a direct email sending relationship with the abnormal email account; When the breadth-first path is greater than 1 and less than N, find an account that is indirectly related to the abnormal email account; A filter set is obtained according to the searched accounts to be detected that are associated with the abnormal email account and the filtering results between the accounts to be detected.
4. The method according to claim 2, characterized in that: The calculating the entity similarity between the initial abnormal email login account and the account to be detected in the filtering set by using a preset distance algorithm includes: The entity similarity between the initial abnormal email login account and the account to be detected in the filter set is calculated using the Wasserstein distance algorithm.
5. The method according to claim 4, characterized in that The calculating of the entity similarity between the initial abnormal email login account and the account to be detected in the filter set by using the Wasserstein distance algorithm specifically includes: Define the dynamic threshold T for the email abnormal account query filtering dynamic It changes with the number n of common paths between two nodes. The initial abnormal account node is recorded as q, the account node to be detected is recorded as g, the calculated weight is expressed as wi, the relevant attribute feature set of the initial email abnormal account is recorded as P1, the relevant attribute feature set of the account to be detected is recorded as P2, the account attributes and IP attributes corresponding to the P1 account are recorded as xi, and the corresponding account attributes and IP attributes corresponding to the P2 account are recorded as yi. The calculation method of the correlation similarity between the two accounts is: Where ∏(p1,p2) is the set of all possible joint distributions of P1 and P2, and inf represents the lower bound of the expected value of the set of all possible joint distributions.
6. The method according to claim 2, characterized in that The process of sorting the entities according to their similarity scores to obtain the abnormal email accounts to be found includes: Sorting the entity similarity scores using a relevant sorting algorithm, and comparing the sorting results with corresponding filtering thresholds; If the ranking result is greater than the corresponding filtering threshold, the query account at the preset ranking position is marked as a potential email abnormality account as an email abnormality account that needs to be found.
7. The method according to claim 1, characterized in that The step of searching for an abnormal account in the mail system network according to the initial abnormal mail login account and the abnormal mail login IP address includes: For the abnormal login IP address, a breadth-first search algorithm is used to find an account that has a direct login relationship with the IP address, and the searched account is used as the abnormal account that needs to be found.
8. A device for detecting abnormal email accounts, characterized in that: The device comprises: A graph building module, used to build a knowledge graph based on the STMP protocol log; A query module, used to determine the initial abnormal email login account and the abnormal email login IP address according to the knowledge graph; The query module is used to search for abnormal accounts in the mail system network according to the initial abnormal mail login account and the abnormal mail login IP address.
9. An electronic device, comprising: processor; as well as A memory arranged to store computer executable instructions, which when executed cause the processor to perform the method of any one of claims 1 to 7.
10. A computer-readable storage medium storing one or more programs, which, when executed by an electronic device including a plurality of application programs, causes the electronic device to execute any one of the methods of claims 1 to 7.
