WO2023045196A1 - 访问请求捕获方法、装置、计算机设备和存储介质 - Google Patents

访问请求捕获方法、装置、计算机设备和存储介质 Download PDF

Info

Publication number
WO2023045196A1
WO2023045196A1 PCT/CN2022/074061 CN2022074061W WO2023045196A1 WO 2023045196 A1 WO2023045196 A1 WO 2023045196A1 CN 2022074061 W CN2022074061 W CN 2022074061W WO 2023045196 A1 WO2023045196 A1 WO 2023045196A1
Authority
WO
WIPO (PCT)
Prior art keywords
access request
current non
access
malicious
current
Prior art date
Application number
PCT/CN2022/074061
Other languages
English (en)
French (fr)
Inventor
魏志伟
Original Assignee
苏州浪潮智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州浪潮智能科技有限公司 filed Critical 苏州浪潮智能科技有限公司
Publication of WO2023045196A1 publication Critical patent/WO2023045196A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • H04L63/1491Countermeasures against malicious traffic using deception as countermeasure, e.g. honeypots, honeynets, decoys or entrapment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1408Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
    • H04L63/1416Event detection, e.g. attack signature detection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management

Definitions

  • the present application relates to an access request capturing method, device, computer equipment and storage medium.
  • web protection software is mostly a combination of data security software and firewall products, and it is difficult to accurately identify whether a certain access behavior is a normal access by a real user.
  • This type of software usually judges access behavior based on the process and service level, and its detection time is late, which cannot effectively prevent virus programs from invading the host, leaving a window period for other malicious operations to take advantage of.
  • An embodiment of the present application provides a method for capturing an access request, including:
  • return session response information which includes session control identifiers and auxiliary authentication data stored in different locations;
  • the access request capturing method further includes:
  • the current non-first access request When the current non-first access request carries a session control identifier and auxiliary authentication data, determine whether the API interface invoked by the current non-first access request is consistent with the preset trapping API interface;
  • the access request capturing method further includes:
  • the current non-first access request When the current non-first access request carries a session control identifier and auxiliary authentication data, determine whether the time corresponding to the timestamp carried by the current non-first access request has moved forward;
  • the access request capturing method further includes:
  • the current non-first access request When the current non-first access request carries a session control identifier and auxiliary authentication data, determine whether the request data carried in the current non-first access request is consistent with the preset trapping data;
  • the access request capturing method further includes:
  • the current non-first access request When the current non-first access request carries a session control identifier and auxiliary authentication data, determine whether the current non-first access request indicates to call the authentication interface of the preset fake database;
  • the access request capturing method further includes:
  • performing malicious request processing operations includes:
  • the malicious access data is used to record the number of malicious accesses corresponding to different malicious access levels
  • the embodiment of the present application also provides an access request capture device, including:
  • the response module is used to return session response information when receiving the first access request of the current user, and the session response information includes session control identifiers and auxiliary authentication data stored in different locations;
  • a follow-up request receiving module configured to receive the current non-first access request of the current user
  • the capturing module is configured to capture the current non-first access request when the current non-first access request carries a session control identifier and does not carry auxiliary authentication data.
  • the embodiment of the present application also provides a computer device, including a memory and one or more processors, where computer-readable instructions are stored in the memory, and when the computer-readable instructions are executed by the one or more processors, one or more The processor executes the steps of the access request capturing method in any of the foregoing embodiments.
  • the embodiment of the present application also provides one or more non-volatile computer-readable storage media storing computer-readable instructions.
  • the computer-readable instructions are executed by one or more processors, the one or more processors execute The steps of the access request capture method in any of the foregoing embodiments.
  • FIG. 1 is an application environment diagram of a method for capturing an access request according to one or more embodiments
  • Fig. 2 is a schematic flowchart of a method for capturing an access request according to one or more embodiments
  • Fig. 3 is a structural block diagram of an access request capturing device according to one or more embodiments
  • FIG. 4 is an internal block diagram of a computer device in accordance with one or more embodiments.
  • the access request capture method provided in the embodiment of the present application can be applied to the application environment shown in FIG. 1 .
  • the server 101 may communicate with the terminal 102 through a network.
  • the server 101 may receive the first access request from the terminal 102, and return session response information.
  • the server 101 can be implemented by an independent server or a server cluster composed of multiple servers, and the terminal 102 can be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices.
  • a method for capturing an access request is provided.
  • the application of the method to the server 101 in FIG. 1 is used as an example for illustration, including the following steps:
  • Step S201 when receiving the first access request from the current user, return session response information;
  • the session response information includes session control identifiers and auxiliary authentication data stored in different locations;
  • Step S202 receiving the current non-first access request from the current user
  • Step S203 when the current non-first access request carries a session control identifier and does not carry auxiliary authentication data, capture the current non-first access request.
  • the server 101 when the server 101 receives the first access request from the terminal 102, it creates a session control identifier and auxiliary authentication data corresponding to the current user, and sets the session control identifier and auxiliary authentication data in the session
  • the different positions in the response message make it difficult for most network eavesdropping to obtain the complete authentication information required by the server 101 .
  • the content of the current non-first access request is comprehensively authenticated in combination with the session control identifier and the auxiliary authentication data, thereby improving the security of network communication. Even if the session control ID is leaked or cracked, and the network attacker initiates the session control ID authentication in a conventional way, it will be difficult to pass the detection and gain access to website resources because of failure to provide auxiliary authentication data.
  • the current user in step S201 usually refers to the user who is currently visiting the web site.
  • the server 101 in one session, if multiple access requests received are from the same user account, the sending of these access requests can be party as the same current user.
  • the first access request of the current user refers to the first access request from the current user in a session.
  • the web server will create a session control identifier for the session process and the user according to the user's first access request in a session process, and return it to the client where the user is located. The user only needs to log in to the website once.
  • the session control identifier can be used to continuously access website resources that require login. What is different from the traditional technology is that in the session response information returned by the server 101 to the terminal 102 in the embodiment of the present application, in addition to the session control identifier, there is also auxiliary authentication data, which makes the authentication method of the subsequent server 101 different for each access request. Same.
  • the session control identifier in the session response information is a session ID (session control identification number).
  • the server 101 will create a session (session control) object for the current user, and each session object has a unique session ID, so as to ensure that the current user and its session object are The only corresponding.
  • a session object can be a piece of memory created by the server 101 .
  • the session ID when the current user accesses website resources through a browser, and the browser supports the use of cookie (web cookie, a web technology) data, the session ID will generally be set in a certain position in the cookie data.
  • the session ID can be transmitted between the server 101 and the terminal 102 through the transmission of cookie data.
  • other technologies can also be used to transfer the session ID, for example, it can be realized by rewriting URL (Uniform Resource Locator, Uniform Resource Locator), which will not be expanded here.
  • URL Uniform Resource Locator, Uniform Resource Locator
  • the session ID obtained by illegal means is written into the access request, and the access request is sent to the server 101 to access website resources.
  • the session response information of the embodiment of the present application sets the session ID and the auxiliary authentication data in different positions, for example, the session ID is set in the cookie data, and the auxiliary authentication data is set outside the text position where the cookie data is located, making it difficult for network attackers Determine what authentication data should be carried with the correct access request.
  • auxiliary authentication data may be set at different positions in the response header of the session response information.
  • session response information can include response line, response header, and response body.
  • the response line can include communication protocol version, status code and other data
  • the response header can include Server (server type), Date (time), Content- Type (file type), Cache-Control (cache control), Set-cookie (set cookie) and other fields
  • the response body can include various resource data that the current user wishes to access.
  • the response header can have multiple different fields, and the auxiliary authentication data can be field values corresponding to multiple fields. Even, the response header may also include new fields written by the server 101, and the field values of these new fields are part of the auxiliary authentication data.
  • the auxiliary authentication data can be the field value of one field, or the field values of multiple fields, and even the auxiliary authentication data can be characters with specified digits in the field value of one field, so the auxiliary authentication data The specific format can be varied.
  • non-first visit requests In order to distinguish subsequent access requests from the first access request, the concept of non-first access request is introduced.
  • the non-first access request refers to other access requests received by the server 101 from at least a part of the current user after receiving the first access request from the current user.
  • any access requests received after the first access request such as requests to access website resources, requests to change resource attributes, or requests to change permissions, can be regarded as non-first access requests.
  • the account corresponding to the current user may be stolen, and the terminal 102 corresponding to the current user may be controlled by a network attacker, so that the server 101 will receive a message sent in the name of the current user, but actually rewritten by the network attacker. , which are also considered non-first visit requests by the current user.
  • the first access request is also designed and sent by the network attacker, and at this time the current user may refer to the user of the terminal 102 controlled by the network attacker.
  • the number of non-first access requests may be one or more.
  • the current non-first access request in step S202 refers to the non-first access request currently received by the server 101 .
  • Step S203 points out that if the current non-first access request carries a session control identifier and does not carry auxiliary authentication data, capture the current non-first access request.
  • This step indicates that the server 101 recognizes that the current non-first access request is a malicious request, and capturing the malicious request can prevent the server 101 from further network attacks.
  • you can respond by not responding, by providing low-value, invalid or false data, or by returning a warning message, etc., which will not be elaborated here.
  • step S201 may include: receiving a first access request from the current user, and returning session response information.
  • step S203 may include: capturing the current non-first visit request in response to the fact that the current non-first visit request carries a session control identifier and does not carry auxiliary authentication data.
  • step S201 is the main description of the ideas and important concepts involved in step S201, step S202 and step S203.
  • the access request capturing method further includes:
  • the current non-first access request When the current non-first access request carries a session control identifier and auxiliary authentication data, determine whether the API (Application Programming Interface) interface called by the current non-first access request is consistent with the preset trapping API interface;
  • API Application Programming Interface
  • access request capture methods may include:
  • the current non-first access request carrying a session control identifier and auxiliary authentication data, determine whether the API interface called by the current non-first access request is consistent with the preset trapping API interface; in response to the current non-first access request.
  • the interface is consistent with the preset trapping API interface, which captures the current non-first access request.
  • the server 101 may define calling methods of some core API interfaces.
  • conventional API interface fields include delete (delete), update (update), get (acquire) and push (push), etc.
  • the access request sent by the client to the server will carry the fields of the API interface , and request the server to perform corresponding operations, for example, the operation corresponding to delete is "delete data”.
  • network attackers will send non-initial access requests according to the common usage of these API interface types, but the server 101 can change the functions corresponding to some general API interfaces, or cancel the functions of some API interfaces, so that The calling method of the API interface changes, and it is not easy for a network attacker to know the calling method of the core API interface of the server 101 at this time.
  • the server 101 is requested to perform the operation of "deleting data", and the server 101 defines the field of the API interface corresponding to the operation as shanchu, rather than delete; on the contrary, the server 101 uses the API interface corresponding to the delete field as a trapping API interface; if the server 101 If there is a delete field in the current non-first access request received, it can be considered that the current non-first access request carries an API interface field that should not exist, and the API interface it carries is consistent with the trapping API interface. , the current non-first access request can be captured.
  • the server 101 can use REST (Representational State Transfer, presentation layer state transfer) technology to realize the hidden call of the core API interface and set the trapping API interface.
  • REST Real State Transfer, presentation layer state transfer
  • the server 101 may set one or more trapping API interfaces, which may be determined according to actual needs.
  • the access request capturing method further includes:
  • the current non-first access request When the current non-first access request carries a session control identifier and auxiliary authentication data, determine whether the time corresponding to the timestamp carried by the current non-first access request has moved forward;
  • access request capture methods may include:
  • a network attacker may resend the access request received by the server 101 to the server 101 in an attempt to deceive the server 101.
  • This method is mainly used in the identity authentication process and destroys the correctness of the authentication.
  • replay attack it can be identified through the timestamp verification mechanism.
  • the server 101 may store the timestamps carried by the first visit request and the non-first visit request sent by the current user, and save the timestamp carried by the latest visit request sent by the current user each time.
  • the timestamp carried in the current non-first access request can be compared with the saved timestamp carried in the last access request.
  • the current non-first access request carries If the time corresponding to the timestamp of the access request is equal to or earlier than the time corresponding to the timestamp carried in the last access request, it is determined that the time corresponding to the timestamp carried in the current non-first access request has moved forward, and the current non-first access request The access request is regarded as a malicious request, and the current non-first access request is captured. If the time corresponding to the timestamp carried in the current non-first access request does not move forward, capture is not performed in this link.
  • the access request capturing method further includes:
  • the current non-first access request When the current non-first access request carries a session control identifier and auxiliary authentication data, determine whether the request data carried in the current non-first access request is consistent with the preset trapping data;
  • access request capture methods may include:
  • the session response information can include a response line, response header, and response body.
  • the current non-first access request can also include a request line, request header, and request body.
  • the location of the request data carried in the above-mentioned current non-first access request is generally in the request body. Determine whether the request data carried in the current non-first access request is consistent with the preset trapping data. Specifically, it can be judged whether the username in the request data is consistent with the username in the preset trapping data; of course, it can also be judged Whether the other positional characters of the entrapment data are consistent with the preset characters in the trap data, we will not expand too much here.
  • the access request capturing method further includes:
  • the current non-first access request When the current non-first access request carries a session control identifier and auxiliary authentication data, determine whether the current non-first access request indicates to call the authentication interface of the preset false database;
  • access request capture methods may include:
  • the server 101 may also proactively distribute the login port, login account and login password of the fake database, so that network attackers can learn from the multiple session response information returned by the server 101 or other means.
  • the authentication interface of the false database is preset, and the data in the false database may be worthless.
  • the current non-first access request carries these login port, login account and login password information, indicating to call the authentication interface of the fake database, attempting to illegally access or perform illegal operations on the database, capture the current non-first access request . This way can assist in judging whether the current user's session is abnormal. If the current non-first access request does not indicate to call the authentication interface of the preset false database, no capture is performed.
  • the access request capturing method further includes:
  • access request capture methods may include:
  • the preset execution order of the foregoing determination steps can be adjusted according to actual needs.
  • a method for capturing an access request includes the following steps:
  • the current non-first access request When the current non-first access request carries a session control identifier and auxiliary authentication data, determine whether the API interface called by the current non-first access request is consistent with the preset trapping API interface, and if so, capture the current non-first access request, and perform malicious request processing operations,
  • the step of performing a malicious request processing operation includes:
  • the malicious access data is used to record the number of malicious accesses corresponding to different malicious access levels
  • the aforementioned malicious access data may be in the form of a table.
  • the malicious access level can be set to three levels. If the current non-first access request is captured, it can be classified as one of the following three malicious access requests:
  • Level-1 malicious access request the time corresponding to the timestamp carried in the current non-first access request has shifted forward;
  • Second-level malicious access request the API interface called by the current non-first access request is consistent with the preset trapping API interface, or the request data carried in the current non-first access request is consistent with the preset trapping data, or the current non-first access request The request indicates calling the authentication interface of the preset fake database;
  • Third-level malicious access request the current non-first access request carries a session control identifier and does not carry auxiliary authentication data.
  • Each access request corresponds to a malicious access level.
  • the access restriction operation is performed.
  • receiving a new malicious access request from the current user can be regarded as an increase in the number of malicious accesses of the current user.
  • One or more preset thresholds can be set correspondingly for each malicious access level, which means that one or more thresholds can be set correspondingly for the number of appearances of each malicious access request, and when the preset threshold is reached, an access restriction operation is performed. Ways to restrict access operations include logging out of accounts or blocking IP (Internet Protocol, Internet Protocol) addresses, etc., and there are no excessive restrictions here.
  • IP Internet Protocol, Internet Protocol
  • the server 101 when the number of current user-level malicious access requests is 1, the server 101 returns a warning message, and when the number of current user-level malicious access requests is 10-50, the server 101 executes logout Operation, when the number of malicious access requests of the current user level is greater than 50, the server 101 executes the operation of blocking the IP address of the current user.
  • the server 101 For the second-level malicious access request, when the number of second-level malicious access requests of the current user is 1, the server 101 performs a logout operation; operation.
  • the server 101 executes the operation of blocking the IP address of the current user.
  • the server 101 can back up the malicious access data of different users, and by obtaining the malicious access data of multiple users, count the number of malicious accesses corresponding to different malicious access levels, and determine the execution sequence of the aforementioned four judgment steps according to the statistical results ; For example, among the first-level malicious access request, the second-level malicious access request and the third-level malicious access request, when the total number of malicious visits corresponding to the first-level malicious access request is the largest, it will be used to judge the execution of the judgment step of the first-level malicious access request The order is set to be executed first; when the total number of malicious accesses corresponding to the second-level malicious access request is relatively small, the execution order of the judgment step for judging the second-level malicious access request is set to be executed later. There are multiple judgment steps in the second-level malicious access request, and the execution sequence of different judgment steps in the second-level malicious access request can also be determined based on the statistical results and the number of corresponding malicious access requests as a sorting basis.
  • a dynamic statistical period can also be set, and the execution sequence of the four judgment steps can be updated according to the statistical results obtained in each dynamic motivation period.
  • the four quarters of a year can be set as four dynamic statistical periods, and the execution sequence of the four judgment steps can be updated according to the statistical results of each quarter.
  • an access request capturing device 300 including:
  • the response module 301 is configured to return session response information when receiving the first access request of the current user; the session response information includes session control identifiers and auxiliary authentication data stored in different locations;
  • Subsequent request receiving module 302 configured to receive the current non-first access request of the current user
  • the capturing module 303 is configured to capture the current non-first access request when the current non-first access request carries a session control identifier and does not carry auxiliary authentication data.
  • the response module 301 is configured to receive the first access request of the current user, and return session response information; the capture module 303 is configured to respond to the current non-first access request carrying a session control identifier and not carrying auxiliary authentication data, Capture the current non-first access request.
  • the access request capture device 300 also includes an API trapping module (not shown), and the API trapping module is used to determine that the current non-first access request carries a session control identifier and auxiliary authentication data. Whether the API interface invoked by the first access request is consistent with the preset trapping API interface, and if so, capture the current non-first access request.
  • the API trapping module is used to determine whether the API interface invoked by the current non-first access request is consistent with the preset trapping API interface in response to the current non-first access request carrying a session control identifier and auxiliary authentication data , the API interface invoked in response to the current non-first access request is consistent with the preset trapping API interface, and the current non-first access request is captured.
  • the access request capture device 300 also includes a replay trapping module (not shown), and the replay trapping module is used to determine when the current non-first access request carries a session control identifier and auxiliary authentication data. Whether the time corresponding to the timestamp carried in the current non-first access request has moved forward, and if so, capture the current non-first access request.
  • the replay trapping module is configured to determine whether the time corresponding to the timestamp carried in the current non-first access request has moved forward in response to the session control identifier and auxiliary authentication data carried in the current non-first access request , capturing the current non-first access request in response to the time corresponding to the timestamp carried in the current non-first access request moving forward.
  • the access request capture device 300 also includes a data trapping module (not shown), and the data trapping module is used to determine that the current non-first access request carries a session control identifier and auxiliary authentication data. Whether the request data carried in the first access request is consistent with the preset trapping data, if so, capture the current non-first access request.
  • the data trapping module is used to determine whether the request data carried in the current non-first access request is consistent with the preset trapping data in response to the current non-first access request carrying a session control identifier and auxiliary authentication data, In response to the fact that the request data carried in the current non-first access request is consistent with the preset trapping data, the current non-first access request is captured.
  • the access request capture device 300 also includes a database trapping module (not shown), and the database trapping module is used to determine that the current non-first access request carries a session control identifier and auxiliary authentication data. Whether the first access request indicates to call the authentication interface of the preset false database, if so, capture the current non-first access request.
  • the database trapping module is configured to respond to the current non-first access request carrying a session control identifier and auxiliary authentication data, to determine whether the current non-first access request indicates to call the authentication interface of the preset fake database, and respond The current non-first access request indicates that the authentication interface of the preset false database is called to capture the current non-first access request.
  • the access request capturing device 300 further includes:
  • the judging step execution control module (not shown), is used to execute the following judging steps according to the preset execution sequence when the current non-first access request carries a session control identifier and auxiliary authentication data:
  • Judgment result processing module (not shown), for when the result of any of the above judgment steps is yes, stop executing subsequent judgment steps, and capture the current non-first access request;
  • a malicious request processing module (not shown), configured to execute a malicious request processing operation when capturing a current non-first access request.
  • the execution control module of the judging step is configured to execute the following judging steps according to a preset execution sequence in response to the current non-first access request carrying a session control identifier and auxiliary authentication data:
  • the judging result processing module is used to respond to the result of any of the above judging steps being yes, stop executing subsequent judging steps, and capture the current non-first access request.
  • the malicious request processing module includes:
  • a malicious access level determining unit is used to determine the malicious access level corresponding to the current non-first access request, and update the malicious access data corresponding to the current user; the malicious access data is used to record the number of malicious accesses corresponding to different malicious access levels;
  • the access restriction operation unit is configured to perform an access restriction operation when the number of malicious accesses corresponding to any malicious access level reaches a corresponding preset threshold.
  • the access restriction operation unit is configured to perform an access restriction operation in response to the number of malicious accesses corresponding to any malicious access level reaching a corresponding preset threshold.
  • Each module in the above-mentioned device for capturing access requests can be fully or partially realized by software, hardware or a combination thereof.
  • the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, and can also be stored in the memory of the computer device in the form of software, so that the processor can invoke and execute the corresponding operations of the above-mentioned modules.
  • the embodiment of the present application provides a computer device, which may be a server, and its internal structure may be shown in FIG. 4 .
  • the computer device includes a processor, a memory, and a network interface connected through a system bus. Wherein, the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, computer readable instructions and a database.
  • the internal memory provides an environment for the execution of the operating system and computer readable instructions in the non-volatile storage medium.
  • the network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer-readable instructions are executed by the processor, a method for capturing access requests is implemented.
  • FIG. 4 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation to the computer equipment on which the solution of the application is applied.
  • the specific computer equipment can be More or fewer components than shown in the figures may be included, or some components may be combined, or have a different arrangement of components.
  • a computer device provided by an embodiment of the present application includes a memory and one or more processors, and computer-readable instructions are stored in the memory, and when the computer-readable instructions are executed by the one or more processors, Make one or more processors execute the steps of the access request capturing method in any one of the foregoing embodiments.
  • the embodiments of the present application provide one or more non-volatile computer-readable storage media storing computer-readable instructions.
  • the computer-readable instructions are executed by one or more processors, one or more A plurality of processors execute the steps of the access request capturing method in any of the foregoing embodiments.
  • Nonvolatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM) or external cache memory.
  • RAM random access memory
  • RAM is available in many forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Chain Synchlink DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer And Data Communications (AREA)

