A method and related apparatus for processing an access request

By intercepting and determining whether the target interface address of the client's access request is legitimate, the problem of not being able to intercept unauthorized attacks in a timely manner in existing technologies is solved, thus improving server data security.

CN119544346BActive Publication Date: 2025-12-19AGRICULTURAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411738936.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-12-19
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

Existing technologies cannot effectively and promptly intercept unauthorized attacks, leading to security issues with data resources on servers.

Method used

By intercepting client access requests, the system determines the target user's historical interface address and its redirection data, and judges whether the target interface address belongs to the candidate interface address of the historical interface address. If it does not belong, the access request is intercepted; otherwise, it is a legitimate request.

Benefits of technology

It enables timely and reliable interception of unauthorized attacks, improving the security of server data resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119544346B_ABST
    Figure CN119544346B_ABST
Patent Text Reader

Abstract

The application discloses an access request processing method and related device, and relates to the technical field of communication. The method is applied to a server, intercepts an access request sent by a client to the server, determines a target user initiating the access request and a target interface address to be accessed by the access request, obtains a historical interface address corresponding to a historical interface accessed by the target user last time, determines historical interface jump data corresponding to the historical interface address from interface jump data corresponding to different interface addresses stored in a code database, and the historical interface jump data comprises at least one candidate interface address to which the historical interface address can jump. If the target interface address does not belong to the at least one candidate interface address corresponding to the historical interface address, the access request is intercepted. The scheme of the application can effectively intercept the access request belonging to the unauthorized attack in time, and improves the data security in the server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to an access request processing method and related apparatus. Background Technology

[0002] With the continuous development of network technology, unauthorized attacks on servers are becoming increasingly common.

[0003] An unauthorized access attack refers to an attacker attempting to access data resources on a server that the attacker does not have the necessary permissions for. For example, some business interfaces on a server may only be accessible to administrators, while ordinary users, lacking such permissions, cannot access these interfaces. However, an attacker who is not an administrator can access these interfaces through other unauthorized means. Traditionally, the primary method for addressing unauthorized access attacks is through manual review of the server's code to identify security vulnerabilities. However, manual code review is time-consuming and cannot comprehensively identify all security vulnerabilities, thus failing to effectively and promptly intercept unauthorized access attacks, leading to security issues with the server's data resources. Summary of the Invention

[0004] In view of the above problems, this application provides an access request processing method and related apparatus, which can effectively and promptly intercept access requests that constitute unauthorized attacks and improve data security in the server.

[0005] On the one hand, this application provides an access request processing method applied to a server, including:

[0006] Intercept the access request sent by the client to the server, and determine the target user initiating the access request and the target interface address to be accessed by the access request;

[0007] Obtain the historical interface address corresponding to the historical interface last accessed by the target user;

[0008] From the interface jump data corresponding to different interface addresses stored in the code database, determine the historical interface jump data corresponding to the historical interface address. The historical interface jump data includes at least one candidate interface address that can be jumped to by the historical interface address.

[0009] If the target interface address does not belong to at least one candidate interface address corresponding to the historical interface address, the access request is intercepted.

[0010] Another possible implementation includes:

[0011] If the target interface address belongs to at least one candidate interface address corresponding to the historical interface address, it is determined that the access request is a legal access request, and in response to the access request, the historical interface address corresponding to the historical interface last accessed by the target user is updated to the target interface address.

[0012] In yet another possible implementation, the method further includes:

[0013] If the historical interface address corresponding to the historical interface last accessed by the target user does not exist, it is determined that the access request is a legal access request, and in response to the access request, the target interface address is stored as the historical interface address corresponding to the historical interface last accessed by the target user.

[0014] In yet another possible implementation, the method further includes:

[0015] obtaining a user identifier of a target user and a target interface address to be accessed carried in the access request;

[0016] The obtaining of the historical interface address corresponding to the historical interface last accessed by the target user includes:

[0017] querying, from the last interface access information corresponding to different user identifiers, the last interface access information corresponding to the user identifier of the target user, the last interface access information corresponding to the user identifier of the target user including the historical interface address corresponding to the historical interface last accessed by the target user.

[0018] In yet another possible implementation, the interface jump data corresponding to different interface addresses in the code database is obtained in the following manner:

[0019] obtaining project source code uploaded by a user;

