Security protection method and device applied to network equipment

By using dynamic token policies and other technologies in network devices to process interactive protocol messages, generate dynamic tokens, and enhance user authentication, it solves the security threat that network devices are exploited by illegal programs in remote management services, and achieves efficient security protection .

CN118944976APending Publication Date: 2024-11-12SHENZHEN SDMC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411305142.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

When existing network devices provide remote management services, they are easily exploited by network crawler programs and robot programs, resulting in illegal packet construction and security threats, stealing user privacy, and attacking network security protection is difficult to effectively defend.

Method used

Through dynamic token policies, timestamp policies, logical control policies and entry point policies, interactive protocol messages are processed, dynamic tokens are generated, and added to HTTP messages to enhance user authentication and prevent illegal messages from passing the server verification.

Benefits of technology

It greatly improves the security of network equipment, can effectively prevent the destructive behavior of crawler software and robot software, protects users' network security, and achieves low-cost, fast and efficient security protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118944976A_ABST
    Figure CN118944976A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a security protection method and device applied to network equipment, equipment and a computer readable storage medium. The method comprises the following steps: acquiring an interaction protocol message; the interaction protocol message comprises an HTTP (Hyper Text Transport Protocol) message and request time of the message; and processing the interaction protocol message through a dynamic token strategy, a timestamp strategy, a logic control strategy and / or an entry point strategy to complete security protection of the network equipment. In this way, the security of the equipment can be greatly improved, crawler software or robot software is prevented from implementing destruction behaviors, and the network security of a user is protected. In terms of technical implementation, deployment and implementation can be achieved only through lightweight modification, the project period is greatly shortened, and the operation and maintenance cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of security protection, and in particular, to a security protection method, apparatus, device, and computer-readable storage medium applied to a network device. Background Art

[0002] With the increasing development of science and technology, with the deep integration of Internet technology and artificial intelligence technology, we have gradually entered the network + intelligence era, which is often called the intelligent network era or AIoT (Artificial Intelligence of Things) era, allowing people to enjoy more interconnected things, high-quality products and services, making life more convenient, comfortable and safe.

[0003] For network devices, in order to provide better services, their network entities must be more open in the network environment. For example, in order to provide services such as remote management, network devices such as home gateways and wireless routers must open the firewall's ports facing the Internet to facilitate users' remote access, use and operation.

[0004] Most of the current network device management (including remote management) still uses Cookie or Session ID to identify the user, such as Figure 1 As shown in the figure, once the user successfully logs in with an account, obtains the server's trust, and stores the cookie or session ID, the value of the cookie or session ID used for user identification can be used repeatedly throughout the subsequent interaction process until the user logs out. During the login period, since the cookie or session ID is always valid, it can give abnormal users an opportunity to use web crawlers or robot programs to use the cookie or session ID stolen from the browser cache to simulate the user's operations, automatically construct a large number of various network messages, deceive the server's verification, and perform some improper operations.

[0005] Therefore, how to build a low-cost, fast and efficient security protection method that can prevent web crawlers and robot programs from constructing illegal messages, breaking through the security mechanisms of other network devices such as home gateways or wireless routers, stealing user privacy, and attacking the network is an urgent problem that needs to be solved. Summary of the invention

[0006] According to an embodiment of the present application, a security protection solution for network equipment is provided, which can greatly improve the security of the equipment and can be applicable to different network terminal devices and different network topology environments.

[0007] In a first aspect of the present application, a security protection method for a network device is provided. The method comprises:

[0008] Obtaining an interactive protocol message; the interactive protocol message includes an HTTP message and a request time of the message;

[0009] The interactive protocol message is processed through a dynamic token strategy, a timestamp strategy, a logic control strategy and / or an entry point strategy to complete security protection of the network device;

[0010] The dynamic token strategy includes:

[0011] Use the current client time and the X-apiId fed back when requesting the current page as the key; use the Session Id or Cookie as the seed;

[0012] Encode the key and seed to generate a dynamic token;