Abstract

本申请涉及一种访问请求捕获方法、装置、计算机设备和存储介质。前述的方法包括:在接收到当前用户的首次访问请求时,返回会话响应信息,会话响应信息包括存放于不同位置的会话控制标识和辅助认证数据;接收当前用户的当前非首次访问请求;在当前非首次访问请求携带有会话控制标识,且未携带有辅助认证数据时,捕获当前非首次访问请求。

Description

访问请求捕获方法、装置、计算机设备和存储介质
相关申请的交叉引用
本申请要求于2021年9月26日提交中国专利局,申请号为CN202111126065.7,申请名称为“访问请求捕获方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及一种访问请求捕获方法、装置、计算机设备和存储介质。
背景技术
在web(全球广域网)成为主流的网络和应用技术后,web服务器的安全问题便一直成为业界的关注焦点。各地出现的篡改网页、蔓延病毒等网络攻击,给用户和互联网企业造成了重大损失。
目前web防护软件多为数据安全软件与防火墙产品的结合,难以准确识别某个访问行为是否为真实用户的正常访问。这类软件通常基于进程、服务层面对访问行为进行判断,其检测的时间晚,无法有效阻挡病毒程序入侵主机,留下了其它恶意操作可利用的窗口期。
发明内容
本申请实施例提供了一种访问请求捕获方法,包括:
在接收到当前用户的首次访问请求时,返回会话响应信息,会话响应信息包括存放于不同位置的会话控制标识和辅助认证数据;
接收当前用户的当前非首次访问请求;和
在当前非首次访问请求携带有会话控制标识,且未携带有辅助认证数据时,捕获当前非首次访问请求。
在其中一个实施例中,访问请求捕获方法还包括:
在当前非首次访问请求携带有会话控制标识,且携带有辅助认证数据时,判断当前非首次访问请求调用的API接口与预设的诱捕API接口是否一致;和
在所述当前非首次访问请求调用的API接口与预设的诱捕API接口一致时,捕获当前非首次访问请求。
在其中一个实施例中,访问请求捕获方法还包括:
在当前非首次访问请求携带有会话控制标识,且携带有辅助认证数据时,判断当前非首次访问请求携带的时间戳所对应的时间是否发生前移;和
在当前非首次访问请求携带的时间戳所对应的时间发生前移时,捕获当前非首次访问请求。
在其中一个实施例中,访问请求捕获方法还包括:
在当前非首次访问请求携带有会话控制标识,且携带有辅助认证数据时,判断当前非首次访问请求携带的请求数据与预设的诱捕数据是否一致;和
在所述当前非首次访问请求携带的请求数据与预设的诱捕数据一致时,捕获当前非首次访问请求。
在其中一个实施例中,访问请求捕获方法还包括:
在当前非首次访问请求携带有会话控制标识,且携带有辅助认证数据时,判断当前非首次访问请求是否指示调用预设的虚假数据库的认证接口;和
在所述当前非首次访问请求指示调用预设的虚假数据库的认证接口时,捕获当前非首次访问请求。
在其中一个实施例中,访问请求捕获方法还包括:
在当前非首次访问请求携带有会话控制标识,且携带有辅助认证数据时,根据预设的执行顺序,执行以下的判断步骤:
判断当前非首次访问请求调用的API接口与预设的诱捕API接口是否一致,
判断当前非首次访问请求携带的时间戳所对应的时间是否发生前移,
判断当前非首次访问请求携带的请求数据与预设的诱捕数据是否一致,
判断当前非首次访问请求是否指示调用预设的虚假数据库的认证接口;
在以上任一判断步骤的结果为是时,停止执行后续的判断步骤,捕获当前非首次访问请求;和
在捕获当前非首次访问请求时,执行恶意请求处理操作。
在其中一个实施例中,执行恶意请求处理操作,包括:
确定当前非首次访问请求对应的恶意访问等级,并更新与当前用户对应的恶意访问 数据,恶意访问数据用于记录不同恶意访问等级对应的恶意访问次数;和
在任一恶意访问等级对应的恶意访问次数达到相应的预设阈值时,执行限制访问操作。
本申请实施例还提供了一种访问请求捕获装置,包括:
响应模块,用于在接收到当前用户的首次访问请求时,返回会话响应信息,会话响应信息包括存放于不同位置的会话控制标识和辅助认证数据;
后续请求接收模块,用于接收当前用户的当前非首次访问请求;
捕获模块,用于在当前非首次访问请求携带有会话控制标识,且未携带有辅助认证数据时,捕获当前非首次访问请求。
本申请实施例还提供了一种计算机设备,包括存储器及一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行前述任一实施例中访问请求捕获方法的步骤。
本申请实施例还提供了一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行前述任一实施例中访问请求捕获方法的步骤。
附图说明
图1为根据一个或多个实施例中访问请求捕获方法的应用环境图;
图2为根据一个或多个实施例中访问请求捕获方法的流程示意图;
图3为根据一个或多个实施例中访问请求捕获装置的结构框图;
图4为根据一个或多个实施例中计算机设备的内部结构图。
具体实施方式
为了使本申请实施例的技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请实施例提供的访问请求捕获方法,可以应用于如图1所示的应用环境中。其中,服务器101可以与终端102通过网络进行通信。服务器101可以接收来自终端102的首次访问请求,并返回会话响应信息。其中,服务器101可以用独立的服务器或者是多个服务器组成的服务器集群来实现,终端102可以但不限于是各种个人计算机、笔记本 电脑、智能手机、平板电脑和便携式可穿戴设备。
在一些实施例中,如图2所示,提供了一种访问请求捕获方法,以该方法应用于图1中的服务器101为例进行说明,包括以下步骤:
步骤S201,在接收到当前用户的首次访问请求时,返回会话响应信息;会话响应信息包括存放于不同位置的会话控制标识和辅助认证数据;
步骤S202,接收当前用户的当前非首次访问请求;
步骤S203,在当前非首次访问请求携带有会话控制标识,且未携带有辅助认证数据时,捕获当前非首次访问请求。
本申请实施例提供的访问请求捕获方法,在服务器101接收来自终端102的首次访问请求时,创建与当前用户对应的会话控制标识和辅助认证数据,且将会话控制标识和辅助认证数据设置在会话响应消息中的不同位置,使得多数的网络窃听难以获取服务器101所需的完整的认证信息。在后续接收到当前非首次访问请求时,结合会话控制标识和辅助认证数据对当前非首次访问请求的内容进行综合认证,提高了网络通信的安全度。即使会话控制标识被泄露或被破解,网络攻击者按照常规的方式发起会话控制标识认证,由于未能提供辅助认证数据,也将难以通过检测,难以取得网站资源的访问权限。
关于当前用户。步骤S201中的当前用户,通常指当下正在访问web网站的用户,对于服务器101而言,在一次会话中,接收到的多个访问请求如果是来自同一用户账户,则可以将这些访问请求的发送方视为同一当前用户。
关于首次访问请求。当前用户的首次访问请求,是指在一次会话中,来自当前用户的第一次访问请求。在传统技术中,web服务器会根据用户在一次会话过程中的第一次访问请求,为该会话过程和用户创建一个会话控制标识,并返回给用户所在的客户端,用户只需登录一次网站,在本次会话过程中,可以凭借该会话控制标识不断访问需要登录后才能访问的网站资源。不同于传统技术的是,本申请实施例的服务器101给终端102返回的会话响应信息中,除了会话控制标识,还有辅助认证数据,这使得后续服务器101对每次的访问请求的认证方式不一样。
在一些实施例中,会话响应信息中的会话控制标识为session ID(会话控制身份标识号)。一般来说,服务器101在接收到当前用户的首次访问请求之后,会为当前用户创建一个session(会话控制)对象,每个session对象都拥有一个唯一的session ID,这样保证当前用户与其session对象是唯一对应的。通常地,一个session对象可以是服务器101创建的一块内存。
一般来说,当前用户通过浏览器访问网站资源,且浏览器支持使用cookie(网络饼 干,一种web技术)数据时,session ID一般会被设置在cookie数据中的某个位置。服务器101和终端102之间可以通过cookie数据的传递,来传递session ID。当然,还可以采用其他技术来传递session ID,例如,可以通过URL(Uniform Resource Locator,统一资源定位器)重写的方式来实现,在此不作展开。多数网络攻击者,会利用session ID传递和认证的机制,窃听session ID或暴力破解session ID,例如通过获取cookie数据而获得session ID,此时,在当前用户登录后,网络攻击者可能会将通过非法手段获取到的session ID写入访问请求中,将访问请求发送给服务器101以访问网站资源。本申请实施例的会话响应信息将session ID和辅助认证数据设置在不同的位置,例如将session ID设置在cookie数据中,将辅助认证数据设置在cookie数据所在的文本位置以外,使网络攻击者难以确定正确的访问请求应当携带哪些认证数据。
在一些实施例中,可以在会话响应信息的响应头部中的不同位置,设置辅助认证数据。一般来说,会话响应信息可以包括响应行、响应头部和响应体,响应行可以包括通信协议版本、状态码等数据,响应头部可以包括Server(服务器类型)、Date(时间)、Content-Type(文件类型)、Cache-Control(缓存控制)、Set-cookie(设置cookie)等多个字段,响应体可以包括当前用户希望访问的各类资源数据。可见响应头部有可以有多个不同字段,而辅助认证数据可以是多个字段对应的字段值。甚至,响应头部还可以包括由服务器101写入的新字段,这些新字段的字段值属于辅助认证数据的一部分。可见,辅助认证数据,既可以是一个字段的字段值,也可以是多个字段的字段值,甚至,辅助认证数据还可以是一个字段的字段值中的指定位数的字符,因此辅助认证数据的具体格式,可以是多样的。
关于非首次访问请求。为将后续的访问请求区别于首次访问请求,引入非首次访问请求的概念。非首次访问请求是指服务器101在接收来自当前用户的首次访问请求后,接收到的来自当前用户的至少一部分的其他访问请求。通常,在首次访问请求之后,接收到的请求访问网站资源、请求更改资源属性或请求更改权限等访问请求,都可以被视为非首次访问请求。有一些可能被视为不存在网络安全风险的请求,例如关于结束会话方面的请求,可以不视为非首次访问请求。
在一些情况下,当前用户所对应的账号可能会被盗取,当前用户对应的终端102可能会被网络攻击者控制,从而服务器101会接收到以当前用户的名义发出、实则由网络攻击者改写的访问请求,这些也被视为当前用户的非首次访问请求。当然,不排除首次访问请求也是由网络攻击者设计而发出的,此时当前用户则可以指网络攻击者控制的终端102的用户。无论如何,非首次访问请求的数量可以是一个或更多。而步骤S202中的 当前非首次访问请求,是指服务器101在当前接收到的非首次访问请求。
关于对当前非首次访问请求的捕获。步骤S203指出,在当前非首次访问请求携带有会话控制标识,且未携带有辅助认证数据时,则捕获当前非首次访问请求。该步骤表示,服务器101识别出当前非首次访问请求是恶意请求,捕获该恶意请求可以使得服务器101避免遭受进一步的网络攻击。通常,捕获恶意请求后,可以采取不予响应的方式,也可以采取提供价值较低、无效或虚假数据的方式予以响应,也可以返回警告信息等,在此不作过多展开。
在一些实施例中,步骤S201可以包括:接收当前用户的首次访问请求,返回会话响应信息。步骤S203可以包括:响应于当前非首次访问请求携带有会话控制标识,且未携带有辅助认证数据,捕获当前非首次访问请求。
以上为对步骤S201、步骤S202和步骤S203涉及的思路和重要概念作出的主要说明。
在一些实施例中,访问请求捕获方法还包括:
在当前非首次访问请求携带有会话控制标识,且携带有辅助认证数据时,判断当前非首次访问请求调用的API(Application Programming Interface,应用程序接口)接口与预设的诱捕API接口是否一致;
若是,则捕获当前非首次访问请求。
具体地,访问请求捕获方法可以包括:
响应于当前非首次访问请求携带有会话控制标识,且携带有辅助认证数据,判断当前非首次访问请求调用的API接口与预设的诱捕API接口是否一致;响应于当前非首次访问请求调用的API接口与预设的诱捕API接口一致,捕获当前非首次访问请求。
服务器101可以定义一些核心API接口的调用方式。传统技术中,常规的API接口字段包括delete(删除)、update(更新)、get(获取)和push(推送)等,一般情况下,客户端向服务器发送的访问请求中会携带API接口的字段,并请求服务器进行相应的操作,例如delete对应的操作为“删除数据”。通常,网络攻击者会按照这些API接口类型的通常用法,发送非首次访问请求,但是,服务器101可以将某些通用的API接口所对应的功能进行改变,或取消某些API接口的功能,使API接口的调用方式发生变化,此时网络攻击者不容易知悉服务器101核心API接口的调用方式。例如,请求服务器101执行“删除数据”的操作,服务器101定义了该操作对应的API接口的字段为shanchu,而并非delete;相反,服务器101将delete字段对应的API接口为诱捕API接口;若服务器101接收到的当前非首次访问请求中,带有delete字段,则可以认为当前非首次访问请 求中,携带了不应该有的API接口字段,其携带的API接口与诱捕API接口是一致的,此时,可以对当前非首次访问请求进行捕获。
具体地,服务器101可以利用REST(Representational State Transfer,表现层状态转移)技术实现核心API接口的隐藏调用和设置诱捕API接口。
在服务器101判断当前非首次访问请求调用的API接口与预设的诱捕API接口不一致时,则不在该环节中进行捕获。服务器101可以设置一个或更多的诱捕API接口,具体可以根据实际需要而定。
在一些实施例中,访问请求捕获方法还包括:
在当前非首次访问请求携带有会话控制标识,且携带有辅助认证数据时,判断当前非首次访问请求携带的时间戳所对应的时间是否发生前移;
若是,则捕获当前非首次访问请求。
具体地,访问请求捕获方法可以包括:
响应于当前非首次访问请求携带有会话控制标识,且携带有辅助认证数据,判断当前非首次访问请求携带的时间戳所对应的时间是否发生前移;响应于当前非首次访问请求携带的时间戳所对应的时间发生前移,捕获当前非首次访问请求。
一般来说,网络攻击者可能会将服务器101已经接收过的访问请求再次发送给服务器101,以企图达到欺骗服务器101的目的,该手段主要用于身份认证过程,破坏认证的正确性。对于这种重放攻击,可以通过时间戳验证机制进行识别。具体地,服务器101可以对当前用户发送的首次访问请求和非首次访问请求所携带的时间戳进行存储,每次保存该当前用户最近发来的访问请求所携带的时间戳。在下一时刻,接收到当前非首次访问请求时,可以将当前非首次访问请求携带的时间戳与保存的上一次发来的访问请求所携带的时间戳进行比对,若当前非首次访问请求携带的时间戳对应的时间等于或早于上一次发来的访问请求所携带的时间戳所对应的时间,则认定当前非首次访问请求携带的时间戳所对应的时间发生前移,将当前非首次访问请求视为恶意请求,对当前非首次访问请求进行捕获。若当前非首次访问请求携带的时间戳所对应的时间不发生前移,则不在该环节中进行捕获。
在一些实施例中,访问请求捕获方法还包括:
在当前非首次访问请求携带有会话控制标识,且携带有辅助认证数据时,判断当前非首次访问请求携带的请求数据与预设的诱捕数据是否一致;
若是,则捕获当前非首次访问请求。
具体地,访问请求捕获方法可以包括:
确定当前非首次访问请求携带有会话控制标识,且携带有辅助认证数据;判断当前非首次访问请求携带的请求数据与预设的诱捕数据是否一致;响应于当前非首次访问请求携带的请求数据与预设的诱捕数据一致,捕获当前非首次访问请求。
前文提及,会话响应信息可以包括响应行、响应头部和响应体,同理,当前非首次访问请求也可以包括请求行、请求头部和请求体。一般来说,上述当前非首次访问请求携带的请求数据,其位置一般在请求体中。判断当前非首次访问请求携带的请求数据与预设的诱捕数据是否一致,具体可以是判断请求数据中的用户名与预设的诱捕数据中的用户名是否一致;当然,还可以判断请求数据中的其他位置字符与诱捕数据中的预设字符是否一致,在此不作过多展开。
以用户名比对作为例子,诱捕数据可以预设为username=test,password=123456。事实上,正常认证用户的用户名中,并不存在test。此时,若接收到的当前非首次访问请求中,携带了username=test,则可视为当前非首次访问请求是通过非正常手段发起的请求,可以执行对当前非首次访问请求的捕获。
若当前非首次访问请求携带的请求数据与预设的诱捕数据不是一致的,则不在该环节中进行捕获。
在一些实施例中,访问请求捕获方法还包括:
在当前非首次访问请求携带有会话控制标识,且携带有辅助认证数据时,判断当前非首次访问请求是否指示调用预设的虚假数据库的认证接口;
若是,则捕获当前非首次访问请求。
具体地,访问请求捕获方法可以包括:
响应于当前非首次访问请求携带有会话控制标识,且携带有辅助认证数据;判断当前非首次访问请求是否指示调用预设的虚假数据库的认证接口;响应于当前非首次访问请求指示调用预设的虚假数据库的认证接口,捕获当前非首次访问请求。
服务器101还可以主动将虚假数据库的登录端口、登录账号和登录密码进行散发,以使网络攻击者从服务器101返回的多次会话响应信息或其他途径获悉。该虚假数据库的认证接口是预设的,该虚假数据库中的数据可以是没有价值的。此时,若当前非首次访问请求中,携带了这些登录端口、登录账号和登录密码信息,指示调用虚假数据库的认证接口,企图对数据库进行非法访问或进行非法操作,则捕获当前非首次访问请求。这种方式,能辅助对当前用户的会话是否异常进行判断。若当前非首次访问请求没有指示调用预设的虚假数据库的认证接口,则不执行捕获。
在一些实施例中,访问请求捕获方法还包括:
在当前非首次访问请求携带有会话控制标识,且携带有辅助认证数据时,根据预设的执行顺序,执行以下的判断步骤:
判断当前非首次访问请求调用的API接口与预设的诱捕API接口是否一致,
判断当前非首次访问请求携带的时间戳所对应的时间是否发生前移,
判断当前非首次访问请求携带的请求数据与预设的诱捕数据是否一致,
判断当前非首次访问请求是否指示调用预设的虚假数据库的认证接口;
在以上任一判断步骤的结果为是时,停止执行后续的判断步骤,捕获当前非首次访问请求,并执行恶意请求处理操作。
具体地,访问请求捕获方法可以包括:
响应于当前非首次访问请求携带有会话控制标识,且携带有辅助认证数据;
根据预设的执行顺序,执行以下的判断步骤:
判断当前非首次访问请求调用的API接口与预设的诱捕API接口是否一致,
判断当前非首次访问请求携带的时间戳所对应的时间是否发生前移,
判断当前非首次访问请求携带的请求数据与预设的诱捕数据是否一致,
判断当前非首次访问请求是否指示调用预设的虚假数据库的认证接口;
响应于以上任一判断步骤的结果为是,停止执行后续的判断步骤,捕获当前非首次访问请求,并执行恶意请求处理操作。
对于当前用户的访问请求,除确认是否同时携带有会话控制标识和辅助认证数据时之外,还设置多个判断步骤,相当于设置了识别恶意请求的多道关卡,弥补了现有诱捕技术的局限性,使诱饵立体化散布,从而更好地作用于整个web系统。
需要注意的是,前述的判断步骤有四个,分别是:
(1)判断当前非首次访问请求调用的API接口与预设的诱捕API接口是否一致;
(2)判断当前非首次访问请求携带的时间戳所对应的时间是否发生前移;
(3)判断当前非首次访问请求携带的请求数据与预设的诱捕数据是否一致;
(4)判断当前非首次访问请求是否指示调用预设的虚假数据库的认证接口。
虽然判断步骤有四个,但对于某个当前非首次访问请求,并不一定需要全部地执行四个判断步骤,如果在其中一个判断步骤中,获得的判断结果为“是”,则说明当前非首次访问请求为恶意请求,此时捕获当前非首次访问请求,并执行恶意请求处理操作,其余未执行的判断步骤则不再执行。这样节省了服务器101的数据处理量,也提高了恶意请求识别的效率。
关于前述判断步骤的预设的执行顺序,可以根据实际需要进行调整。
一些实施例中,一种访问请求捕获方法,包括以下步骤:
在接收到当前用户的首次访问请求时,返回会话响应信息;
接收当前用户的当前非首次访问请求;
在当前非首次访问请求携带有会话控制标识,且未携带有辅助认证数据时,捕获当前非首次访问请求;
在当前非首次访问请求携带有会话控制标识,且携带有辅助认证数据时,判断当前非首次访问请求调用的API接口与预设的诱捕API接口是否一致,若是,则捕获当前非首次访问请求,并执行恶意请求处理操作,
若不是,则判断当前非首次访问请求携带的时间戳所对应的时间是否发生前移,若是,则捕获当前非首次访问请求,并执行恶意请求处理操作,
若不是,则判断当前非首次访问请求携带的请求数据与预设的诱捕数据是否一致,若是,则捕获当前非首次访问请求,并执行恶意请求处理操作,
若不是,则判断当前非首次访问请求是否指示调用预设的虚假数据库的认证接口;若是,则捕获当前非首次访问请求,并执行恶意请求处理操作,若不是,则根据当前非首次访问请求返回对应的响应信息。
在一些实施例中,执行恶意请求处理操作的步骤包括:
确定当前非首次访问请求对应的恶意访问等级,并更新与当前用户对应的恶意访问数据,恶意访问数据用于记录不同恶意访问等级对应的恶意访问次数;
在任一恶意访问等级对应的恶意访问次数达到相应的预设阈值时,执行限制访问操作。
前述的恶意访问数据其形式可以表现为表格。在一些更具体的情况下,恶意访问等级可以设置为三个级别,当前非首次访问请求若被捕获,则可以被归类为以下三种恶意访问请求中的一种:
(1)一级恶意访问请求:当前非首次访问请求携带的时间戳所对应的时间发生前移;
(2)二级恶意访问请求:当前非首次访问请求调用的API接口与预设的诱捕API接口一致,或当前非首次访问请求携带的请求数据与预设的诱捕数据一致,或当前非首次访问请求指示调用预设的虚假数据库的认证接口;
(3)三级恶意访问请求:当前非首次访问请求携带有会话控制标识,且未携带有辅助认证数据。
每一种访问请求对应于一个恶意访问等级。在任一恶意访问等级对应的恶意访问次 数达到相应的预设阈值时,执行限制访问操作。一般来说,新接收当前用户的一个恶意访问请求,可视为当前用户的恶意访问次数增加一次。
每一恶意访问等级可以对应地设置一个或多个预设阈值,相当于每一恶意访问请求出现的次数可以对应地设置一个或多个阈值,达到预设阈值时,执行限制访问操作。限制访问操作的方式包括登出账户或封禁IP(Internet Protocol,互联网协议)地址等,在此不作过多限制。
例如,对于一级恶意访问请求,在当前用户一级恶意访问请求的次数为1时,服务器101返回警告信息,在当前用户一级恶意访问请求的次数为10-50时,服务器101执行登出操作,在当前用户一级恶意访问请求的次数大于50时,服务器101执行封禁当前用户的IP地址的操作。
对于二级恶意访问请求,当前用户二级恶意访问请求的次数为1时,服务器101执行登出操作,在当前用户二级恶意访问请求的次数大于10时,服务器101执行封禁当前用户的IP地址的操作。
对于三级恶意访问请求,当前用户三级恶意访问请求的次数为1时,服务器101执行封禁当前用户的IP地址的操作。
另外,服务器101可以将不同用户的恶意访问数据进行备份,通过获取多个用户的恶意访问数据,统计不同恶意访问等级对应的恶意访问次数,根据统计结果,确定前述的四个判断步骤的执行顺序;例如一级恶意访问请求、二级恶意访问请求和三级恶意访问请求中,一级恶意访问请求对应的恶意访问总次数是最多时,将用于判断一级恶意访问请求的判断步骤的执行顺序设置为最先执行;二级恶意访问请求对应的恶意访问总次数相对较小时,将用于判断二级恶意访问请求的判断步骤的执行顺序设置为较晚执行。二级恶意访问请求中,有多个判断步骤,也可以根据统计结果,以对应的恶意访问请求次数作为排序依据,确定二级恶意访问请求中,不同判断步骤的执行顺序。
另外,还可以设置动态统计时段,根据每一动态动机时段获得的统计结果,更新四个判断步骤的执行顺序。例如,可以将一年的四个季度分别设置为四个动态统计时段,根据每一季的统计结果,更新四个判断步骤的执行顺序。
应该理解的是,虽然图2的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。而且,图2中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。 另外,本申请实施例提及的其他步骤,除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。
在一些实施例中,如图3所示,提供了一种访问请求捕获装置300,包括:
响应模块301,用于在接收到当前用户的首次访问请求时,返回会话响应信息;会话响应信息包括存放于不同位置的会话控制标识和辅助认证数据;
后续请求接收模块302,用于接收当前用户的当前非首次访问请求;
捕获模块303,用于在当前非首次访问请求携带有会话控制标识,且未携带有辅助认证数据时,捕获当前非首次访问请求。
在一些实施例中,响应模块301用于接收当前用户的首次访问请求,返回会话响应信息;捕获模块303用于响应于当前非首次访问请求携带有会话控制标识,且未携带有辅助认证数据,捕获当前非首次访问请求。
在一些实施例中,访问请求捕获装置300还包括API诱捕模块(未图示),API诱捕模块用于在当前非首次访问请求携带有会话控制标识,且携带有辅助认证数据时,判断当前非首次访问请求调用的API接口与预设的诱捕API接口是否一致,若是,则捕获当前非首次访问请求。
在一些实施例中,API诱捕模块用于响应于当前非首次访问请求携带有会话控制标识,且携带有辅助认证数据,判断当前非首次访问请求调用的API接口与预设的诱捕API接口是否一致,响应于当前非首次访问请求调用的API接口与预设的诱捕API接口一致,捕获当前非首次访问请求。
在一些实施例中,访问请求捕获装置300还包括重放诱捕模块(未图示),重放诱捕模块用于在当前非首次访问请求携带有会话控制标识,且携带有辅助认证数据时,判断当前非首次访问请求携带的时间戳所对应的时间是否发生前移,若是,则捕获当前非首次访问请求。
在一些实施例中,重放诱捕模块用于响应于当前非首次访问请求携带有会话控制标识,且携带有辅助认证数据,判断当前非首次访问请求携带的时间戳所对应的时间是否发生前移,响应于当前非首次访问请求携带的时间戳所对应的时间发生前移,捕获当前非首次访问请求。
在一些实施例中,访问请求捕获装置300还包括数据诱捕模块(未图示),数据诱捕模块用于在当前非首次访问请求携带有会话控制标识,且携带有辅助认证数据时,判断当前非首次访问请求携带的请求数据与预设的诱捕数据是否一致,若是,则捕获当前非首次访问请求。
在一些实施例中,数据诱捕模块用于响应于当前非首次访问请求携带有会话控制标识,且携带有辅助认证数据,判断当前非首次访问请求携带的请求数据与预设的诱捕数据是否一致,响应于当前非首次访问请求携带的请求数据与预设的诱捕数据一致,捕获当前非首次访问请求。
在一些实施例中,访问请求捕获装置300还包括数据库诱捕模块(未图示),数据库诱捕模块用于在当前非首次访问请求携带有会话控制标识,且携带有辅助认证数据时,判断当前非首次访问请求是否指示调用预设的虚假数据库的认证接口,若是,则捕获当前非首次访问请求。
在一些实施例中,数据库诱捕模块用于响应于当前非首次访问请求携带有会话控制标识,且携带有辅助认证数据,判断当前非首次访问请求是否指示调用预设的虚假数据库的认证接口,响应于当前非首次访问请求指示调用预设的虚假数据库的认证接口,捕获当前非首次访问请求。
在一些实施例中,访问请求捕获装置300还包括:
判断步骤执行控制模块(未图示),用于在当前非首次访问请求携带有会话控制标识,且携带有辅助认证数据时,根据预设的执行顺序,执行以下的判断步骤:
判断当前非首次访问请求调用的API接口与预设的诱捕API接口是否一致,
判断当前非首次访问请求携带的时间戳所对应的时间是否发生前移,
判断当前非首次访问请求携带的请求数据与预设的诱捕数据是否一致,
判断当前非首次访问请求是否指示调用预设的虚假数据库的认证接口;
判断结果处理模块(未图示),用于在以上任一判断步骤的结果为是时,停止执行后续的判断步骤,捕获当前非首次访问请求;
恶意请求处理模块(未图示),用于在捕获当前非首次访问请求时,执行恶意请求处理操作。
在一些实施例中,判断步骤执行控制模块用于响应于当前非首次访问请求携带有会话控制标识,且携带有辅助认证数据,根据预设的执行顺序,执行以下的判断步骤:
判断当前非首次访问请求调用的API接口与预设的诱捕API接口是否一致,
判断当前非首次访问请求携带的时间戳所对应的时间是否发生前移,
判断当前非首次访问请求携带的请求数据与预设的诱捕数据是否一致,
判断当前非首次访问请求是否指示调用预设的虚假数据库的认证接口。
判断结果处理模块用于响应于以上任一判断步骤的结果为是,停止执行后续的判断步骤,捕获当前非首次访问请求。
在一些实施例中,恶意请求处理模块包括:
恶意访问等级确定单元,用于确定当前非首次访问请求对应的恶意访问等级,并更新与当前用户对应的恶意访问数据;恶意访问数据用于记录不同恶意访问等级对应的恶意访问次数;
限制访问操作单元,用于在任一恶意访问等级对应的恶意访问次数达到相应的预设阈值时,执行限制访问操作。
在一些实施例中,限制访问操作单元用于响应于任一恶意访问等级对应的恶意访问次数达到相应的预设阈值,执行限制访问操作。
关于访问请求捕获装置的具体限定可以参见上文中对于访问请求捕获方法的限定,在此不再赘述。上述访问请求捕获装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一些实施例中,本申请实施例提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图4所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种访问请求捕获方法。
本领域技术人员可以理解,图4中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
在一些实施例中,本申请实施例提供的一种计算机设备,包括存储器及一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行前述任一实施例中访问请求捕获方法的步骤。
在一些实施例中,本申请实施例提供了一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行前述任一实施例中访问请求捕获方法的步骤。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通 过计算机可读指令来指令相关的硬件来完成,前述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请实施例所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (10)

  1. 一种访问请求捕获方法,其特征在于,包括:
    在接收到当前用户的首次访问请求时,返回会话响应信息,所述会话响应信息包括存放于不同位置的会话控制标识和辅助认证数据;
    接收所述当前用户的当前非首次访问请求;和
    在所述当前非首次访问请求携带有所述会话控制标识,且未携带有所述辅助认证数据时,捕获所述当前非首次访问请求。
  2. 根据权利要求1所述的方法,其特征在于,还包括:
    在所述当前非首次访问请求携带有所述会话控制标识,且携带有所述辅助认证数据时,判断所述当前非首次访问请求调用的API接口与预设的诱捕API接口是否一致;和
    在所述当前非首次访问请求调用的API接口与预设的诱捕API接口一致时,捕获所述当前非首次访问请求。
  3. 根据权利要求1所述的方法,其特征在于,还包括:
    在所述当前非首次访问请求携带有所述会话控
    制标识,且携带有所述辅助认证数据时,判断所述当前非首次访问请求携带的时间戳所对应的时间是否发生前移;和
    在发生前移时,捕获所述当前非首次访问请求。
  4. 根据权利要求1所述的方法,其特征在于,还包括:
    在所述当前非首次访问请求携带有所述会话控制标识,且携带有所述辅助认证数据时,判断所述当前非首次访问请求携带的请求数据与预设的诱捕数据是否一致;和
    在所述当前非首次访问请求携带的请求数据与预设的诱捕数据一致时,捕获所述当前非首次访问请求。
  5. 根据权利要求1所述的方法,其特征在于,还包括:
    在所述当前非首次访问请求携带有所述会话控制标识,且携带有所述辅助认证数据时,判断所述当前非首次访问请求是否指示调用预设的虚假数据库的认证接口;和
    在所述当前非首次访问请求指示调用预设的虚假数据库的认证接口时,捕获所述当前非首次访问请求。
  6. 根据权利要求1所述的方法,其特征在于,还包括:
    在所述当前非首次访问请求携带有所述会话控制标识,且携带有所述辅助认证数据 时,根据预设的执行顺序,执行以下的判断步骤:
    判断所述当前非首次访问请求调用的API接口与预设的诱捕API接口是否一致,
    判断所述当前非首次访问请求携带的时间戳所对应的时间是否发生前移,
    判断所述当前非首次访问请求携带的请求数据与预设的诱捕数据是否一致,
    判断所述当前非首次访问请求是否指示调用预设的虚假数据库的认证接口;
    在以上任一判断步骤的结果为是时,停止执行后续的判断步骤,捕获所述当前非首次访问请求;和
    在捕获所述当前非首次访问请求时,执行恶意请求处理操作。
  7. 根据权利要求6所述的方法,其特征在于,所述执行恶意请求处理操作,包括:
    确定所述当前非首次访问请求对应的恶意访问等级,并更新与所述当前用户对应的恶意访问数据,所述恶意访问数据用于记录不同恶意访问等级对应的恶意访问次数;和
    在任一所述恶意访问等级对应的恶意访问次数达到相应的预设阈值时,执行限制访问操作。
  8. 一种访问请求捕获装置,其特征在于,包括:
    响应模块,用于在接收到当前用户的首次访问请求时,返回会话响应信息,所述会话响应信息包括存放于不同位置的会话控制标识和辅助认证数据;
    后续请求接收模块,用于接收所述当前用户的当前非首次访问请求;和
    捕获模块,用于在所述当前非首次访问请求携带有所述会话控制标识,且未携带有所述辅助认证数据时,捕获所述当前非首次访问请求。
  9. 一种计算机设备,其特征在于,包括存储器及一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行如权利要求1至7中任一项所述方法的步骤。
  10. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如权利要求1至7中任一项所述的方法的步骤。
