Login result detection method and system

By matching the commands sent by the client with the preset command set, it solves the problem of login result judgment under unilateral traffic, achieves accurate login result judgment without server return results, and improves network security detection efficiency.

CN115114617BActive Publication Date: 2024-09-27QI AN XIN TECHNOLOGY GROUP INC +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110309625.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-23
Publication Date
2024-09-27
Estimated Expiration
2041-03-23

AI Technical Summary

Technical Problem

In the case of unilateral traffic, the command sent by the client does not return a result from the server, making it impossible to determine the login result.

Method used

By obtaining the first command sent by the client and matching it with the preset login command set, the program status is updated, and the second command is obtained when the program status is the login status, and the consistency between the first command and the second command is judged. If it is inconsistent, it will be matched with the login success command set to determine the login success.

Benefits of technology

In the absence of a result returned by the server, the login result can be accurately determined, which improves the efficiency of network probes in detecting weak passwords and brute force attacks, and enhances the login restoration capability of the email protocol.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115114617B
    Figure CN115114617B
Patent Text Reader

Abstract

The present invention discloses a login result detection method, comprising: obtaining a first command sent by a client to a server, matching the first command with a login command in a preset login command set, and judging whether to update a program state to a login state according to a matching result; when the program state is updated to a login state, obtaining a second command sent by the client to the server, and judging whether the first command is consistent with the second command; when the first command is inconsistent with the second command, matching the second command with a login success command in a preset login success command set; when the match is successful, judging that the login is successful, and updating the program state to a login success state. The embodiment of the present invention can accurately judge the login result in the case of unilateral traffic, even without a return result from the server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network security technology, and in particular to a login result detection method and system. Background Art

[0002] The existing application protocol login result judgment is based on the return result and return code of the login request command to judge whether the login is successful or failed. Taking the SMTP protocol as an example, when the client sends the command AUTH LOGIN to the server, if the server return code is 235, it means the login is successful, and if the server return code is 501, it means the login fails. Taking the Pop3 protocol as an example, when the client sends the login command USER or PASS to the server, if the server returns the result of -ERR, it means the login fails, and if the server returns the result of +OK, it means the login is successful.

[0003] However, this reliance on the server return result to judge the login result, when encountering a one-way traffic situation, such as only traffic from the requesting end, the login result cannot be judged due to the lack of the server return result. Summary of the invention

[0004] The purpose of the present invention is to provide a login result detection method, system, computer device and readable storage medium, which are used to solve the defect in the prior art that when encountering unilateral traffic, for example, when there is only traffic from the requesting end, the login result cannot be judged due to the lack of return results from the server.

[0005] According to one aspect of the present invention, a login result detection method is provided, the method comprising the following steps:

[0006] Obtaining a first command sent by a client to a server, wherein the first command is used by the client to send a connection request to the server;

[0007] Matching the first command with a login command in a preset login command set, and judging whether to update the program state to a login state according to the matching result, wherein the program state is used to represent the login result of the client logging into the server, including a login state and a login success state;

[0008] When the program state is updated to the logging state, obtaining a second command sent by the client to the server, wherein the second command is used by the client to send a connection request or a data request to the server;

[0009] Determining whether the first command is consistent with the second command;

[0010] When the first command is inconsistent with the second command, matching the second command with a successful login command in a preset successful login command set;

[0011] When the match is successful, it is determined that the login is successful, and the program state is updated to the login success state.

[0012] Optionally, the program state further includes a non-logged-in state, and before obtaining the first command sent by the client to the server, the step includes:

[0013] Initialize the program state to the unlogged-in state.

[0014] Optionally, judging whether to update the program state to the logged-in state according to the matching result includes:

[0015] When the match is successful, the program state is updated to the logged in state;

[0016] When the match fails, the program state is kept unchanged.

[0017] Optionally, when the program state is updated to the logged-in state, obtaining a second command sent by the client to the server includes:

[0018] When the program status is updated to the logging-in status, detecting whether the client sends the user name and password to the server; and

[0019] When it is detected that the client sends the user name and the password to the server, the second command is obtained.

[0020] Optionally, the login result detection method further includes:

[0021] When the program status is updated to the logged-in status and it is not detected that the client sends the user name and the password to the server, the second command is not obtained.

[0022] Optionally, the program status further includes a login failure status, and the login result detection method further includes:

[0023] When the first command is consistent with the second command, updating the program status to the login failure status; and / or,

[0024] Before acquiring the second command, the method further includes:

[0025] When the third command is received, the program state is updated to the login failure state, and the third command is used by the server to instruct the client to exit the connection.

[0026] Optionally, the login result detection method further includes:

[0027] When the matching fails, it is determined that the login fails, and the program state is updated to the login failure state.

[0028] In order to achieve the above object, the present invention also provides a login result detection system, which specifically includes the following components:

[0029] A first acquisition module, used for acquiring a first command sent by a client to a server, wherein the first command is used by the client to send a connection request to the server;

[0030] A first judgment module, used for matching the first command with a login command in a preset login command set, and judging whether to update the program state to a login state according to the matching result, wherein the program state is used to represent the login result of the client logging into the server, including a login state and a login success state;

[0031] A second acquisition module, configured to acquire, when the program state is updated to the logging state, a second command sent by the client to the server, wherein the second command is used by the client to send a connection request or a data request to the server;

[0032] A second judgment module, used to judge whether the first command is consistent with the second command;

[0033] a matching module, configured to match the second command with a successful login command in a preset successful login command set when the first command is inconsistent with the second command;

[0034] The update module is used to determine that the login is successful when the match is successful, and update the program state to the login success state.

[0035] In order to achieve the above-mentioned purpose, the present invention also provides a computer device, which specifically includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the login result detection method introduced above when executing the computer program.

[0036] In order to achieve the above-mentioned object, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the login result detection method introduced above are implemented.

[0037] The login result detection method provided by the present invention obtains the command sent by the client to the server, and combines the command in the command set corresponding to the program state and the command context, so that in the case of one-way traffic, even if there is no return result from the server, the login result can be accurately judged. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0039] Figure 1 A schematic diagram of an optional application environment of the login result detection method provided in an embodiment of the present invention;

[0040] Figure 2 A schematic diagram of an optional step flow chart of a login result detection method provided in an embodiment of the present invention;

[0041] Figure 3 The embodiment of the present invention provides Figure 2 An optional step refinement flow chart of step S300;

[0042] Figure 4 A schematic diagram of an optional program module of the login result detection system provided in an embodiment of the present invention;

[0043] Figure 5 A schematic diagram of an optional hardware architecture of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0044] Exemplary inventive embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary inventive embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of systems and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0045] The terms used in the present invention are only for the purpose of describing specific embodiments of the invention and are not intended to limit the present invention. The singular forms "a", "the" and "the" used in the present invention and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0046] It should be understood that although the terms first, second, third, etc. may be used in the present invention to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0047] In the description of the present invention, it should be understood that the numerical labels before the steps do not indicate the order in which the steps are performed, but are only used to facilitate the description of the present invention and to distinguish each step, and therefore cannot be understood as limiting the present invention. Based on the inventive embodiments of the present invention, all other inventive embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0048] The embodiments of the present invention are described below with reference to the accompanying drawings.

[0049] See also Figure 1 , shows an optional application environment diagram of the login result detection method provided by an embodiment of the present invention, where a user uses a client 2 to send a command to a server 4 through a network 8 to achieve communication with the server 4. The computer device 6 obtains the command sent by the client 2 to the server 6, and determines whether the login result is successful based on the obtained command context and the set login status mechanism.

[0050] Embodiment 1

[0051] See also Figure 2 , shows a schematic diagram of the steps of a login result detection method provided by an embodiment of the present invention. It can be understood that the flowchart in the embodiment of the present invention is not used to limit the order of executing the steps. Figure 1 The computer device 6 is described as an exemplary execution subject, and the computer device may include mobile terminals such as smart phones, tablet personal computers, laptop computers, and fixed terminals such as desktop computers. The details are as follows:

[0052] Step S100, obtaining a first command sent by a client to a server, wherein the first command is used by the client to send a connection request to the server.

[0053] For example, taking Simple Mail Transfer Protocol (SMTP) as an example, in the case of one-way traffic, first obtain the first command sent by the client to the server, the first command is used by the client to send a connection request to the server. The one-way traffic refers to only the client's request traffic, because only the request traffic contains a login request command.

[0054] In an exemplary embodiment, the step S100 may include:

[0055] Initialize the program state to the unlogged-in state.

[0056] Exemplarily, before obtaining the first command sent by the client to the server, the program state is initialized to a non-logged-in state.

[0057] Step S200, matches the first command with the login command in the preset login command set, and determines whether to update the program status to the login status based on the matching result, wherein the program status is used to characterize the login result of the client logging into the server, including the login status and the login success status.

[0058] Exemplarily, taking SMTP as an example, assuming that the command set corresponding to the failure to log in is {EHLO}, the preset login command set during login is {AUTH LOGIN}, the preset login success command set corresponding to the successful login is {MAILFROM, RCPT TO, DATA}, and the preset login failure command set corresponding to the failed login is {QUIT}, match the first command with the login command in the preset login command set, and determine whether to update the program status to the logging status based on the matching result.

[0059] In the third version of the Post Office Protocol (POP3), it is assumed that the non-logged-in command set corresponding to the non-logged-in is {CAPA}, the preset logged-in command set during login is {USER, PASS}, the preset successful login command set corresponding to the successful login is {RETR, LIST, UIDL, STAT}, and the preset failed login command set corresponding to the failed login is {QUIT}. The first command is matched with the logged-in command in the preset logged-in command set, and whether to update the program status to the logged-in status is determined according to the matching result.

[0060] In the Internet Message Access Protocol (IMAP), it is assumed that the preset login command set in the login is {LOGIN}, and the login state is considered to be not logged in before the login command in the preset login command set is obtained. The preset login success command set corresponding to the successful login is {UID fetch1452420187(UID RFC822.SIZE BODY[])}, and the preset login failure command set corresponding to the failed login is {QUIT}. The first command is matched with the login command in the preset login command set, and it is determined whether to update the program state to the logged in state according to the matching result.

[0061] In the remote terminal protocol TELNET, it is assumed that the preset login command set in the login is {LOGIN, USERNAME, PASSWARD}, and the state is considered to be not logged in before the login command in the preset login command set is obtained. The preset login failure command set corresponding to the login failure is {EXIT}, and the first command is matched with the commands in the preset login command set, and it is determined whether to update the program state to the login state based on the matching result.

[0062] In the File Transfer Protocol (FTP), it is assumed that the preset login command set during login is {USER, PASS}, and the state is considered to be not logged in before the login command in the preset login command set is obtained. The preset login failure command set corresponding to the login failure is {QUIT}, and the first command is matched with the login command in the preset login command set, and it is determined whether to update the program state to the login state based on the matching result.

[0063] In an exemplary embodiment, step S200 may include:

[0064] When the match is successful, the program state is updated to the logged in state;

[0065] When the match fails, the program state is kept unchanged.

[0066] Exemplarily, taking SMTP as an example, assuming that the first command obtained at this time is "AUTH LOGIN", the first command belongs to the login command in the preset login command set, the program status is updated to the login status, and when the program status is updated to the login status, the second command sent by the client to the server is obtained.

[0067] Exemplarily, taking SMTP as an example, assuming that the first command obtained at this time is "EHLO", "EHLO" is matched with the login command in the preset login command set {AUTH LOGIN}, and when the match is successful, the program state is updated to the login state. When the first command does not belong to the preset login command set, it is determined that the match fails, and the program state remains unchanged.

[0068] Step S300, when the program state is updated to the logged-in state, obtaining a second command sent by the client to the server, wherein the second command is used by the client to send a connection request or a data request to the server.

[0069] In an exemplary embodiment, Figure 3 As shown, step S300 may include:

[0070] Step S301, when the program state is updated to the logging state, detecting whether the client sends the user name and password to the server;

[0071] Step S302: when it is detected that the client sends the user name and the password to the server, obtain the second command.

[0072] Exemplarily, when the program status is updated to the logging-in status, the username entered by the user is recorded as "username" and the password is recorded as "password", and when the client sends the username and password entered by the user to the server, if the second command sent by the client to the server is "AUTH LOGIN", then the second command "AUTH LOGIN" sent by the client to the server is obtained.

[0073] Step S400, determining whether the first command is consistent with the second command.

[0074] Specifically, the first command is compared with the second command to determine whether the first command is consistent with the second command, so as to determine whether to update the program state.

[0075] Step S500: When the first command is inconsistent with the second command, the second command is matched with a successful login command in a preset successful login command set.

[0076] Exemplarily, assuming that the first command obtained is "AUTH LOGIN" and when the program status is updated to the logging in status, the second command obtained is assumed to be "MAIL FROM", the second command "MAIL FROM" is matched with the successful login command in the preset successful login command set, and the program status is updated according to the matching result to determine the target login result.

[0077] Step S600, when the match is successful, determine that the login is successful, and update the program status to the login success status.

[0078] Exemplarily, when the second command is "MAIL FROM", the second command "MAIL FROM" is matched with the commands in the preset successful login command set {MAIL FROM, RCPT TO, DATA}, and the second command "MAIL FROM" is matched to belong to the preset successful login command set {MAIL FROM, RCPT TO, DATA}, and the program status is updated to a successful login status. It should be noted that the present invention also supports multiple protocols such as FTP, SMTP, TELNET, POP3, IMAP and REDIS.

[0079] In an exemplary embodiment, the login result detection method further includes:

[0080] When the program status is updated to the logged-in status and it is not detected that the client sends the user name and the password to the server, the second command is not obtained.

[0081] Specifically, when the program status is updated to the logged-in status, it is detected whether the client sends the user name and the password to the server. When it is not detected that the client sends the user name and the password to the server, the second command is not obtained.

[0082] In an exemplary embodiment, the login result detection method further includes:

[0083] When the first command is consistent with the second command, updating the program status to the login failure status; and / or,

[0084] Before acquiring the second command, the method further includes:

[0085] When the third command is received, the program state is updated to the login failure state, and the third command is used by the server to instruct the client to exit the connection.

[0086] Exemplarily, when the second command is "AUTH LOGIN", it is determined that the login has failed, and the program state is updated to a login failure state.

[0087] Exemplarily, before obtaining the second command as "AUTH LOGIN", when a third command is received, assuming it is "QUIT", the program state is updated to the login failure state.

[0088] In an exemplary embodiment, the login result detection method further includes:

[0089] When the matching fails, it is determined that the login fails, and the program state is updated to the login failure state.

[0090] Exemplarily, when the second command is "QUIT", since the same command as the second command is not matched in the successful login command set {MAIL FROM, RCPT TO, DATA}, the program status is updated to a login failure status.

[0091] The login result detection method provided by the present invention obtains the command sent by the client to the server, and combines the command in the command set corresponding to the program state and the command context, so that in the case of one-way traffic, even if there is no return result from the server, the login result can be accurately judged.

[0092] In the field of network probes, the login results obtained by the login result detection method provided by the present invention can provide an accurate data source for the discovery of brute force cracking, and can be used to determine whether there is a brute force attack behavior. For example: when it is detected that the number of failed login results in the client log exceeds the preset value, it is regarded as a brute force attack behavior. In addition, the login results obtained by the login result detection method provided by the present invention can also be used to determine whether the user's username and password are weak passwords. For example: when the username and password corresponding to the login result judged as a successful login in the client log can be obtained by brute force, it is regarded as a weak password. Therefore, the login result detection method provided by the present invention greatly improves the efficiency of network probes in discovering weak passwords and brute force attacks, and greatly enhances the login restoration capability of the mail protocol.

[0093] Embodiment 2

[0094] See also Figure 4, shows a program module schematic diagram of a login result detection system 700 in an embodiment of the present invention. The login result detection system 700 can be applied to a computer device, and the computer device can be a mobile phone, a tablet personal computer, a laptop computer, or other devices with data transmission functions. In an embodiment of the present invention, the login result detection system 700 may include or be divided into one or more program modules, one or more program modules are stored in a readable storage medium, and are executed by one or more processors to complete the embodiment of the present invention and implement the above-mentioned login result detection system 700. The program module referred to in the embodiment of the present invention refers to a series of computer program instruction segments that can complete specific functions, which is more suitable for describing the execution process of the login result detection system 700 in a readable storage medium than the program itself. In an exemplary embodiment, the login result detection system 700 includes a first acquisition module 701, a first judgment module 702, a second acquisition module 703, a second judgment module 704, a matching module 705, and an update module 706. The following description will specifically introduce the functions of each program module in the embodiment of the present invention:

[0095] The first acquisition module 701 is used to acquire a first command sent by a client to a server, where the first command is used by the client to send a connection request to the server.

[0096] For example, taking Simple Mail Transfer Protocol (SMTP) as an example, in the case of one-way traffic, the first acquisition module 701 first acquires a first command sent by the client to the server, and the first command is used by the client to send a connection request to the server. The one-way traffic refers to only the client's request traffic, because only the request traffic contains a login request command.

[0097] In an exemplary embodiment, the first acquisition module 701 specifically includes:

[0098] Initialize the program state to the unlogged-in state.

[0099] Exemplarily, the first acquisition module 701 initializes the program state to a non-logged-in state before acquiring the first command sent by the client to the server.

[0100] The first judgment module 702 is used to match the first command with the login command in the preset login command set, and determine whether to update the program status to the login status based on the matching result, wherein the program status is used to represent the login result of the client logging into the server, including the login status and the login success status.

[0101] Exemplarily, taking SMTP as an example, assuming that the command set corresponding to the failure to log in is {EHLO}, the preset login command set during login is {AUTH LOGIN}, the preset login success command set corresponding to the successful login is {MAILFROM, RCPT TO, DATA}, and the preset login failure command set corresponding to the failed login is {QUIT}, match the first command with the login command in the preset login command set, and determine whether to update the program status to the logging status based on the matching result.

[0102] In the third version of the Post Office Protocol (POP3), it is assumed that the non-logged-in command set corresponding to the non-logged-in is {CAPA}, the preset logged-in command set during login is {USER, PASS}, the preset successful login command set corresponding to the successful login is {RETR, LIST, UIDL, STAT}, and the preset failed login command set corresponding to the failed login is {QUIT}. The first command is matched with the logged-in command in the preset logged-in command set, and whether to update the program status to the logged-in status is determined according to the matching result.

[0103] In the Internet Message Access Protocol (IMAP), it is assumed that the preset login command set in the login is {LOGIN}, and the login state is considered to be not logged in before the login command in the preset login command set is obtained. The preset login success command set corresponding to the successful login is {UID fetch1452420187(UID RFC822.SIZE BODY[])}, and the preset login failure command set corresponding to the failed login is {QUIT}. The first command is matched with the login command in the preset login command set, and it is determined whether to update the program state to the logged in state according to the matching result.

[0104] In the remote terminal protocol TELNET, it is assumed that the preset login command set in the login is {LOGIN, USERNAME, PASSWARD}, and the state is considered to be not logged in before the login command in the preset login command set is obtained. The preset login failure command set corresponding to the login failure is {EXIT}, and the first command is matched with the commands in the preset login command set, and it is determined whether to update the program state to the login state based on the matching result.

[0105] In the File Transfer Protocol (FTP), it is assumed that the preset login command set during login is {USER, PASS}, and the state is considered to be not logged in before the login command in the preset login command set is obtained. The preset login failure command set corresponding to the login failure is {QUIT}, and the first command is matched with the login command in the preset login command set, and it is determined whether to update the program state to the login state based on the matching result.

[0106] In an exemplary embodiment, the first determining module 702 is specifically configured to:

[0107] When the match is successful, the program state is updated to the logged in state;

[0108] When the match fails, the program state is kept unchanged.

[0109] Exemplarily, taking SMTP as an example, assuming that the first command obtained at this time is "AUTH LOGIN", the first command belongs to the login command in the preset login command set, the program status is updated to the login status, and when the program status is updated to the login status, the second command sent by the client to the server is obtained.

[0110] Exemplarily, taking SMTP as an example, assuming that the first command obtained at this time is "EHLO", "EHLO" is matched with the login command in the preset login command set {AUTH LOGIN}, and when the match is successful, the program state is updated to the login state. When the first command does not belong to the preset login command set, it is determined that the match fails, and the program state remains unchanged.

[0111] The second acquisition module 703 is used to acquire a second command sent by the client to the server when the program state is updated to the logged-in state, wherein the second command is used by the client to send a connection request or a data request to the server.

[0112] In an exemplary embodiment, the second acquisition module 703 is further configured to:

[0113] When the program state is updated to the logging-in state, detecting whether the client sends the user name and password to the server;

[0114] When it is detected that the client sends the user name and the password to the server, the second command is obtained.

[0115] Exemplarily, when the program status is updated to the logging-in status, the username entered by the user is recorded as "username" and the password is recorded as "password", and when the client sends the username and password entered by the user to the server, if the second command sent by the client to the server is "AUTH LOGIN", then the second command "AUTH LOGIN" sent by the client to the server is obtained.

[0116] The second judgment module 704 is used to judge whether the first command is consistent with the second command.

[0117] Specifically, the second determination module 704 compares the first command with the second command to determine whether the first command is consistent with the second command, so as to determine whether to update the program state.

[0118] The matching module 705 is used to match the second command with a successful login command in a preset successful login command set when the first command is inconsistent with the second command.

[0119] Exemplarily, assuming that the first command obtained is "AUTH LOGIN" and when the program status is updated to the logging in status, the second command obtained is assumed to be "MAIL FROM", the second command "MAIL FROM" is matched with the successful login command in the preset successful login command set, and the program status is updated according to the matching result to determine the target login result.

[0120] The updating module 706 is used to determine that the login is successful when the match is successful, and update the program status to the login success status.

[0121] Exemplarily, when the second command is "MAIL FROM", the second command "MAIL FROM" is matched with the commands in the preset successful login command set {MAIL FROM, RCPT TO, DATA}, and the second command "MAIL FROM" is matched to belong to the preset successful login command set {MAIL FROM, RCPT TO, DATA}, and the program status is updated to a successful login status. It should be noted that the present invention also supports multiple protocols such as FTP, SMTP, TELNET, POP3, IMAP and REDIS.

[0122] In an exemplary embodiment, the login result detection system 700 further includes:

[0123] When the program status is updated to the logged-in status and it is not detected that the client sends the user name and the password to the server, the second command is not obtained.

[0124] Specifically, when the program status is updated to the logged-in status, it is detected whether the client sends the user name and the password to the server. When it is not detected that the client sends the user name and the password to the server, the second command is not obtained.

[0125] In an exemplary embodiment, the login result detection system 700 further includes:

[0126] When the first command is consistent with the second command, updating the program status to the login failure status; and / or,

[0127] Before acquiring the second command, the method further includes:

[0128] When the third command is received, the program state is updated to the login failure state, and the third command is used by the server to instruct the client to exit the connection.

[0129] Exemplarily, when the second command is "AUTH LOGIN", it is determined that the login has failed, and the program state is updated to a login failure state.

[0130] Exemplarily, before obtaining the second command as "AUTH LOGIN", when a third command is received, assuming it is "QUIT", the program state is updated to the login failure state.

[0131] In an exemplary embodiment, the login result detection system 700 further includes:

[0132] When the matching fails, it is determined that the login fails, and the program state is updated to the login failure state.

[0133] Exemplarily, when the second command is "QUIT", since the same command as the second command is not matched in the successful login command set {MAIL FROM, RCPT TO, DATA}, the program status is updated to a login failure status.

[0134] The login result detection system 700 provided by the present invention obtains the commands sent by the client to the server, and combines the commands in the command set corresponding to the program state and the command context, so that in the case of one-way traffic, even if there is no return result from the server, it can achieve accurate judgment of the login result.

[0135] In the field of network probes, the login results obtained by the login result detection system 700 provided by the present invention can provide an accurate data source for the discovery of brute force cracking, and can be used to determine whether there is a brute force attack behavior. For example: when it is detected that the number of failed login results in the client log exceeds the preset value, it is regarded as a brute force attack behavior. In addition, the login results obtained by the login result detection method provided by the present invention can also be used to determine whether the user's username and password are weak passwords. For example: when the username and password corresponding to the login result judged as a successful login in the client log can be obtained by brute force, it is regarded as a weak password. Therefore, the login result detection method provided by the present invention greatly improves the efficiency of network probes in discovering weak passwords and brute force attacks, and greatly enhances the login restoration capability of the mail protocol.

[0136] Embodiment 3

[0137] See also Figure 5 , an embodiment of the present invention also provides a hardware architecture diagram of a computer device 800. Such as a smart phone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server or cabinet server (including an independent server, or a server cluster composed of multiple servers) that can execute programs. In an embodiment of the present invention, the computer device 800 is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions. As shown in the figure, the computer device 800 at least includes, but is not limited to, a memory 801, a processor 802, and a network interface 803 that can communicate with each other through a device bus. Among them:

[0138] In the embodiment of the present invention, the memory 801 includes at least one type of computer-readable storage medium, and the readable storage medium includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some inventive embodiments, the memory 801 may be an internal storage unit of the computer device 800, such as a hard disk or a memory of the computer device 800. In other inventive embodiments, the memory 801 may also be an external storage device of the computer device 800, such as a plug-in hard disk equipped on the computer device 800, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 801 may also include both the internal storage unit of the computer device 800 and its external storage device. In the embodiment of the present invention, the memory 801 is generally used to store operating devices and various application software installed in the computer device 800, such as the program code of the login result detection system 700. In addition, the memory 801 can also be used to temporarily store various data that have been output or will be output.

[0139] The processor 802 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other voice processing chips in some embodiments of the invention. The processor 802 is generally used to control the overall operation of the computer device 800. In the embodiment of the present invention, the processor 802 is used to run the program code stored in the memory 801 or process data, such as running the program code of the login result detection system 700, so as to implement the login result detection method in each of the above-mentioned embodiments of the invention.

[0140] The network interface 803 may include a wireless network interface or a wired network interface, and the network interface 803 is generally used to establish a communication connection between the computer device 800 and other electronic devices. For example, the network interface 803 is used to connect the computer device 800 to an external terminal through a network, and to establish a data transmission channel and a communication connection between the computer device 800 and the external terminal. The network may be a wireless or wired network such as an intranet, the Internet, a global system of mobile communication (GSM), a wideband code division multiple access (WCDMA), a 4G network, a 5G network, Bluetooth, or Wi-Fi.

[0141] It should be pointed out that Figure 5 Computer device 800 is shown only with components 801 - 803 , but it should be understood that implementation of all of the components shown is not a requirement, and more or fewer components may alternatively be implemented.

[0142] In an embodiment of the present invention, the login result detection system 700 stored in the memory 801 can also be divided into one or more program modules, and the one or more program modules are stored in the memory 801 and executed by one or more processors (processor 802 in the embodiment of the present invention) to complete the login result detection method of the present invention.

[0143] Embodiment 4

[0144] The embodiment of the present invention also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a disk, an optical disk, a server, an App application store, etc., on which a computer program is stored, and the program implements the corresponding function when executed by the processor. The computer-readable storage medium of the embodiment of the present invention is used to store the login result detection system 700, so as to implement the login result detection method of the present invention when executed by the processor.

[0145] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments of the invention.

[0146] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above invention embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.

[0147] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A login result detection method, characterized in that: The method comprises: Obtaining a first command sent by a client to a server, wherein the first command is used by the client to send a connection request to the server; Matching the first command with a login command in a preset login command set, and judging whether to update the program state to a login state according to the matching result, wherein the program state is used to represent the login result of the client logging into the server, including a login state and a login success state; When the program state is updated to the logging state, obtaining a second command sent by the client to the server, wherein the second command is used by the client to send a connection request or a data request to the server; Determining whether the first command is consistent with the second command; When the first command is inconsistent with the second command, matching the second command with a successful login command in a preset successful login command set; When the match is successful, it is determined that the login is successful, and the program state is updated to the login success state.

2. The login result detection method according to claim 1, characterized in that: The program state also includes a non-logged-in state. Before obtaining the first command sent by the client to the server, the process includes: Initialize the program state to the unlogged-in state.

3. The login result detection method according to claim 1, characterized in that: The step of determining whether to update the program state to the logged-in state according to the matching result includes: When the match is successful, the program state is updated to the logged in state; When the match fails, the program state is kept unchanged.

4. The login result detection method according to claim 1, characterized in that: When the program state is updated to the logged-in state, obtaining a second command sent by the client to the server includes: When the program status is updated to the logging-in status, detecting whether the client sends the user name and password to the server; and When it is detected that the client sends the user name and the password to the server, the second command is obtained.

5. The login result detection method according to claim 4, characterized in that: The login result detection method further includes: When the program status is updated to the logged-in status and it is not detected that the client sends the user name and the password to the server, the second command is not obtained.

6. The login result detection method according to claim 1, characterized in that: The program status also includes a login failure status, and the login result detection method also includes: When the first command is consistent with the second command, updating the program status to the login failure status; and / or, Before acquiring the second command, the method further includes: When the third command is received, the program state is updated to the login failure state, and the third command is used by the server to instruct the client to exit the connection.

7. The login result detection method according to claim 6, characterized in that: The login result detection method further includes: When the matching fails, it is determined that the login fails, and the program state is updated to the login failure state.

8. A login result detection system, characterized in that: The system comprises: An acquisition module, used for acquiring a first command sent by a client to a server, wherein the first command is used by the client to send a connection request to the server; A first judgment module, used for matching the first command with a login command in a preset login command set, and judging whether to update the program state to a login state according to the matching result, wherein the program state is used to represent the login result of the client logging into the server, including a login state and a login success state; A second acquisition module, configured to acquire, when the program state is updated to the logging state, a second command sent by the client to the server, wherein the second command is used by the client to send a connection request or a data request to the server; A second judgment module, used to judge whether the first command is consistent with the second command; a matching module, configured to match the second command with a successful login command in a preset successful login command set when the first command is inconsistent with the second command; The update module is used to determine that the login is successful when the match is successful, and update the program state to the login success state.

9. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the login result detection method of any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the login result detection method according to any one of claims 1 to 7 are implemented.