[0020] determining at least one interface address in the project source code, a page file of at least one access page, and a page list corresponding to the interface address, the page list including a page identifier of at least one access page to which the interface address can jump;

[0021] For each access page, based on the page file of the access page, a first interface address list to which the access page can link is determined, the first interface address list including at least one interface address to which the access page can link;

[0022] For each interface address, based on the page identifier of at least one access page that the interface address can jump to and at least one interface address that each access page can link to, a second list of interface addresses that the interface address can jump to is determined, and the second list of interface addresses is determined as the interface jump data corresponding to the interface address. The second list of interface addresses includes at least one interface address.

[0023] In another possible implementation, determining at least one interface address, at least one page file for accessing a page, and a list of pages corresponding to the interface address in the project source code includes:

[0024] The abstract syntax tree algorithm is used to parse the syntax tree corresponding to the source code of the project. The syntax tree includes nodes corresponding to different elements in the source code of the project.

[0025] Based on the nodes representing interface addresses in the syntax tree, at least one interface address included in the project source code is determined, and a list of pages that the interface address can jump to is extracted from the project source code.

[0026] Based on the nodes representing accessed pages in the syntax tree, at least one page file for accessing a page is identified in the project source code.

[0027] In another possible implementation, the method includes, either simultaneously with or after intercepting the access request:

[0028] Send an unauthorized access warning to the target user's client, the warning indicating that the target user does not have permission to access the target interface address.

[0029] Another possible implementation includes:

[0030] If the communication connection between the client and the server is detected to be broken, delete the historical interface address corresponding to the historical interface last accessed by the target user stored in the server.

[0031] Furthermore, this application also provides an access request processing apparatus, applied to a server, comprising:

[0032] The request interception unit is used to intercept the access request sent by the client to the server, and determine the target user initiating the access request and the target interface address to be accessed by the access request.

[0033] The information acquisition unit is used to obtain the historical interface address corresponding to the historical interface last accessed by the target user;

[0034] The jump determination unit is configured to determine, from interface jump data corresponding to different interface addresses stored in the code database, historical interface jump data corresponding to the historical interface address, wherein the historical interface jump data comprises at least one candidate interface address to which the historical interface address can jump.

[0035] The request interception unit is configured to intercept the access request if the target interface address does not belong to the at least one candidate interface address corresponding to the historical interface address.

[0036] In another aspect, the application further provides a server, comprising a processor and a memory.

[0037] The processor is configured to execute the access request processing method according to any one of the preceding aspects.

[0038] The memory is configured to store programs required by the processor for execution.

[0039] As can be seen from the above, the application can intercept an access request sent by a client to a server after the server receives the access request, and determine a target user initiating the access request and a target interface address to be accessed by the access request. On this basis, considering that the target user has accessed a historical interface last time, the interface address to be accessed by the access request initiated by the target user legally can only be an interface address to which the historical interface address corresponding to the historical interface can jump. Therefore, if the target interface address to be accessed by the access request does not belong to the interface address to which the historical interface address accessed by the target user last time can jump, it can be determined that the access request belongs to an unauthorized attack, so that the unauthorized attack can be intercepted in time and reliably, and the security of data resources in the server is improved. BRIEF DESCRIPTION OF DRAWINGS

[0040] The above and other features, advantages, and aspects of the present disclosure will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings in which:

[0041] Figure 1 A flowchart of an access request processing method provided by the application;

[0042] Figure 2 Another flowchart of an access request processing method provided by the application;

[0043] Figure 3 An implementation flowchart of determining interface jump data corresponding to different interface addresses in a code database in the application;

[0044] Figure 4 Fig. 1 is a schematic diagram of an implementation framework of the access request processing method provided by the present application;

[0045] Figure 5 Fig. 2 is a schematic diagram of a component structure of the access request processing apparatus provided by the present application;

[0046] Figure 6 Fig. 3 is a schematic diagram of a component architecture of the server provided by the present application. DETAILED DESCRIPTION

[0047] The embodiments of the present application are described below with reference to the accompanying drawings. The terms used in the implementation part of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application. It is known to those skilled in the art that, with the development of technology and the appearance of new scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0048] The terms "first", "second", and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged under appropriate circumstances, which is only a distinguishing way used in the description of the embodiments of the present application to describe the objects with the same attributes. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, so that the processes, methods, systems, products or equipment containing a series of units do not necessarily limit to those units, but can include other units not clearly listed or inherent to these processes, methods, products or equipment.