PCT/CN2022/074061 2021-09-26 2022-01-26 访问请求捕获方法、装置、计算机设备和存储介质 WO2023045196A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111126065.7A CN113572793B (zh) 2021-09-26 2021-09-26 访问请求捕获方法、装置、计算机设备和存储介质
CN202111126065.7 2021-09-26

Publications (1)

Publication Number Publication Date
WO2023045196A1 true WO2023045196A1 (zh) 2023-03-30

Family

ID=78174489

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/074061 WO2023045196A1 (zh) 2021-09-26 2022-01-26 访问请求捕获方法、装置、计算机设备和存储介质

Country Status (2)

Country Link
CN (1) CN113572793B (zh)
WO (1) WO2023045196A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113572793B (zh) * 2021-09-26 2021-12-21 苏州浪潮智能科技有限公司 访问请求捕获方法、装置、计算机设备和存储介质
CN114785637A (zh) * 2022-03-15 2022-07-22 浪潮云信息技术股份公司 一种api网关缓存响应数据的实现方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109413032A (zh) * 2018-09-03 2019-03-01 中国平安人寿保险股份有限公司 一种单点登录方法、计算机可读存储介质及网关
CN111666578A (zh) * 2020-06-08 2020-09-15 北京百度网讯科技有限公司 数据管理的方法、装置、电子设备及计算机可读存储介质
CN111814133A (zh) * 2020-05-27 2020-10-23 平安国际智慧城市科技股份有限公司 移动应用统一登录方法及装置
CN112422481A (zh) * 2019-08-22 2021-02-26 华为技术有限公司 网络威胁的诱捕方法、系统和转发设备
CN113572793A (zh) * 2021-09-26 2021-10-29 苏州浪潮智能科技有限公司 访问请求捕获方法、装置、计算机设备和存储介质

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030065919A1 (en) * 2001-04-18 2003-04-03 Albert Roy David Method and system for identifying a replay attack by an access device to a computer system
CN103905451B (zh) * 2014-04-03 2017-04-12 国网河南省电力公司电力科学研究院 一种智能电网嵌入式设备网络攻击诱捕系统和诱捕方法
US10187362B1 (en) * 2015-06-22 2019-01-22 Amazon Technologies, Inc. Secure streamlined provisioning of remote access terminals
CN107835155B (zh) * 2017-10-11 2020-11-24 飞天诚信科技股份有限公司 一种双认证保护方法及装置
CN108183907A (zh) * 2017-12-29 2018-06-19 浪潮通用软件有限公司 一种认证方法、服务器及认证系统
CN109379338A (zh) * 2018-09-19 2019-02-22 杭州安恒信息技术股份有限公司 一种Web应用系统SessionID攻击的识别方法
CN111865876B (zh) * 2019-04-29 2021-10-15 华为技术有限公司 网络的访问控制方法和设备
CN110310407A (zh) * 2019-06-05 2019-10-08 上海车轮互联网服务有限公司 基于用户行为监控的防刷票方法及装置
CN110493199A (zh) * 2019-07-26 2019-11-22 苏州浪潮智能科技有限公司 一种防止互联网Web攻击的方法和装置
CN112738109A (zh) * 2020-12-30 2021-04-30 杭州迪普科技股份有限公司 一种Web攻击的检测方法及装置
CN113411314B (zh) * 2021-05-26 2022-10-21 杭州安恒信息技术股份有限公司 引诱攻击者访问蜜罐系统的方法、装置和电子装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109413032A (zh) * 2018-09-03 2019-03-01 中国平安人寿保险股份有限公司 一种单点登录方法、计算机可读存储介质及网关
CN112422481A (zh) * 2019-08-22 2021-02-26 华为技术有限公司 网络威胁的诱捕方法、系统和转发设备
CN111814133A (zh) * 2020-05-27 2020-10-23 平安国际智慧城市科技股份有限公司 移动应用统一登录方法及装置
CN111666578A (zh) * 2020-06-08 2020-09-15 北京百度网讯科技有限公司 数据管理的方法、装置、电子设备及计算机可读存储介质
CN113572793A (zh) * 2021-09-26 2021-10-29 苏州浪潮智能科技有限公司 访问请求捕获方法、装置、计算机设备和存储介质