[0013] The dynamic token is added to the HTTP message to complete the protection of the current network device.

[0014] Furthermore, the method of using the current client time and the X-apiId fed back when requesting the current page as the key includes:

[0015] Insert the string representing the current client time into the X-apiId fed back when requesting the current page to construct the key.

[0016] Further, the using Session Id as a seed includes:

[0017] Take the even-digit value of Session Id;

[0018] A seed is constructed based on the even-numbered digits of the Session Id.

[0019] Furthermore, encoding the key and the seed to generate a dynamic token includes:

[0020] Encode the key and seed using MD5 or Base64;

[0021] Based on the preset ratio, the encoded key and seed are merged through zipper joining to generate a dynamic token.

[0022] Furthermore, the timestamp strategy includes:

[0023] Obtain the difference between two adjacent request timestamps in the interactive protocol message;

[0024] If the difference is less than a preset threshold, the preset anti-intrusion protection mechanism is entered.

[0025] Furthermore, the logic control strategy includes a page logic strategy and a background logic strategy;

[0026] Among them, the page logic strategy includes:

[0027] The user submission request in the interactive protocol message is logically judged according to the preset business logic. If it does not conform to the logic, the preset anti-intrusion protection mechanism is entered.

[0028] Further, the entry point strategy includes monitoring operation traces and dynamically building submission links;

[0029] Among them, monitoring operation traces include:

[0030] Monitor mouse movement traces. If no mouse movement event is currently triggered, enter the preset anti-intrusion protection mechanism.

[0031] In a second aspect of the present application, a security protection device for network equipment is provided. The device comprises:

[0032] An acquisition module, used for acquiring an interactive protocol message; the interactive protocol message includes an HTTP message and a request time of the message;

[0033] A protection module, used to process the interactive protocol message through a dynamic token strategy, a timestamp strategy, a logic control strategy and / or an entry point strategy to complete security protection of the network device;

[0034] The dynamic token strategy includes:

[0035] Use the current client time and the X-apiId fed back when requesting the current page as the key; use the Session Id or Cookie as the seed;

[0036] Encode the key and seed to generate a dynamic token;

[0037] The dynamic token is added to the HTTP message to complete the protection of the current network device.

[0038] In a third aspect of the present application, an electronic device is provided, which includes a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the program, the method described above is implemented.

[0039] In a fourth aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method according to the first aspect of the present application is implemented.

[0040] The security protection method for network devices provided in the embodiment of the present application obtains interactive protocol messages; the interactive protocol messages include HTTP messages and message request time; the interactive protocol messages are processed through dynamic token strategy, timestamp strategy, logic control strategy and / or entry point strategy to complete the security protection of network devices; wherein the dynamic token strategy includes: using the current client time and the X-apiId fed back when requesting the current page as a key; using Session Id or Cookie as a seed; encoding the key and seed to generate a dynamic token; adding the dynamic token to the HTTP message to complete the protection of the current network device, which can greatly improve the security of the device and can be applicable to different network terminal devices and different network topology environments.

[0041] It should be understood that the contents described in the Summary of the Invention are not intended to limit the key or important features of the embodiments of the present application, nor are they intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The above and other features, advantages and aspects of the embodiments of the present application will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0043] Figure 1 Manage interaction flow chart for existing pages.

[0044] Figure 2 is a flow chart of a security protection method applied to a network device according to an embodiment of the present application;

[0045] Figure 3 A schematic diagram of generating a key code according to an embodiment of the present application;

[0046] Figure 4 is a schematic diagram of MD5 encoding according to an embodiment of the present application;

[0047] Figure 5 A schematic diagram of generating an x-token code according to an embodiment of the present application;

[0048] Figure 6 is a block diagram of a security protection device applied to a network device according to an embodiment of the present application;

[0049] Figure 7 It is a schematic diagram of the structure of a terminal device or a server suitable for implementing the embodiments of the present application. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0051] In addition, the term "and / or" in this article is only a description of the association relationship between the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0052] Figure 2 A flow chart of a security protection method applied to a network device according to an embodiment of the present disclosure is shown. The method comprises:

[0053] S210: Obtain an interactive protocol message.

[0054] In some embodiments, the interactive protocol message may be obtained wirelessly or wired; the interactive protocol message includes an http message and / or message request time and other related information.

[0055] S210, processing the interactive protocol message through a dynamic token strategy, a timestamp strategy, a logic control strategy and / or an entry point strategy to complete security protection of the network device.

[0056] In some embodiments, the existing general message exchange protocol (refer to Figure 1 ) vulnerability, through the dynamic token strategy, in the HTTP message, the private HTTP attribute - dynamic token is added to enhance user authentication.

[0057] It should be noted that the definition of the added attribute complies with the HTTP protocol standard format and has a low technical implementation threshold.

[0058] The following is an example message using a dynamic token in the HTTP header:

[0059] POST / ubus / session.access HTTP / 1.1

[0060] Host:192.168.1.1

[0061] Connection:keep-alive

[0062] Content-Length:258

[0063] Accept:application / json,text / javascript,* / *;q=0.01

[0064] X-token:3250927470260206b1360343e5e9a70168165b13f388af

[0065] X-Requested-With:XMLHttpRequest

[0066] X-apiId:access

[0067] User-Agent:Mozilla / 5.0(Windows NT 10.0;Win64;x64)AppleWebKit / 537.36(KHTML,like Gecko)Chrome / 126.0.0.0Safari / 537.36

[0068] Content-Type:application / json

[0069] Origin:http: / / 192.168.1.1

[0070] Referer:http: / / 192.168.1.1 /

[0071] Accept-Encoding:gzip,deflate

[0072] Accept-Language:zh-CN,zh;q=0.9

[0073] {"jsonrpc":"2.0","id":42,"method":"call","params":["55d46feded1204125ec8a2963fb7900e0586b9b756d0e230af661d59aa3101f5ceb01b9e3487732b47c8c08ce975f6eefdd345774dcc45c5852a1fd40656984a","session","access",{"scope":"ubus","object":"session","function":"access"}]}

[0074] HTTP / 1.1 200OK

[0075] Connection:close

[0076] Transfer-Encoding: chunked

[0077] Content-Type:application / json

[0078] {"jsonrpc":"2.0","id":42,"result":[0,{"access":true}]}

[0079] WEB servers are usually C / S architectures, that is, the user browser is the client, and the network device's WebServer is the server. When the page interacts with the WebServer, when the page initiates an action request (query or modification, etc.), it is necessary to first build a dynamic token to be used as a credential for WebServer verification. Since the dynamic token (X-token) changes every time. Therefore, even if the crawler software or robot software obtains the X-token, builds a new HTTP message, and sends it to the WEB server, it cannot pass the verification of the WEB server. The WEB server will treat the illegal message as an exception to avoid tampered messages from attacking and destroying actions.

[0080] Specifically, a dynamic token can be constructed in the following way.

[0081] The current client time and the X-apiId fed back when requesting the current page can be used as the key. That is, insert the time string (year, month, day, hour, and minute) into X-apiId (all). For example, insert 202402191615 into dhcpPoolSet, using 1:1 insertion, and get: 2d0h2c4p0P2o1o9l1S6e1t5 (key). Among them, X-apiId data can be obtained through the WEB server (automatically obtained when the user requests the page).

[0082] Use Session ID or Cookie as the seed. Take Session ID as an example, let Session ID be: db21353a79dc59de95288e0e9a871595084c9af4c8bd8f724a5684a567dfc751c32cfab36cfa39dbfd20e3e4fc6f779aaaf34be2908d36cc624531c74056d2c7;

[0083] Take the even-digit value of Session Id and get the following string:

[0084] b15a9c9e58eea7558ca48df2a6457f713ca3ca9bd034cf7aa3b20d6c25170627 (seed).

[0085] Encode the seed and key. For example, use MD5 or Base64 encoding. Taking MD5 32 as an example, the string can be obtained: 798f9145b80c06de24143ba3aa2c6877.

[0086] After the encoding is completed, based on the preset ratio (for example, 1:1), the encoded key and seed can be merged through zipper joining to generate a dynamic token. That is, the x-token is obtained: 729380fh921c445pb08p0oc10o69d1e12s461e413tb5a3aa2c6877.

[0087] Furthermore, the dynamic token constructed by the above method is added to the HTTP message header:

[0088] POST / ubus / xlink.firewall.AccessControlSet HTTP / 1.1

[0089] Host:192.168.1.1

[0090] Connection:keep-alive

[0091] Content-Length:450

[0092] Accept:application / json,text / javascript,* / *; q=0.01

[0093] X-token:9200e2542046b2c6f1669344b051d5aeb17d64e04b1a77

[0094] X-Requested-With:XMLHttpRequest

[0095] X-apiId:AccessControlSet

[0096] User-Agent:Mozilla / 5.0(Windows NT 10.0;Win64;x64)AppleWebKit / 537.36(KHTML,like Gecko)Chrome / 126.0.0.0Safari / 537.36

[0097] Content-Type:application / json

[0098] Origin: http: / / 192.168.1.1

[0099] Referer:http: / / 192.168.1.1 /

[0100] Accept-Encoding:gzip,deflate

[0101] Accept-Language:zh-CN,zh; q=0.9

[0102] {"jsonrpc":"2.0","id":43,"method":"call","params":["55d46feded1204125ec 8a2963fb7900e0586b9b756d0e230af661d59aa3101f5ceb01b9e3487732b47c8c08ce9 75f6eefdd345774dcc45c5852a1fd40656984a","xlink.firewall","AccessControlSet",{"data":{"enableWANHTTP":false,"enableWANHTTPS":false,"enableWANSS H":false,"enableWANTELNET":true,"enableWANICMP":false,"enableLANHTT P":true,"enableLANHTTPS":true,"enableLANSSH":false,"enableLANTELNET":false,"enableLANICMP":true}}]}.

[0103] Code examples can be found here Figure 3-5 .

[0104] In some embodiments, the dynamic token can be verified as follows.

[0105] The key and seed are obtained from the dynamic token in a 1:1 manner.

[0106] Take the even-numbered digits of the Session ID and get the following string:

[0107] b15a9c9e58eea7558ca48df2a6457f713ca3ca9bd034cf7aa3b20d6c25170627.

[0108] Using MD5 32-bit encryption, we get:

[0109] 798f9145b80c06de24143ba3aa2c6877.

[0110] Here, the key and seed are joined in a 1:1 zipper-like manner to calculate the local x-token:

[0111] 42ddd0ah123c54bp406pd29o91co29e1e13s167ee15t85ec26325db.

[0112] Compare the locally calculated x-token with the x-token on the front end of the page. If they are equal, the verification is successful.

[0113] In some embodiments, in view of the intrusion characteristics of crawler programs and robot software, generally when such software invades, while constructing false messages, in order to achieve the purpose of rapid invasion, the submission speed of its request message must be much faster than the speed of manual operation. Therefore, in order to avoid such attacks, the server background needs to apply a responsive "timestamp strategy", that is, when automatically monitoring the request time of the message, if the timestamp of the message request is obviously not in line with common sense, such as after submitting a request from one page, another request page needs to expand the menu, switch the interface and other operations before it can be issued, but the timestamps of these two requests are at the millisecond level, then it can be determined that it is a crawler program or robot that is operating. At this time, the background server can automatically enter the pre-set anti-intrusion protection mechanism, directly discard or do not respond to unreasonable message requests, so as to protect the device from attacks. The timestamp strategy in this disclosure is mainly used for processing in the server background, and the page front end does not require additional optimization and modification.

[0114] The following is an example in pseudocode:

[0115] Status ProcessRequest(const char*pRequest)

[0116] {

[0117] / / Get the "current time"

[0118] / / Calculate the "current time" and "last request time" to get the "timestamp difference"

[0119] / / If the "timestamp difference" is within a reasonable range, process it, otherwise discard it

[0120] / / Save "current time" to "last request time"

[0121] }.

[0122] In some embodiments, the logic control policy includes a page logic policy and a background logic policy.

[0123] Among them, the page logic strategy focuses on the layout of the page to determine whether the user's submission of the page request is logical. For example, if a certain page parameter value is modified and the two values ​​are the same before and after the modification, it is a meaningless request operation. The use of page logic strategy can prevent this invalid submission from being exploited by crawlers or robot software. That is, make a logical judgment on the front end of the page. For the POST method, if all parameter values ​​have not changed, the Url path or Url file name in the current submission action can be cleared. Even if the crawler or robot software calls the script code, it will fail to submit successfully.

[0124] The backend logic strategy can be set according to the actual business data. For example, if a page requires the submission of Class A elements, but the crawler or robot software cannot determine the semantic meaning and fills in elements outside Class A, the backend server can directly return an error or not respond.

[0125] The following is an example in pseudocode:

[0126] The server backend uses a state machine to deal with logic strategies. For example, in the current page state, there are only logical submission requests. For example, in the statistics status page, there are only refresh or clear data operations, and no other event requests can exist. If there are, it is an illegal operation.

[0127] Pseudo code example,

[0128] {status 1, {submit request 1, submit request 2}},

[0129] {Status 2, {Submit Request 3}},

[0130] {Status 3, {Submit request 4, Submit request 7, Submit request 9}}.

[0131] In some embodiments, the entry point strategy focuses on preventing crawlers or robot software and finding the entry point of automatic crawlers. For general pages, the entry points used for human-computer interaction are mainly divided into in-page links (such as URLs protected by web pages, etc.) and submission links (such as menus, buttons, etc.). The above links are all entry points for crawlers or robot software to invade. By pinching the entry points, invasion can be effectively avoided.

[0132] According to the entry point strategy, the front end of the page can be optimized in the following two aspects:

[0133] (1) Monitor operation traces. If the traces are invalid, you cannot submit the link on the front end of the page:

[0134] Capture the mouse movement trace. If the mouse movement event is not triggered, the corresponding valid bit flag will not be set to 1 (abnormal event). If the mouse movement event is captured, but the mouse movement has a linear pattern (when a person actually moves the mouse, both the hand and the mouse's sensor wheel will theoretically jitter, and theoretically it is impossible to move linearly), the corresponding valid bit flag will not be set to 1 either.

[0135] (2) Dynamically construct the submission link. The dynamic construction part includes the URL path, URL file name, URL parameter list, etc.

[0136] Use object splicing to build a valid and complete URL according to a private algorithm (distributed construction).

[0137] For example, a page contains two page elements, one is a submit button and the other is a text box. Using the distributed construction method, when the text box gets the focus, the Url file name is set to temporary variable 1; when the text box gets a key event, the parameter list is set to temporary variable 2, and so on. When the button is submitted, the complete URL is constructed from temporary variables 1 and 2.

[0138] According to the embodiments of the present disclosure, the following technical effects are achieved:

[0139] It can greatly improve the security of equipment, prevent crawler software or robot software from destructive behavior, and protect users' network security. In terms of technical implementation, only lightweight changes are needed to deploy and implement, which greatly shortens the project cycle and reduces operation and maintenance costs.

[0140] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.

[0141] The above is an introduction to the method embodiment. The following is a further explanation of the scheme described in this application through an apparatus embodiment.

[0142] Figure 6 A block diagram 600 of a security protection device applied to a network device according to an embodiment of the present application is shown. Figure 6 Shown include:

[0143] The acquisition module 610 is used to acquire the interactive protocol message; the interactive protocol message includes the HTTP message and the request time of the message;

[0144] The protection module 620 is used to process the interactive protocol message through a dynamic token strategy, a timestamp strategy, a logic control strategy and / or an entry point strategy to complete the security protection of the network device;

[0145] The dynamic token strategy includes:

[0146] Use the current client time and the X-apiId fed back when requesting the current page as the key; use the Session Id or Cookie as the seed;

[0147] Encode the key and seed to generate a dynamic token;

[0148] The dynamic token is added to the HTTP message to complete the protection of the current network device.

[0149] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the described module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0150] Figure 7 A schematic diagram of the structure of a terminal device or server suitable for implementing an embodiment of the present application is shown.

[0151] like Figure 7As shown, the terminal device or server includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 702 or the program loaded from the storage part 708 into the random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the terminal device or server are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0152] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.

[0153] In particular, according to an embodiment of the present application, the above method flow steps can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a machine-readable medium, and the computer program includes a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present application are executed.

[0154] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0155] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of the code, and the aforementioned module, program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0156] The units or modules involved in the embodiments described in the present application may be implemented by software or hardware. The units or modules described may also be arranged in a processor. The names of these units or modules do not, in some cases, constitute limitations on the units or modules themselves.

[0157] As another aspect, the present application further provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable storage medium stores one or more programs, and when the above programs are used by one or more processors to execute the method described in the present application.

[0158] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of application involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the aforementioned application concept. For example, the above features are replaced with (but not limited to) technical features with similar functions applied in the present application.

Claims

1. A security protection method applied to network equipment, characterized in that: include: Obtaining an interactive protocol message; the interactive protocol message includes an HTTP message and a request time of the message; The interactive protocol message is processed through a dynamic token strategy, a timestamp strategy, a logic control strategy and / or an entry point strategy to complete security protection of the network device; The dynamic token strategy includes: Use the current client time and the X-apiId fed back when requesting the current page as the key; use the SessionId or Cookie as the seed; Encode the key and seed to generate a dynamic token; The dynamic token is added to the HTTP message to complete the protection of the current network device.

2. The method according to claim 1, characterized in that The method of using the current client time and the X-apiId fed back when requesting the current page as the key includes: Insert the string representing the current client time into the X-apiId fed back when requesting the current page to construct the key.

3. The method according to claim 2, characterized in that The use of SessionId as a seed includes: Take the even-digit value of SessionId; Based on the even-numbered digits of the SessionId, a seed is constructed.

4. The method according to claim 3, characterized in that The encoding of the key and the seed to generate a dynamic token includes: Encode the key and seed using MD5 or Base64; Based on the preset ratio, the encoded key and seed are merged through zipper joining to generate a dynamic token.

5. The method according to claim 1, characterized in that The timestamp strategy includes: Obtain the difference between two adjacent request timestamps in the interactive protocol message; If the difference is less than a preset threshold, the preset anti-intrusion protection mechanism is entered.

6. The method according to claim 1, characterized in that The logic control strategy includes a page logic strategy and a background logic strategy; Among them, the page logic strategy includes: The user submission request in the interactive protocol message is logically judged according to the preset business logic. If it does not conform to the logic, the preset anti-intrusion protection mechanism is entered.

7. The method according to claim 1, characterized in that The entry point strategy includes monitoring operation traces and dynamically building submission links; Among them, monitoring operation traces include: Monitor mouse movement traces. If no mouse movement event is currently triggered, enter the preset anti-intrusion protection mechanism.

8. A security protection device applied to network equipment, characterized in that: include: An acquisition module, used for acquiring an interactive protocol message; the interactive protocol message includes an HTTP message and a request time of the message; A protection module, used to process the interactive protocol message through a dynamic token strategy, a timestamp strategy, a logic control strategy and / or an entry point strategy to complete security protection of the network device; The dynamic token strategy includes: Use the current client time and the X-apiId fed back when requesting the current page as the key; use the SessionId or Cookie as the seed; Encode the key and seed to generate a dynamic token; The dynamic token is added to the HTTP message to complete the protection of the current network device.

9. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

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 method according to any one of claims 1 to 7 is implemented.