[0049] As Figure 1 , a schematic diagram of a flow of the access request processing method provided by the present application is shown, the method of the present embodiment can be applied to a server, which can provide a variety of interface functions corresponding to business services. The method of the present embodiment can include:

[0050] S101, intercepting an access request sent by a client to a server, determining a target user initiating the access request and a target interface address to be accessed by the access request.

[0051] As in a possible implementation, the present application can add an interception code on the server side, intercept the access request to the server through the interception code, and perform subsequent processing to analyze and intercept the access request for privilege escalation attack.

[0052] The target user is a user who initiates an access request to the server through a client. The target interface address to be accessed by the access request is an interface address indicated by the access request. It can be understood that the interface address to be accessed by the access request will be different according to the timing of the access request initiated by the client of the target user. The interface address to be accessed by the access request can point to any page in the server, which is determined according to the actual access situation and is not limited.

[0053] As mentioned above, the access request can carry the user identifier of the target user who initiates the access request and the target interface address to be accessed by the access request. On this basis, after intercepting the access request, the user identifier of the target user and the target interface address to be accessed carried in the access request can be obtained.

[0054] S102, obtaining a historical interface address corresponding to a historical interface accessed by the target user last time.

[0055] The historical interface address corresponding to the historical interface accessed by the target user last time is the interface address accessed by the target user last time before obtaining the access request. In order to distinguish, the interface accessed by the target user last time is called a historical interface, and the address of the historical interface is called a historical interface address.

[0056] It can be understood that the historical interface address accessed by the target user last time can be stored in the server at the same time or after the server responds to the historical access request initiated by the target user last time.

[0057] It can be understood that in order to enable the target user to access different interfaces in the server, the target user needs to log in to the server through a client, that is, the target user establishes a communication connection with the server through the client. On the basis of the communication connection established between the client of the target user and the server, the target user can initiate different access requests to the server, and the interfaces accessible by the target user will be related to the page address accessed by the target user last time. Based on this, the historical interface accessed by the target user last time and the access request initiated by the target user are both implemented based on the communication connection currently established between the client of the target user and the server.

[0058] S103, determining historical interface jump data corresponding to the historical interface address from interface jump data corresponding to different interface addresses stored in the code database.

[0059] The interface jump data corresponding to each interface address can include at least one interface address to which the interface address can jump. Correspondingly, the historical interface jump data includes at least one interface address to which the historical interface address can jump. For the convenience of distinction, the interface address to which the historical interface address can jump is referred to as a candidate interface address.

[0060] It can be understood that one interface address can be associated with multiple access pages. For example, the interface address is an interface address for implementing password or identity authentication, which can be associated with a main page of successfully logging into a server, a failed prompt page of password or identity authentication, and the like. Each access page associated with the interface address can have one or more link addresses, and each link address corresponds to an interface address to which the access page can jump.

[0061] Based on this, in any one access page associated with the interface address, the user can only access the interface address to which the access page can jump, and cannot access other interface addresses that cannot be jumped from the access page. That is, under the premise that the user legally accesses the server, if the user accesses a certain interface address, the user can only access a certain interface address to which the interface address can jump next time.

[0062] The code database is a database for implementing code management and version control, and based on this, the code database at least stores project source code corresponding to a service business that the server can provide.

[0063] In the present application, the code database also stores interface jump data corresponding to different interface addresses, and the interface jump data corresponding to each interface address can be obtained by analyzing the project source code stored in the code database in advance. The specific implementation of analyzing the interface jump data corresponding to each interface address from the project source code can have multiple possibilities, which are not limited in the present application.

[0064] In a possible implementation, the interface jump data corresponding to the interface address can be an interface jump state machine, and the interface jump state machine corresponding to the interface address is configured with at least one interface address to which the interface address can jump.

[0065] S104, if the target interface address does not belong to the at least one candidate interface address corresponding to the historical interface address, intercepting the access request.

[0066] As can be known from the foregoing, under the premise that the interface address accessed by the target user last time is the historical interface address, if the target user initiates the access request legally, then the target interface address requested to be accessed in the access request can only be one of the candidate interface addresses to which the historical interface address can jump. Conversely, if the target interface address does not belong to the at least one candidate interface address corresponding to the historical interface address, it means that the target interface address requested to be accessed in the access request is not an interface address that can be legally accessed by the target user, that is, it means that the access request is an unauthorized attack access, and thus the access request needs to be intercepted.

[0067] The purpose of intercepting the access request is to make the server no longer respond to the access request. For example, intercepting the access request can be discarding the access request, and of course, there can be other processing modes, which are not limited.

[0068] Further, the application can also send an unauthorized reminder to the client of the target user at the same time or after intercepting the access request, and the unauthorized reminder is used to prompt the target user that the target user does not have the access right to the target interface address.

[0069] As can be known from the foregoing, the application can intercept the access request sent by the client to the server after the server receives the access request, and determine the target user initiating the access request and the target interface address to be accessed by the access request. On this basis, considering that under the premise that the target user accessed the historical interface last time, the target user legally initiates the access request to be accessed to the interface address that can be jumped to by the historical interface address corresponding to the historical interface, therefore, if the target interface address to be accessed by the access request does not belong to the interface address that can be jumped to by the historical interface address accessed by the target user last time, then it can be determined that the access request belongs to an unauthorized attack, so that the unauthorized attack can be intercepted in time and reliably, and the security of the data resources in the server is improved.

[0070] It can be understood that if the target interface address belongs to the at least one candidate interface address corresponding to the historical interface address, then it can be determined that the access request is a legal access request, and on this basis, the server can respond to the access request. The specific processing required by the server in response to the access request can be different according to different access requests, which are not limited. For example, the interception program can transmit the access request to the corresponding service program in the server, and process the access request through the service program.

[0071] Further, in order to determine whether the next initiated access request is an unauthorized access request, if the target interface address belongs to the at least one candidate interface address corresponding to the historical interface address, the historical interface address corresponding to the historical interface accessed by the target user last time is updated to the target interface address corresponding to the access request at the same time or after responding to the access request.

[0072] It can be understood that if the historical interface address corresponding to the historical interface accessed by the target user last time does not exist in the server, it means that the intercepted access request is the first access request initiated by the client after establishing a communication connection with the server. In this case, since the first access request initiated by the client is generally an access request for requesting to log in to the server or for identity verification, the interface address requested to be accessed by the access request is not associated with important data resources in the server, and thus the access request can be considered as a legal or safe access request.

[0073] Correspondingly, if the historical interface address corresponding to the historical interface accessed by the target user last time does not exist, it can be determined that the access request is a legal access request, and the access request is responded to.

[0074] Further, in order to determine whether the next initiated access request is an unauthorized access request, if the target interface address belongs to the at least one candidate interface address corresponding to the historical interface address, the historical interface address corresponding to the historical interface accessed by the target user last time is updated to the target interface address corresponding to the access request at the same time or after responding to the access request.

[0075] The access request processing method provided by the present application will be introduced below taking an implementation manner as an example. As shown in FIG. 1, another flowchart of the access request processing method provided by the present application is shown, and the method of the present embodiment can include the following steps. Figure 2

[0076] S201, intercepting an access request sent by a client to a server, obtaining a user identifier of a target user and a target interface address to be accessed carried in the access request.

[0077] The user identifier of the target user is used to uniquely identify the target user. For example, the user identifier of the target user can be a username of the target user or a hash value of the username, and the like, which is not limited.

[0078] S202, querying whether there is last interface access information corresponding to the user identifier of the target user from last interface access information corresponding to different user identifiers, if yes, performing step S203; if no, performing step S206. ​

[0079] The last interface access information corresponding to the user identifier of the target user comprises a historical interface address corresponding to a historical interface accessed by the target user last time.

[0080] The last interface access information can comprise the user identifier of the target user, and the historical interface address corresponding to the historical interface accessed by the target user last time.

[0081] S203, if the last interface access information corresponding to the user identifier of the target user is queried, based on the historical interface address in the last interface access information, historical interface jump data corresponding to the historical interface address is determined from interface jump data corresponding to different interface addresses stored in the code database.

[0082] The historical interface jump data comprises at least one candidate interface address to which the historical interface address can jump.

[0083] The code database stores interface jump state machines corresponding to different interface addresses, and based on this, an interface jump state machine corresponding to the historical interface address can be determined, and the interface jump state machine is configured with at least one candidate interface address to which the historical interface address can jump.

[0084] S204, if the target interface address does not belong to the at least one candidate interface address corresponding to the historical interface address, the access request is intercepted.

[0085] S205, if the target interface address belongs to the at least one candidate interface address corresponding to the historical interface address, it is determined that the access request is a legal access request, and in response to the access request, the target interface address is stored as the last interface access information corresponding to the user identifier of the target user.

[0086] It can be understood that after obtaining the user identifier of the target user and the target interface address to be accessed by the access request, the user identifier of the target user and the target interface address can be determined as the current interface access information. On this basis, while or after responding to the access request, the current interface access information can be stored as the last interface access information, that is, the last interface access information is updated to the current interface access information.

[0087] S206, if there is no last interface access information corresponding to the user identifier of the target user, it is determined that the access request is a legal access request, and in response to the access request, the target interface address is stored as the last interface access information corresponding to the user identifier of the target user.

[0088] The step can refer to the related introduction of the foregoing embodiments, and will not be described again.

[0089] It can be understood that in any one of the above embodiments of the present application, after the communication connection between the target user's client and the server is disconnected, if the target user's client initiates a request to the client again subsequently, the communication connection between the client and the server needs to be re-established, and the access request initiated by the client is the first access request after the communication connection is established, and there is naturally no historical interface address of the last access. Based on this, in order to avoid misjudgment, when it is detected that the communication connection between the client and the server is disconnected, the historical interface address corresponding to the historical interface of the last access of the target user stored in the server is deleted.

[0090] It can be understood that the specific implementation of generating interface jump data corresponding to different interface addresses in the code database in the present application can have multiple possibilities. The following will be described taking an implementation manner as an example.

[0091] As Figure 3 , an implementation flowchart of determining interface jump data corresponding to different interface addresses in the code database in the present application is shown, and the method of the embodiment can include:

[0092] S301, obtaining project source code uploaded by a user.

[0093] The project source code is the source code corresponding to a service program required for the server to implement a corresponding service.

[0094] S302, determining at least one interface address in the project source code, at least one page file of an access page, and a page list corresponding to each interface address.

[0095] The page list includes the page identifier of at least one access page to which the interface address can jump.

[0096] It can be understood that the project source code can include the interface address of the interface that can be provided by the service program, the page file resource path information related to each interface address, and the page file corresponding to the access page that can be exhibited by the service program. Therefore, by parsing the project source file, each interface address, the page file of the access page, and the page list corresponding to each interface address can be extracted from the project source file.

[0097] As in a possible implementation, an Abstract Syntax Tree (AST) algorithm can be used to parse the syntax tree corresponding to the project source code. The syntax tree includes nodes corresponding to different elements in the project source code. The elements in the project source code can include, but are not limited to, pages and interfaces included in the project source code. On this basis, based on the node representing the interface address in the syntax tree, at least one interface address included in the project source code can be determined, and the page list that each interface address can jump to can be extracted from the project source code.

[0098] Similarly, based on the node representing the access page in the syntax tree, at least one page file of the access page included in the project source code can be determined. The access page included in the project source code can be determined through the syntax tree, and the storage location of the page text corresponding to the access page can also be obtained, so that the page file in the access page can be extracted. The page file of the access page can include the code related to the access page, and therefore, the page file can include information of at least one interface address that can be linked in the access page.

[0099] The class, method, and statement in the project source code can be parsed through the AST algorithm to construct the syntax tree of the project source code, and the process of constructing the syntax tree is not limited.

[0100] S303, for each access page, based on the page file of the access page, determining a first interface address list that the access page can link to.

[0101] The first interface address list includes at least one interface address that the access page can link to.

[0102] For the sake of distinction, the interface address list that the access page can link to is referred to as the first interface address list, and the interface address list that the subsequent interface address can jump to is referred to as the second interface address list.

[0103] As introduced above, the page file of the access page can include the interface address that the access request can link to, and therefore, based on the page file, the first interface address list composed of each interface address that the access page can link to can be determined.

[0104] For example, the code database can run an entry tool and an analysis tool, the entry tool and the analysis tool are different programs respectively, the entry tool can obtain a page list of each interface address based on a target source code, and a list of at least one interface address linkable by each access page, and send the page list of each interface address and the list of at least one interface address linkable by each access page to the analysis tool, so that the analysis tool executes step S304 to determine a list of second interface addresses to which each interface address can jump.

[0105] S304, for each interface address, based on the page identifier of at least one access page to which the interface address can jump and the at least one interface address linkable by each access page, determine a list of second interface addresses to which the interface address can jump, and the list of second interface addresses is the interface jump data corresponding to the interface address.

[0106] Wherein, the list of second interface addresses includes at least one interface address.

[0107] It can be understood that after the page identifier of each access page to which each interface address can jump is determined, for the page identifier of each access page to which the interface access address can jump, at least one interface address linkable by the access request can be determined based on the page identifier of the access page, so that at least one interface address to which the interface address can jump based on the access page can be obtained. On this basis, all access pages to which the interface address can jump can jump to interface addresses respectively, which constitutes the list of second interface addresses.

[0108] It can be understood that after the interface jump data of each interface address is determined, the application can also send a release confirmation request to the terminal of the developer, the release confirmation request is used to request the developer to confirm whether to release the interface jump data of each interface address. After receiving the release confirmation indication sent by the terminal of the developer, the interface jump data corresponding to each interface address is stored in the code database, so that subsequent analysis of whether the access request belongs to the unauthorized attack based on the interface jump data of each interface address.

[0109] It can be understood that, Figure 3 Only one implementation of determining the interface jump data corresponding to each interface address in the art, other implementations of analyzing the project source code to determine the interface jump data corresponding to each interface address are also applicable to the embodiment.

[0110] In order to facilitate understanding of the complete implementation of the application, please refer to Figure 4 ,The implementation framework schematic diagram of the scheme of the application is shown. Figure 4

[0111] by Figure 4It can be seen that after the developer develops the project source code, the project source code can be uploaded to the code database. Based on the project source code in the code database, the code interface information data and the page information data are determined. Among them, the code interface information data can be a page list corresponding to each interface address, and the page information data is a first interface address list corresponding to each access page. On this basis, in the code database, the data of the interface jump state machine corresponding to each interface address can be determined based on the page information data and the code interface information data.

[0112] On this basis, the interface jump state machine corresponding to each interface address can be used as a basis for the server interception tool to determine whether the access request of the screenshot belongs to an unauthorized attack. Correspondingly, if it is determined based on the interface jump state machine corresponding to each interface address that the access request is a normal access request, the access request can be released; otherwise, the access request belonging to the exception will be intercepted.

[0113] In another aspect, the application also provides an access request processing apparatus.

[0114] As shown in Figure 5 , a component structure schematic diagram of an access request processing apparatus provided by the application is shown, and the apparatus of the embodiment can be applied to a server. The apparatus can include:

[0115] The request interception unit 501 is configured to intercept an access request sent by a client to the server, determine a target user initiating the access request and a target interface address to be accessed by the access request;

[0116] The information obtaining unit 502 is configured to obtain a historical interface address corresponding to a historical interface accessed by the target user last time;

[0117] The jump determination unit 503 is configured to determine, from interface jump data corresponding to different interface addresses stored in the code database, historical interface jump data corresponding to the historical interface address, wherein the historical interface jump data includes at least one candidate interface address that can be jumped to by the historical interface address;

[0118] The request interception unit 504 is configured to intercept the access request if the target interface address does not belong to the at least one candidate interface address corresponding to the historical interface address.

[0119] In another possible implementation, the access request processing apparatus further includes:

[0120] The first response unit is configured to determine that the access request is a legal access request if the target interface address belongs to at least one candidate interface address corresponding to the historical interface address, and update the historical interface address corresponding to the historical interface where the target user last accessed to the target interface address in response to the access request.

[0121] In yet another possible implementation, the access request processing apparatus further includes:

[0122] The second response unit is configured to determine that the access request is a legal access request if there is no historical interface address corresponding to the historical interface where the target user last accessed, and store the target interface address as the historical interface address corresponding to the historical interface where the target user last accessed in response to the access request.

[0123] In yet another possible implementation, the request interception unit includes:

[0124] The request interception sub-unit is configured to intercept an access request sent by a client to the server, and obtain a user identifier of a target user and a target interface address to be accessed carried in the access request.

[0125] The information obtaining unit includes:

[0126] The information obtaining sub-unit is configured to query, from the last interface access information corresponding to different user identifiers, the last interface access information corresponding to the user identifier of the target user, the last interface access information corresponding to the user identifier of the target user including a historical interface address corresponding to the historical interface where the target user last accessed.

[0127] In yet another possible implementation, the apparatus further includes a jump data determination unit configured to determine the interface jump data corresponding to different interface addresses in the code database in the following manner:

[0128] Obtain project source code uploaded by a user.

[0129] Determine at least one interface address in the project source code, a page file of at least one access page, and a page list corresponding to the interface address, the page list including a page identifier of at least one access page to which the interface address can jump.

[0130] For each access page, determine a first interface address list to which the access page can link based on the page file of the access page, the first interface address list including at least one interface address to which the access page can link.

[0131] For each interface address, based on the page identifier of at least one access page that can be jumped to by the interface address and at least one interface address that can be linked to by each access page, a second interface address list that can be jumped to by the interface address is determined, and the second interface address list is interface jump data corresponding to the interface address, and the second interface address list includes at least one interface address.

[0132] In yet another possible implementation, the jump data determination unit, when determining the at least one interface address in the project source code, the page file of the at least one access page, and the page list corresponding to the interface address, is specifically configured to:

[0133] The abstract syntax tree algorithm is used to parse the syntax tree corresponding to the project source code, and the syntax tree includes nodes corresponding to different elements in the project source code;

[0134] Based on the node representing the interface address in the syntax tree, at least one interface address included in the project source code is determined, and a page list that can be jumped to by the interface address is extracted from the project source code;

[0135] Based on the node representing the access page in the syntax tree, a page file of at least one access page included in the project source code is determined.

[0136] In yet another possible implementation, the device further includes:

[0137] The prompt sending unit is configured to send an unauthorized prompt to the client of the target user at the same time or after the request interception unit intercepts the access request, and the unauthorized prompt is used to prompt that the target user does not have the permission to access the target interface address.

[0138] In yet another possible implementation, the device further includes:

[0139] The information deleting unit is configured to detect that the communication connection between the client and the server is disconnected, and delete the historical interface address corresponding to the historical interface accessed by the target user last time and stored in the server.

[0140] The present application also provides a server. As shown in Figure 6 The server includes a processor 601 and a memory 602.

[0141] The processor 601 is configured to execute the access request processing method according to any one of the above embodiments.

[0142] The memory 602 is configured to store programs required by the processor for operation.

[0143] It can be understood that the electronic device can further include a display unit 603 and an input unit 604.

[0144] Of course, the electronic device can also have more or less components, without limitation. Figure 6

[0145] The embodiment of the present application also provides a computer program product, which includes computer readable instructions, when the computer readable instructions run on the electronic device, the electronic device realizes any access request processing method provided by the embodiment of the present application.

[0146] The embodiment of the present application also provides a computer readable storage medium, the storage medium carries one or more computer programs, when the one or more computer programs are executed by the electronic device, the electronic device can realize any access request processing method provided by the embodiment of the present application.

[0147] In addition, it should be noted that the apparatus embodiments described above are only schematic, wherein the units as described separately can or can not be physically separate, and the components as shown as units can or can not be physical units, that is, they can be located in one place or distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment. In addition, the connection between the modules in the apparatus embodiment provided by the present application indicates that there is a communication connection between them, which can be realized as one or more communication buses or signal lines.

[0148] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be realized by means of software and necessary general hardware, of course, it can also be realized by special hardware including special integrated circuit, special CPU, special memory, special component, etc. Generally, functions completed by computer programs can be easily realized by corresponding hardware, and specific hardware structures for realizing the same function can also be various, such as analog circuit, digital circuit or special circuit, etc. However, for the present application, software program implementation is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of software product, which is stored in readable storage medium, such as computer floppy disk, U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., including a plurality of instructions to make a computer device (which can be personal computer, training device or network device, etc.) execute the method described in each embodiment of the present application.

[0149] ​In the above embodiments, the implementation can be wholly or partially by software, hardware, firmware, or any combination thereof. When implemented by software, the implementation can be wholly or partially in the form of a computer program product.

[0150] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are wholly or partially generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another, for example, the computer instructions can be transmitted from one website, computer, training device or data center to another website, computer, training device or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. integrated with one or more available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)), etc.

Claims

1. An access request processing method characterized by comprising: Applied to a server, comprising: intercepting an access request sent by a client to the server, determining a target user initiating the access request and a target interface address to be accessed by the access request; obtaining a historical interface address corresponding to a historical interface accessed by the target user last time; determining historical interface jump data corresponding to the historical interface address from interface jump data corresponding to different interface addresses stored in a code database, the historical interface jump data including at least one candidate interface address to which the historical interface address can jump; if the target interface address does not belong to the at least one candidate interface address corresponding to the historical interface address, intercepting the access request.

2. The access request processing method according to claim 1, characterized by, Further comprising: if the target interface address belongs to the at least one candidate interface address corresponding to the historical interface address, determining that the access request is a legal access request, responding to the access request, and updating the historical interface address corresponding to the historical interface accessed by the target user last time to the target interface address.

3. The access request processing method of claim 1, wherein, Further comprising: if there is no historical interface address corresponding to a historical interface accessed by the target user last time, determining that the access request is a legal access request, responding to the access request, and storing the target interface address as the historical interface address corresponding to the historical interface accessed by the target user last time.

4. The access request processing method according to any one of claims 1 to 3, characterized by, The determination of the target user initiating the access request and the target interface address to be accessed by the access request comprises: obtaining a user identifier of the target user and the target interface address to be accessed carried in the access request; The obtaining of the historical interface address corresponding to the historical interface accessed by the target user last time comprises: querying, from last interface access information corresponding to different user identifiers, last interface access information corresponding to the user identifier of the target user, the last interface access information corresponding to the user identifier of the target user including the historical interface address corresponding to the historical interface accessed by the target user last time.

5. The access request processing method of claim 1, wherein, The interface jump data corresponding to different interface addresses in the code database is obtained in the following manner: obtaining project source code uploaded by a user; determining at least one interface address in the project source code, page files of at least one access page, and a page list corresponding to the interface address, the page list including page identifiers of at least one access page to which the interface address can jump; for each access page, determining a first interface address list linkable by the access page based on the page file of the access page, the first interface address list including at least one interface address linkable by the access page; for each interface address, determining a second interface address list to which the interface address can jump based on the page identifiers of at least one access page to which the interface address can jump and at least one interface address linkable by each access page, and determining the second interface address list as interface jump data corresponding to the interface address, the second interface address list including at least one interface address.

6. The access request processing method according to claim 5, wherein The determining the at least one interface address in the project source code, the page file of the at least one access page, and the page list corresponding to the interface address comprises: The abstract syntax tree algorithm is used to parse the syntax tree corresponding to the project source code, and the syntax tree comprises nodes corresponding to different elements in the project source code; Based on the node representing the interface address in the syntax tree, at least one interface address included in the project source code is determined, and a page list that can be jumped to by the interface address is extracted from the project source code; Based on the node representing the access page in the syntax tree, a page file of at least one access page included in the project source code is determined.

7. The access request processing method of claim 1, wherein, The access request is intercepted at the same time or after, and further comprising: Sending an unauthorized reminder to the client of the target user, the unauthorized reminder is used to prompt the target user that the target user does not have the access right of the target interface address.

8. The access request processing method according to any one of claims 1 to 3, characterized by, Further comprising: Detecting that the communication connection between the client and the server is disconnected, and deleting the historical interface address corresponding to the historical interface accessed by the target user last time stored in the server.

9. An access request processing apparatus characterized by comprising: Applied to the server, comprising: A request interception unit is configured to intercept an access request sent by a client to the server, determine a target user initiating the access request and a target interface address to be accessed by the access request; An information obtaining unit is configured to obtain a historical interface address corresponding to a historical interface accessed by the target user last time; A jump determination unit is configured to determine historical interface jump data corresponding to the historical interface address from interface jump data corresponding to different interface addresses stored in a code database, the historical interface jump data comprising at least one candidate interface address that can be jumped to by the historical interface address; A request interception unit is configured to intercept the access request if the target interface address does not belong to the at least one candidate interface address corresponding to the historical interface address.

10. A server, characterized by Comprising: A processor and a memory; The processor is configured to execute the access request processing method in any one of claims 1 to 8; The memory is configured to store programs required by the processor for operation.

Citation Information

Patent Citations

  • Abnormal access behavior detection method and device, electronic equipment and storage medium

    CN108665297A

  • Intelligent analysis method and system for unauthorized access vulnerabilities

    CN117376005A