Also Published As

Publication number Publication date
CN113572793B (zh) 2021-12-21
CN113572793A (zh) 2021-10-29

Similar Documents

Publication Publication Date Title
US11695800B2 (en) Deceiving attackers accessing network data
US10326730B2 (en) Verification of server name in a proxy device for connection requests made using domain names
US9565177B2 (en) Network application security utilizing network-provided identities
US9112828B2 (en) Method for defending against session hijacking attacks and firewall
US20210014256A1 (en) Automated intelligent detection and mitigation of cyber security threats
US10270792B1 (en) Methods for detecting malicious smart bots to improve network security and devices thereof
WO2023045196A1 (zh) 访问请求捕获方法、装置、计算机设备和存储介质
US8312073B2 (en) CAPTCHA-free throttling
US11616812B2 (en) Deceiving attackers accessing active directory data
WO2018188558A1 (zh) 账号权限的识别方法及装置
WO2019062666A1 (zh) 一种实现安全访问内部网络的系统、方法和装置
US8904521B2 (en) Client-side prevention of cross-site request forgeries
US11770385B2 (en) Systems and methods for malicious client detection through property analysis
CN103139138A (zh) 一种基于客户端检测的应用层拒绝服务防护方法及系统
JP2016516250A (ja) 回復機能を有し、かつ復元可能な動的装置識別
CN113949579B (zh) 网站攻击防御方法、装置、计算机设备及存储介质
RU2601147C2 (ru) Система и способ выявления целевых атак
CN113438336B (zh) 网络请求方法、装置、设备和存储介质
Wedman et al. An analytical study of web application session management mechanisms and HTTP session hijacking attacks
CN114745145B (zh) 业务数据访问方法、装置和设备及计算机存储介质
CN116582365B (zh) 网络流量的安全控制方法、装置及计算机设备
US11128639B2 (en) Dynamic injection or modification of headers to provide intelligence
JP5743822B2 (ja) 情報漏洩防止装置及び制限情報生成装置
CN112637171A (zh) 数据流量处理方法、装置、设备、系统和存储介质
US20200213322A1 (en) Monitoring and preventing outbound network connections in runtime applications

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22871263

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 18564559

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE