WO2020000723A1 - 越权漏洞检测方法和装置 - Google Patents
越权漏洞检测方法和装置 Download PDFInfo
- Publication number
- WO2020000723A1 WO2020000723A1 PCT/CN2018/107641 CN2018107641W WO2020000723A1 WO 2020000723 A1 WO2020000723 A1 WO 2020000723A1 CN 2018107641 W CN2018107641 W CN 2018107641W WO 2020000723 A1 WO2020000723 A1 WO 2020000723A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- service request
- service
- account
- business
- returned data
- Prior art date
- Legal status (The legal status 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 status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2221/00—Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/21—Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/2141—Access rights, e.g. capability lists, access control lists, access tables, access matrices
Definitions
- the present application relates to the field of computer technology, and in particular, to a method and a device for detecting unauthorized loopholes.
- Unauthorized vulnerability is a common security vulnerability in web applications. It means that due to the negligence of the programmer, there is no strict restriction on the permissions or users required for an operation. As a result, users who should not have the operation permissions can operate normally.
- the threat lies in that one user can control the user data of the entire site, that is, an attacker can use illegal accounts to perform illegal operations on other account data with unauthorized flaws, such as querying, inserting, deleting, and modifying conventional database commands.
- Unauthorized vulnerabilities are a type of business logic vulnerability that cannot be defensive and hardened through external web application firewalls (WAF) and often involve user privacy data. Once discovered, the impact on the system will be significant.
- WAF web application firewalls
- the detection of unauthorized access vulnerabilities is generally performed through manual manual detection of unauthorized access vulnerabilities. By manually logging in to an account and modifying the account ID, a comparison analysis is performed according to different account ID return requests to determine whether there are unauthorized access vulnerabilities. The detection efficiency is low and there are errors. Sentenced situation.
- the present application provides a method and device for detecting unauthorized loopholes, and solves the problems of low efficiency and misjudgment of manual detection of unauthorized loopholes.
- a method for detecting a breach of authority vulnerability including:
- the identity parameter in the first service request is an identity parameter corresponding to the first account
- a device for detecting an unauthorized vulnerability including:
- a first triggering module configured to trigger multiple business logics of a system to be detected through a first account
- a first traffic acquisition module configured to obtain first business traffic corresponding to each of the multiple business logics triggered by the first account, where the first business traffic includes a first service request and the first First return data corresponding to a service request, and the identification parameter in the first service request is an identification parameter corresponding to the first account;
- a parameter modification module configured to modify the identification parameter in the first service request corresponding to each service logic to the identification parameter corresponding to the second account, and the first traffic acquisition module is further configured to obtain and modify the identification respectively Second return data corresponding to each first service request after the parameters;
- a similarity determining module configured to respectively determine the similarity between the first returned data and the second returned data corresponding to each of the first service requests
- a vulnerability determination module is configured to determine, if a second service request exists in each of the first service requests, that an unauthorized loophole exists in the service logic corresponding to the second service request, wherein the first return corresponding to the second service request is The similarity between the data and the second returned data is greater than the first similarity threshold.
- another type of unauthorized power vulnerability detection device including a processor, a memory, and an input-output interface.
- the processor, the memory, and the input-output interface are connected to each other.
- the input-output interface is used to input and output data.
- the memory is configured to store application code that executes the above method by an unauthorized vulnerability detection device, and the processor is configured to execute the method of the first aspect.
- a computer storage medium stores a computer program, where the computer program includes program instructions, and the program instructions, when executed by a processor, cause the processor to execute the foregoing first aspect. method.
- This technical solution can improve the detection efficiency of the detection of unauthorized loopholes.
- FIG. 1 is a schematic flowchart of a method for detecting an unauthorized vulnerability in accordance with an embodiment of the present application
- FIG. 2 is a schematic flowchart of another method for detecting an unauthorized vulnerability, provided by an embodiment of the present application;
- FIG. 3 is a schematic flowchart of obtaining a target service flow corresponding to each business logic in a plurality of business logics triggered by a target account by using a traffic proxy method according to an embodiment of the present application;
- FIG. 4 is a schematic flowchart of obtaining a target service flow corresponding to each business logic in a plurality of business logic triggered by a target account in a crawling manner provided by an embodiment of the present application;
- FIG. 5 is a schematic flowchart of a method for calculating a similarity between two returned data corresponding to a target service request according to an embodiment of the present application
- FIG. 6 is a schematic structural diagram of a device for detecting unauthorized loopholes according to an embodiment of the present application.
- FIG. 7 is a schematic structural diagram of another device for detecting unauthorized loopholes according to an embodiment of the present application.
- FIG. 1 is a schematic flowchart of a method for detecting an unauthorized power vulnerability provided by an embodiment of the present application. As shown in the figure, the method includes:
- S101 Trigger multiple business logics of a system to be detected through a first account.
- the first account is a user account on the system to be tested.
- the first account can be used to log in to the system to be tested. After logging in to the system to be tested, the business logic on the system to be tested can be triggered.
- the system to be detected may be a website system or an APP system.
- the first account number may be a user account of each salesperson; for another example, if the system to be tested is a “Ping An Bank” APP, the first account number may be the APP ’s The user name of each user.
- triggering multiple service logics of the system to be tested refers to triggering multiple service functions of the system to be tested after logging in to the system to be tested, and multiple service functions of the system to be tested may be of the system to be tested. All business functions.
- multiple business logics of the system to be detected when multiple business logics of the system to be detected are sequentially triggered by the first account, multiple business logics of the system to be detected may be sequentially triggered according to the following two trigger logics:
- the system to be tested provides users with multiple business functions such as “transfer”, “finance”, “payment”, and “insurance”.
- business functions such as "transfer”, “finance”, “payment”, and "insurance”.
- the transfer can be triggered After all sub-functions under the function (such as transfer to individual users, to enterprise users, etc.), all sub-functions under the financial management function are triggered, and so on.
- the classification of the database operation corresponding to the business logic multiple business logics of the system to be detected are triggered in turn.
- the database operations corresponding to the business logic have four categories: “Add,” “Delete,” “Query,” and “Modify.”
- the classification of the database operations corresponding to the business logic multiple business logics of the system to be tested can be triggered in sequence. After triggering the business logic corresponding to one type of database operation, the business logic corresponding to the next type of database operation is triggered.
- the system to be tested provides users with an "Order” function module and a “User Information” function module.
- the "Order” function module includes “Add Order”, “View Order”, and “Modify Order”. And “Delete Order” four sub-functions
- "User Information” function includes “Add User Information”, “View User Information”, “Modify User Information” and “Delete User Information” four sub-functions.
- the business logic corresponding to the query database operation may be triggered first, that is, the "view order” and “view user information” are triggered first, and then Trigger the business logic corresponding to the modification database operation, that is, trigger the "modify order” and “modify user information", and so on.
- the system foreground (such as a browser running on a computer, an APP running on a terminal device, etc.) corresponding to the system to be tested sends to the system corresponding to the system to be tested
- a background (such as a server) submits a business request corresponding to each business logic.
- S102 Obtain first service traffic corresponding to each of the multiple service logics triggered by the first account, where the first service traffic includes a first service request and a first service request corresponding to the first service request. Data is returned, and the identification parameter in the first service request is an identification parameter corresponding to the first account.
- the first service request refers to the business logic submitted by the system foreground corresponding to the system to be detected to the system background corresponding to the system to be detected when a certain business logic of the system to be detected is triggered as the first account.
- the first returned data refers to the data returned by the system background corresponding to the system to be tested according to the business request submitted as the first account when the identity of the first account is verified to pass.
- the first returned data can be understood as data obtained by using the identity of the first account to perform operations that can be performed within the authority of the first account.
- the identification parameter is used to indicate the identity of the initiator of the first service request, and the identification parameter may be at least one kind of information such as cookie information, session information, user account identifier, or order identifier.
- the user account identifier may have multiple manifestations, such as user_id, employee_id, student_id, teacher_id, etc., and is not limited to the description here.
- the specific embodiment of the user account identification may be related to the population targeted by the system to be detected. For example, if the target group of the system to be detected is all users, the user account ID may be user_id. For example, if the target group of the system to be tested is teachers and students, the user account ID may be student_id, teacher_id.
- different types of service requests may correspond to different identification parameters.
- the identification parameter in the service request may be the order identifier; the After the service request triggers the user information query function, the service request submitted by the system foreground corresponding to the system to be tested to the system background (such as the server) corresponding to the system to be tested, the identification parameter in the service request may be the user account identifier .
- different types of service requests may also correspond to the same identification parameter.
- the identification parameters in all service requests are cookie information.
- the first business traffic corresponding to each business logic in the multiple business logics triggered by the first account can be obtained through a traffic proxy method or a web crawler crawling method, and the specific logic can refer to the corresponding diagrams in FIGS. 3-4. The description of the embodiment is not described here too much.
- S103 Modify the identity parameter in the first service request corresponding to each business logic to the identity parameter corresponding to the second account, and obtain the second return data corresponding to the first service request after modifying the identity parameter.
- the second returned data refers to the data returned by the system background corresponding to the system to be tested according to the business request submitted as the second account under the condition that the identity of the first account is passed.
- the second returned data The data can be understood as data obtained by using the identity of the second account to perform operations that can be performed within the authority of the first account.
- the second return data corresponding to the first service request after modifying the identification parameters can be obtained through a traffic proxy method or a web crawler crawling method.
- a traffic proxy method or a web crawler crawling method.
- the similarity between the first returned data and the second returned data corresponding to each first business request can be calculated through a text similarity algorithm.
- the text similarity algorithm can be a Jaccard similarity coefficient algorithm or a cosine.
- the similarity algorithm may also be a SimHash algorithm, which is not limited in the embodiment of the present application.
- the similarity between the first returned data and the second returned data corresponding to the first service request is described by taking the text similarity algorithm as the SimHash algorithm as an example. For specific logic, reference may be made to the description of the embodiment corresponding to FIG. 5, and no more description is provided here.
- the first similarity threshold may be a percentage or fraction close to 1 or equal to 1, for example, it may be set to 95%, 98%, 31/32, and so on.
- the similarity between the first returned data and the second returned data corresponding to the second service request is greater than the first similarity threshold, which indicates that the data obtained by using the identity of the second account to perform operations performed within the authority of the first account is different from the first
- the identity of an account to perform operations that can be performed within the authority of the first account has a high degree of similarity in data, that is, the identity of the second account acquires data that can only be obtained by the first account. There is an unauthorized loophole in the business logic corresponding to the second service request.
- the business logic corresponding to the "user information query" function is triggered by the first account, and the first returned data obtained is shown in Table 1:
- the data in Table 1 is user information of the user corresponding to the first account.
- the obtained second returned data is also shown in Table 1.
- the similarity between the first returned data and the second returned data is 100%, which is greater than the first phase threshold, indicating that the user corresponding to the second account can also obtain the first returned data. If the user information of the user corresponding to the account has exceeded the authority, it is determined that the service logic corresponding to the function of "user information query" has an unauthorized loophole.
- the identity of the first account and the second account are used to initiate requests that can be initiated within the authority of the first account to obtain the first returned data and the second returned data, respectively.
- the first returned data When the similarity with the second returned data is high, it means that the data of the first account is obtained as the second account, that is, the data of the second account is not obtained as the second account. Therefore, it is determined that there is an unauthorized loophole in the business logic corresponding to the request, and no manual operation and manual comparison are required, which improves the detection efficiency of the unauthorized loophole detection.
- FIG. 2 is a schematic flowchart of another method for detecting an unauthorized vulnerability, provided by an embodiment of the present application. As shown in the figure, the method includes:
- S201 Trigger multiple business logics of a system to be detected through a first account.
- S202 Obtain first service traffic corresponding to each of the multiple service logics triggered by the first account, where the first service traffic includes a first service request and a first service request corresponding to the first service request. Data is returned, and the identification parameter in the first service request is an identification parameter corresponding to the first account.
- S203 Modify the identification parameters in the first service request corresponding to each business logic to the identification parameters corresponding to the second account, and obtain the second return data corresponding to the first business request after the identification parameters are modified, respectively. .
- steps S201 to S204 For specific implementations of steps S201 to S204, reference may be made to the description of steps S101 to S104 in the embodiment corresponding to FIG. 1, and details are not described herein again.
- S205 Determine a second service request in the first service request, and the similarity between the first returned data and the second returned data corresponding to the second service request is greater than a first similarity threshold.
- first service requests which are service request 1 to service request 100, wherein the similarity between the first returned data and the second returned data corresponding to service request 1 to service request 10 is greater than the first similarity threshold. It is determined that service request 1 to service request 10 are second service requests.
- S206 Trigger multiple business logics of the system to be detected through the second account.
- the second account is also a user account on the system to be tested.
- the second account can be used to log in to the system to be tested. After logging in to the system to be tested, the system to be tested can be triggered.
- the manner of triggering multiple business logics of the system to be detected by using the second account is the same. For details, refer to the description of triggering multiple business logics of the system to be detected by using the first account in step S101, and details are not described herein again.
- S207 Obtain a second service flow corresponding to each of the multiple service logics triggered by the second account, where the second service flow includes a third service request and a third return data, and the third service
- the identification parameter in the request is an identification parameter corresponding to the second account.
- the third service request refers to when a certain service logic of the system to be tested is triggered by the identity of the second account.
- the third returned data refers to the data returned by the system background corresponding to the system to be tested according to the business request submitted under the identity of the second account in the case of verifying the identity of the second account.
- the three returned data can be understood as the data obtained by using the identity of the second account to perform operations that can be performed within the authority of the second account.
- step S102 For a specific implementation manner of obtaining the second service traffic corresponding to each of the multiple service logics triggered by the second account, refer to step S102, respectively, for obtaining the second service traffic in the multiple service logics triggered by the first account.
- the description of the first service flow corresponding to each service logic is not repeated here.
- the fourth service request refers to the intersection of the second service request and the third service request. For example, if the second service request determined in step S204 includes service request 1 to service request 10, the third service request obtained in step S206 includes service request 1 to service request 5, service request 10 to service request 50, then it may be determined Service request 1 to service request 5 and service request 10 are fourth service requests.
- the similarity between the first returned data and the third returned data corresponding to the fourth service request may be calculated by a text similarity algorithm.
- the text similarity algorithm may be a Jeckard similarity algorithm, a cosine similarity algorithm, or a SimHash algorithm, which is not limited in the embodiment of the present application.
- the specific process of calculating the similarity between the first returned data and the third returned data corresponding to the fourth service request through the SimHash algorithm can refer to the description of the embodiment corresponding to FIG. 5, and is not described here too much.
- the fourth service request is defined service request 1 to service request 5 and service request 10, where the similarity between the first returned data and the third returned data corresponding to service request 3 to service request 5 is greater than the second similarity threshold, then Service requests 3 to 5 are determined as the fifth service request.
- the second similarity threshold may be a percentage or fraction close to 1 or equal to 1, for example, it may be set to 99%, 97%, 64/65, and so on.
- the second similarity threshold may be the same as the first similarity threshold, or may be different from the first similarity threshold.
- the similarity between the first returned data and the third returned data corresponding to the fifth service request is greater than the second similarity threshold, indicating that the identity obtained by using the identity of the first account to perform operations that can be performed within the authority of the first account is compared with the data
- the identity of the second account to perform the operations that can be performed on the scope of the second account is the same data, that is, the fifth service request can be submitted by all accounts, and the data corresponding to the fifth service request is available to all accounts
- the data obtained, the data corresponding to the fifth service request is the data corresponding to the public page, and there is no unauthorized access.
- the first and third return data returned by the background corresponding to the "Ping An Bank” app are both "Ping An”
- the similarity between the first returned data and the third returned data is greater than the first similarity threshold. Since the home page of the "Finance” function of the "Ping An Bank” APP is public, there is no breach of authority in the business logic of displaying the home page of the "Finance” function of the "Ping An Bank” APP.
- service request 1 to service can be determined Request 2 and business request 6 to service request 10 have unauthorized loopholes.
- the first return data and the second return data are obtained by initiating a request that can be initiated within the authority of the first account with the identity of the first account and the second account, respectively, and determining the first After the return data and the second return data determine the second business request that may have an unauthorized loophole, by excluding the business request corresponding to the public page from the second business request, it is determined that the second business request corresponding to the business request corresponding to the public page is excluded There is an unauthorized loophole in the business logic, reducing the chance of false positives.
- FIG. 3 is a schematic flowchart of obtaining a target service flow corresponding to each business logic in a plurality of business logic triggered by a target account by using a traffic proxy method according to an embodiment of the present application. As shown in the figure, the process includes :
- S301 Intercept multiple service requests initiated by a system foreground corresponding to a system to be detected after triggering each service logic to a system background corresponding to the system to be detected.
- the target account is the first account
- the multiple service requests are initiated by a system foreground corresponding to a system to be detected after triggering various business logic through the first account, to a system background corresponding to the system to be detected Multiple service requests;
- the target account is a second account
- the multiple service requests are initiated by the system foreground corresponding to the system to be detected after triggering various business logic through the second account to the system background corresponding to the system to be detected Multiple business requests.
- a proxy server in the system foreground corresponding to the system to be detected, setting the address of the proxy server to the local loopback address (127.0.0.0) and setting the port as the target port ( (Such as port 80), and then use a packet capture tool (such as burpsuit, wireshark, etc.) to listen to the local target port to intercept the system foreground corresponding to the system to be detected after triggering various business logics, and initiate the system background corresponding to the system to be detected Multiple business requests.
- a packet capture tool such as burpsuit, wireshark, etc.
- S302. Determine a service request in which target identification parameters exist among the multiple service requests as a target service request, and save the target service request.
- the target service request is the first service request
- the target identification parameter is the identification parameter corresponding to the first account
- the target account is the second account
- the The target service request is a second service request
- the target identification parameter is an identification parameter corresponding to the second account.
- step S102 For the definition of the identification parameters, refer to the description of step S102 in the foregoing embodiment corresponding to FIG. 1, and details are not described herein again.
- the target account is the first account
- a sixth service request exists in the multiple service requests, it is determined that the service logic corresponding to the sixth service request does not have an unauthorized loophole, and the sixth service request A service request for which no identification parameter exists in the multiple service requests.
- the unauthorized permission vulnerability refers to the possibility that there is a vulnerability without restricting the requested permissions, for a business request without identification parameters, it is not necessary to judge the requested permissions, that is, there cannot be an unauthorized permission vulnerability, and it is directly determined
- the logic corresponding to the business request without the identification parameter does not have an unauthorized loophole, which can eliminate the detection of this business request and improve the detection efficiency.
- releasing the target service request refers to sending the target service request to the background of the system.
- the first target return data is the first return data; if the target account is the second account, the first target return data is the third return data.
- the first target return data may also be sent to a system foreground corresponding to the system to be detected.
- the process may further include:
- the target identification parameter is the identification parameter corresponding to the first account
- the identification parameter in the target service request after the identification parameter is modified is the identification parameter corresponding to the second account.
- Replaying the target service request after modifying the identification parameters refers to modifying the identification parameters in the target service request saved in step S302, and modifying the identification parameters corresponding to the first account to the identification corresponding to the second account Parameters, and then resend the target business request to the system background.
- the second target return data may be the second return data in the foregoing embodiment.
- multiple service requests initiated by the system foreground corresponding to the system to be detected after triggering each business logic are intercepted to the system background corresponding to the system to be detected, and the target service request among the multiple service requests is requested.
- the target service request among the multiple service requests is requested.
- FIG. 4 is a schematic flowchart of obtaining a target service flow corresponding to each business logic in a plurality of business logic triggered by a target account in a crawling manner provided by an embodiment of the present application.
- the operation of triggering multiple business logic of the system to be detected is completed by the web crawler.
- the process includes:
- the multiple service requests are multiple service requests corresponding to multiple business logic triggered by the first account; if the target account is the second account, the multiple The service requests are multiple service requests corresponding to multiple business logic triggered by the second account.
- S402. Determine a service request in which target identification parameters exist among the multiple service requests as a target service request, and save the target service request.
- the target service request is the first service request
- the target identification parameter is the identification parameter corresponding to the first account
- the target account is the second account
- the The target service request is a second service request
- the target identification parameter is an identification parameter corresponding to the second account.
- the first target return data is the first return data; if the target account is the second account, the first target return data is the third return data.
- the process may further include:
- the target identification parameter is the identification parameter corresponding to the first account
- the identification parameter in the target service request after the identification parameter is modified is the identification parameter corresponding to the second account.
- the second target return data may be the second return data in the foregoing embodiment.
- the target business request in the multiple requests corresponding to multiple business logics is saved by the web crawler and these target business requests are sent to the system background corresponding to the system to be detected, so that the target business requests
- the returned data realizes the acquisition of traffic data corresponding to each business logic.
- FIG. 5 is a schematic flowchart of a method for calculating a similarity between two returned data corresponding to a target service request according to an embodiment of the present application. As shown in the figure, the process may include:
- the first target SimHash value is a binary string obtained by calculating the first target return data based on the SimHash algorithm
- the second target SimHash value is a binary string obtained by calculating the second target return data based on the SimHash algorithm.
- the target service request is the first service request
- the first target return data is the first return data
- the first target SimHash value is the first SimHash value
- the second target return data is the second return data.
- the second target SimHash value is the second SimHash value
- the target business request is the fourth business request
- the first target return data is the first return data
- the first target SimHash value is the first SimHash value
- the second target return data is The third returns the data
- the second target SimHash value is the third SimHash value.
- Hamming distance refers to data with different bits corresponding to two binary strings.
- an XOR operation can be performed on the SimHash value of the first target and the SimHash value of the second target to obtain the XOR value, and the 1 of the XOR value is determined.
- the number is the Hamming distance between the first target SimHash value and the second target SimHash value.
- the first target SimHash value is 0111010101 and the second target SimHash value is 0101010100, and an XOR operation value obtained by performing an XOR operation on the two is 0010000001, the first target SimHash value and the second target are determined.
- the Hamming distance between SimHash values is 2.
- the preset Hamming distance threshold may be a smaller value, such as 1, 2, 3, and so on.
- the target similarity threshold may be set to the first similarity threshold; if the target service request is the fourth service request, the target similarity threshold may be set to the second similarity threshold.
- the similarity of the two returned data corresponding to this request can be determined, which is simple and convenient.
- FIG. 6 is a schematic structural diagram of a device for detecting unauthorized loopholes provided by an embodiment of the present application. As shown in the figure, the device 60 includes:
- a first triggering module 601, configured to trigger multiple service logics of a system to be detected through a first account
- a first traffic acquisition module 602 is configured to obtain first business traffic corresponding to each of a plurality of business logics triggered by the first account, where the first business traffic includes a first service request and the first service request.
- First return data corresponding to a service request, and the identification parameter in the first service request is an identification parameter corresponding to the first account;
- a parameter modification module 603 is configured to modify the identification parameter in the first service request corresponding to each service logic to the identification parameter corresponding to the second account, and the first traffic acquisition module is further configured to obtain the modified identity respectively.
- a similarity determination module 604 configured to respectively determine the similarity between the first returned data corresponding to the first service requests and the second returned data
- a vulnerability determination module 605 is configured to determine, if a second service request exists in each of the first service requests, that an unauthorized loophole exists in the service logic corresponding to the second service request, wherein the first service request corresponds to the first service request. The similarity between the returned data and the second returned data is greater than the first similarity threshold.
- the similarity determination module 604 is specifically configured to:
- the first SimHash value is a SimHash value of the first returned data
- the second SimHash value is the second returned data SimHash value
- the similarity between the first returned data and the second returned data corresponding to each first service request is determined according to the Hamming distance between the first SimHash value and the second SimHash value corresponding to each first service request.
- the device 60 further includes:
- a second triggering module 606, configured to trigger multiple business logics of the system to be detected through a second account
- a second traffic acquisition module 607 is configured to obtain second business traffic corresponding to each of the multiple business logics triggered by the second account, where the second business traffic includes a third service request and the first Third return data corresponding to the three service requests, and the identification parameter in the third service request is an identification parameter corresponding to the second account;
- a service request determining module 608, configured to determine a fourth service request, where the fourth service request is the same service request as the third service request in the second service request;
- the similarity determination module 604 is further configured to determine the similarity between the first returned data and the third returned data corresponding to the fourth service request;
- the vulnerability determination module 605 is further configured to, if a fifth service request exists in the fourth service request, determine that service logic corresponding to a service request other than the fifth service request in the second service request exists An unauthorized loophole, the similarity between the first returned data and the third returned data corresponding to the fifth service request is greater than the second similarity threshold.
- the first traffic acquisition module 602 is specifically configured to:
- the first traffic acquisition module 602 is further configured to:
- a sixth service request exists in the multiple service requests, it is determined that there is no unauthorized loophole in the service logic corresponding to the sixth service request, and the sixth service request is a service request without an identification parameter.
- the first traffic acquisition module 602 is specifically configured to:
- the first business traffic corresponding to each business logic in the business logic is obtained through a web crawler.
- the identification parameters include cookie information, session information, a user account identifier, or an order identifier.
- the detection efficiency of the unauthorized vulnerability detection is improved and the probability of false positives of the unauthorized vulnerability is reduced.
- FIG. 7 is a schematic structural diagram of another type of unauthorized vulnerability detection device according to an embodiment of the present application.
- the device 70 includes a processor 701, a memory 702, and an input-output interface 703.
- the processor 701 is connected to the memory 702 and the input-output interface 703.
- the processor 701 may be connected to the memory 702 and the input-output interface 703 through a bus.
- the processor 701 is configured to support the unauthorized vulnerability detection device to perform a corresponding function in the unauthorized vulnerability detection method described in FIG. 1 to FIG. 5.
- the processor 701 may be a central processing unit (CPU), a network processor (NP), a hardware chip, or any combination thereof.
- the above-mentioned hardware chip may be an Application-Specific Integrated Circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof.
- the PLD may be a complex programmable logic device (Complex Programmable Logic Device, CPLD), a field programmable logic gate array (Field-Programmable Gate Array, FPGA), a universal array logic (Generic Array Logic, GAL), or any combination thereof.
- the memory 702 is used to store program code and the like.
- the memory 702 may include volatile memory (Volatile Memory, VM), such as Random Access Memory (RAM); the memory 702 may also include non-volatile memory (Non-Volatile Memory, NVM), such as read-only A memory (Read-Only Memory, ROM), a flash memory (flash memory), a hard disk (Hard Disk Drive, HDD), or a solid state drive (Solid-State Drive (SSD)); the memory 702 may further include a combination of the above types of memories.
- the memory 702 is configured to store an unauthorized vulnerability detection program.
- the input / output interface 703 is used to input or output data.
- the input / output interface may include a display screen, a keyboard, or a mouse.
- the processor 701 may call the program code to perform the following operations:
- the identity parameter in the first service request is an identity parameter corresponding to the first account
- each operation may also correspond to the corresponding description of the method embodiments shown in FIGS. 1-5; the processor 701 may also perform other operations in the foregoing method embodiments in cooperation with the input-output interface 703. .
- An embodiment of the present application further provides a computer-readable storage medium.
- the computer-readable storage medium stores a computer program, where the computer program includes program instructions, and the program instructions, when executed by the computer, cause the computer to execute as described above.
- the computer may be a part of the unauthorized vulnerability detection device mentioned above. For example, it is the processor 701 described above.
- the program can be stored in a computer-readable storage medium.
- the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random, Access Memory, RAM).
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer And Data Communications (AREA)
- Telephonic Communication Services (AREA)
- Information Transfer Between Computers (AREA)
Abstract
一种越权漏洞检测方法和装置,方法包括:通过第一账号触发待检测的系统的多个业务逻辑(S101);分别获取通过第一账号触发的多个业务逻辑中的各个业务逻辑对应的第一业务请求和各个第一业务请求对应的第一返回数据,第一业务请求中的身份识别参数为第一账号对应的身份识别参数;分别将各个第一业务请求中的身份识别参数修改为第二账号对应的身份识别参数,并分别获取修改身份识别参数后的各个第一业务请求对应的第二返回数据;如果第一业务请求中存在第二业务请求,则确定第二业务请求对应的业务逻辑存在越权漏洞,第二业务请求对应的第一返回数据与第二返回数据的相似度大于第一相似阈值(S105)。该方案可提高越权漏洞检测的检测效率并减少误报率。
Description
本申请要求于2018年06月27日提交中国专利局、申请号为201810676244X、申请名称为“越权漏洞检测方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及计算机技术领域,尤其涉及越权漏洞检测方法和装置。
越权漏洞是Web应用程序中一种常见的安全漏洞,是指由于程序员疏忽,没有对某个操作所需的权限或用户进行严格的限制,导致本应没有操作权限的用户可正常进行操作,其威胁在于一个用户即可控制全站用户数据,即攻击者使用一个合法账户,即可对存在越权缺陷漏洞的其他账户数据进行非法的操作,例如查询、插入、删除、修改等常规数据库命令。
越权漏洞属于业务逻辑漏洞的一种,无法通过外部网络应用防火墙(Web Application Firewall,WAF)进行防御加固,且常涉及用户隐私数据,一旦被发现,对于系统的影响会很大。目前检测越权漏洞一般是通过手工的方式进行越权漏洞检测,通过人工登录一个账号并修改账号ID,根据不同的账号ID返回请求进行对比分析从而判断是否存在越权漏洞,检测的效率低,且存在误判的情况。
发明内容
本申请提供越权漏洞检测方法和装置,解决通过手工的方式进行越权漏洞检测所存在的效率低以及误判的问题。
第一方面,提供一种越权漏洞检测方法,包括:
通过第一账号触发待检测的系统的多个业务逻辑;
分别获取通过所述第一账号触发的多个业务逻辑中的各个业务逻辑对应的第一业务流量,所述第一业务流量包括第一业务请求和所述第一业务请求对应的第一返回数据,所述第一业务请求中的身份识别参数为所述第一账号对应的身份识别参数;
分别将所述各个业务逻辑对应的第一业务请求中的身份识别参数修改为第二账号对应的身份识别参数,并分别获取修改身份识别参数后的各个第一业务请求对应的第二返回数据;
分别确定所述各个第一业务请求对应的第一返回数据与第二返回数据的相似度;
如果所述各个第一业务请求中存在第二业务请求,则确定所述第二业务请求对应的业务逻辑存在越权漏洞,其中,所述第二业务请求对应的第一返回数据与第二返回数据的相似度大于第一相似阈值。
第二方面,提供一种越权漏洞检测装置,包括:
第一触发模块,用于通过第一账号触发待检测的系统的多个业务逻辑;
第一流量获取模块,用于分别获取通过所述第一账号触发的多个业务逻辑中的各个业务逻辑对应的第一业务流量,所述第一业务流量包括第一业务请求和所述第一业务请求对应的第一返回数据,所述第一业务请求中的身份识别参数为所述第一账号对应的身份识别参数;
参数修改模块,用于分别将所述各个业务逻辑对应的第一业务请求中的身份识别参数修改为第二账号对应的身份识别参数,所述第一流量获取模块还用于分别获取修改身份识别参数后的各个第一业务请求对应的第二返回数据;
相似度确定模块,用于分别确定所述各个第一业务请求对应的第一返回数据与第二返回数据的相似度;
漏洞确定模块,用于如果所述各个第一业务请求中存在第二业务请求,则确定所述第二业务请求对应的业务逻辑存在越权漏洞,其中,所述第二业务请求对应的第一返回数据与第二返回数据的相似度大于第一相似阈值。
第三方面,提供另一种越权漏洞检测装置,包括处理器、存储器以及输入输出接口,所述处理器、存储器和输入输出接口相互连接,其中,所述输入输出接口用于输入输出数据,所述存储器用于存储越权漏洞检测装置执行上述方法的应用程序代码,所述处理器被配置用于执行上述第一方面的方法。
第四方面,提供一种计算机存储介质,所述计算机存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行上述第一方面的方法。
本技术方案可以提高越权漏洞检测的检测效率。
图1是本申请实施例提供的一种越权漏洞检测方法的流程示意图;
图2是本申请实施例提供的另一种越权漏洞检测方法的流程示意图;
图3是本申请实施例提供的通过流量代理的方式获取通过目标账号触发的多个业务逻辑中的各个业务逻辑对应的目标业务流量的流程示意图;
图4是本申请实施例提供的通过网络爬虫爬取的方式获取通过目标账号触发的多个业务逻辑中的各个业务逻辑对应的目标业务流量的流程示意图;
图5是本申请实施例提供的计算目标业务请求对应的两个返回数据的相似度的方法的流程示意图;
图6是本申请实施例提供的一种越权漏洞检测装置的组成结构示意图;
图7是本申请实施例提供的另一种越权漏洞检测装置的组成结构示意图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实 施例,都属于本申请保护的范围。
首先参见图1,图1是本申请实施例提供的一种越权漏洞检测方法的流程示意图,如图所示,所述方法包括:
S101,通过第一账号触发待检测的系统的多个业务逻辑。
这里,第一账号为该待检测的系统上的用户账号,通过该第一账号可登录该待检测的系统,登录该待检测的系统后,则可触发该待检测的系统上的业务逻辑。其中,该待检测系统可以是网站系统,也可以是APP系统。例如,该待检测的系统为平安e行销网站,则第一账号可以是各个业务员的用户账号;又如,该待检测的系统为“平安银行”APP,则第一账号可以是该APP的各个用户的用户名。
这里,触发待检测系统的多个业务逻辑是指登录待检测的系统后,触发该待检测的系统的多个业务功能,该待检测的系统的多个业务功能可以是该待检测的系统的全部业务功能。
本申请实施例中,可以有两种方式触发待检测的系统的多个业务逻辑:
1)可以通过第一账号依次触发待检测的系统的多个业务逻辑,在触发一个业务逻辑之后再触发下一个业务逻辑。这种方式既可以适用于该待检测的系统为网站系统的情况,也可以适用于该待检测的系统为APP系统的情况。
2)可以通过第一账号并行触发待检测的系统的多个业务逻辑。这种方式可适用于该待检测的系统为网站系统的情况。
本申请实施例中,在通过第一账号依次触发待检测的系统的多个业务逻辑的情况下,可以按照以下两种触发逻辑依次触发该待检测的系统的多个业务逻辑:
1)根据待检测的系统的业务功能的划分情况依次触发待检测的系统的多个业务逻辑,其中,系统的业务功能是指系统提供的各个相对独立的服务所对应的功能模块。在根据待检测的系统的业务功能的划分情况依次触发待检测的系统的多个业务逻辑时,可以在触发完一个业务功能下的所有业务子功能之后,在触发下一个业务功能。
举例来进行说明,例如,待检测的系统分别为用户提供“转账”、“理财”、“缴费”、“保险”等多个业务功能,在依次触发这几个业务功能时,可以在触发转账功能下的所有子功能(如转给个人用户、转给企业用户等)之后,再触发理财功能下的所有子功能,以此类推。
2)根据业务逻辑对应的数据库操作的分类依次触发待检测的系统的多个业务逻辑。业务逻辑对应的数据库操作共有“增加”、“删除”、“查询”、“修改”四个类别,根据业务逻辑对应的数据库操作的分类依次触发待检测的系统的多个业务逻辑时,可以在触发完一类数据库操作对应的业务逻辑之后,再触发下一个类数据库操作对应的业务逻辑。
举例来进行说明,例如,待检测的系统分别为用户提供“订单”功能模块和“用户信息”功能模块,“订单”功能模块下分别包括“增加订单”、“查看订单”、“修改订单”以及“删除订单”四个子功能,“用户信息”功能下分别包括“增加用户信息”、“查看用户信息”、“修改用户信息”以及“删除用户信息”四个子功能。在根据业务逻辑对应的数据库操作的分类依次触发待检测的系统的多个业务逻辑时,可以先触发查询类数据库操作对应的业务逻辑,即先触发“查看订单”和“查看用户信息”,再触发修改类数据库操作对应的业务逻辑,即再触 发“修改订单”和“修改用户信息”,以此类推。
在触发待检测的系统的多个业务逻辑之后,该待检测的系统对应的系统前台(如运行在电脑上的浏览器、运行在终端设备上的APP等)向该待检测的系统对应的系统后台(如服务器)提交各个业务逻辑对应的业务请求。
S102,分别获取通过所述第一账号触发的多个业务逻辑中的各个业务逻辑对应的第一业务流量,所述第一业务流量包括第一业务请求和所述第一业务请求对应的第一返回数据,所述第一业务请求中的身份识别参数为所述第一账号对应的身份识别参数。
这里,第一业务请求是指以第一账号的身份触发待检测的系统的某个业务逻辑时,该待检测的系统对应的系统前台向该待检测的系统对应的系统后台提交的该业务逻辑对应的业务请求;第一返回数据是指待检测的系统对应的系统后台在验证第一账号的身份通过的情况下根据以第一账号的身份提交的业务请求所返回的数据,通俗来讲,第一返回数据可以理解为以第一账号的身份去执行在第一账号的权限范围内可以执行的操作所得到的数据。
身份识别参数用于表明该第一业务请求的发起者的身份,身份识别参数可以为cookie信息、session信息、用户账户标识或订单标识中的至少一种信息。其中,用户账户标识可以有多种体现形式,例如为user_id,employer_id,student_id,teacher_id,等等,不限于这里的描述。用户账户标识的具体体现形式可以与待检测的系统面向的人群有关。例如,待检测的系统面向的人群是所有用户,则用户账户标识可以为user_id,如,待检测的系统面向的人群是教师和学生,则用户账户标识可以为student_id,teacher_id。
在一种可能的实现方式中,不同类型的业务请求,可对应不同的身份识别参数。例如,该业务请求为触发订单查询功能后该待检测的系统对应的系统前台向该待检测的系统对应的系统后台提交的业务请求,则该业务请求中的身份识别参数可以为订单标识;该业务请求触发用户信息查询功能后该待检测的系统对应的系统前台向该待检测的系统对应的系统后台(如服务器)提交的业务请求,则该业务请求中的身份识别参数可以为用户账户标识。
在另一种可能的实现方式中,不同类型的业务请求,也可对应相同的身份识别参数,例如,所有的业务请求中的身份识别参数均为cookie信息。
具体实现中,可以通过流量代理的方式或网络爬虫爬取的方式获取通过第一账号触发的多个业务逻辑中的各个业务逻辑对应的第一业务流量,具体逻辑可参见图3-图4对应的实施例的描述,此处不做过多描述。
S103,分别将所述各个业务逻辑对应的第一业务请求中的身份识别参数修改为第二账号对应的身份识别参数,并分别获取修改身份识别参数后的第一业务请求对应的第二返回数据。
这里,第二返回数据是指待检测的系统对应的系统后台在验证第一账号的身份通过的情况下根据以第二账号的身份提交的业务请求所返回的数据,通俗来讲,第二返回数据可以理解为以第二账号的身份去执行在第一账号的权限范围内可以执行的操作所得到的数据。
具体实现中,可以通过流量代理的方式或网络爬虫爬取的方式获取修改身份识别参 数后的第一业务请求对应的第二返回数据,具体逻辑可参考图3-图4对应的实施例的描述,此处不做过多描述。
S104,分别确定所述各个第一业务请求对应的第一返回数据与第二返回数据的相似度。
具体实现中,可通过文本相似度算法计算各个第一业务请求对应的第一返回数据和第二返回数据之间的相似度,文本相似度算法可以为杰卡德相似系数算法,也可以为余弦相似度算法,也可以为SimHash算法,本申请实施例不做限制。本申请实施例以文本相似度算法为SimHash算法为例介绍计算第一业务请求对应的第一返回数据和第二返回数据之间的相似度。具体逻辑可参考图5对应的实施例的描述,此处不做过多描述。
S105,如果所述各个第一业务请求中存在第二业务请求,则确定所述第二业务请求对应的业务逻辑存在越权漏洞,其中,所述第二业务请求对应的第一返回数据与第二返回数据的相似度大于第一相似阈值。
这里,第一相似阈值可以为一个接近于1或等于1的百分比或分数,例如可以设置为95%、98%、31/32,等等。
第二业务请求对应的第一返回数据和第二返回数据的相似度大于第一相似阈值,说明以第二账号的身份去执行第一账号的权限范围内执行的操作所得到的数据与以第一账号的身份去执行第一账号的权限范围内可以执行的操作所得到数据相似度较高,即第二账号的身份获取到了第一账号才能获取到的数据,发生了越权,则可确定第二业务请求对应的业务逻辑存在越权漏洞。
举例进行说明,例如,通过第一账号触发了“用户信息查询”这一功能对应的业务逻辑,获取到的第一返回数据如表1所示:
| 姓名 | XXX |
| 身份证号码 | 500111234567890000 |
| 电话号码 | 12345678900 |
表1
表1中的数据为第一账号对应的用户的用户信息。获取到的第二返回数据也如表1所示,则第一返回数据和第二返回数据的相似度为100%,大于第一相阈值,说明第二账号对应的用户也可以获取到第一账号对应的用户的用户信息,即发生了越权,则确定“用户信息查询”这一功能对应的业务逻辑存在越权漏洞。
本申请实施例中,分别以第一账号和第二账号的身份去发起在第一账号的权限范围内所能发起的请求以分别得到第一返回数据和第二返回数据,当第一返回数据和第二返回数据的相似度较高时,说明以第二账号的身份获取到了第一账号的权限范围内的数据,即以第二账号的身份获取到了不在第二账号的权限范围内的数据,从而确定该请求所对应的业务逻辑存在越权漏洞,无需人工操作和人工比对,提高了越权漏洞检测的检测效率。
参见图2,图2是本申请实施例提供的另一种越权漏洞检测方法的流程示意图,如图所示,所述方法包括:
S201,通过第一账号触发待检测的系统的多个业务逻辑。
S202,分别获取通过所述第一账号触发的多个业务逻辑中的各个业务逻辑对应的第 一业务流量,所述第一业务流量包括第一业务请求和所述第一业务请求对应的第一返回数据,所述第一业务请求中的身份识别参数为所述第一账号对应的身份识别参数。
S203,分别将所述各个业务逻辑对应的第一业务请求中的身份识别参数修改为第二账号对应的身份识别参数,并分别获取修改身份识别参数后的第一业务请求对应的第二返回数据。
S204,分别确定所述各个第一业务请求对应的第一返回数据与第二返回数据的相似度。
步骤S201~S204的具体实现方式可参考图1对应的实施例中步骤S101~S104的描述,此处不再赘述。
S205,在所述第一业务请求中确定第二业务请求,所述第二业务请求对应的第一返回数据和第二返回数据的相似度大于第一相似阈值。
例如,第一业务请求有100个,分别为业务请求1~业务请求100,其中,业务请求1~业务请求10对应的第一返回数据和第二返回数据的相似度均大于第一相似阈值,则确定业务请求1~业务请求10为第二业务请求。
S206,通过第二账号触发所述待检测的系统的多个业务逻辑。
这里,第二账号同样也为该待检测的系统上的用户账号,通过第二账号可登录该待检测的系统,登录该待检测的系统后,可触发该待检测的系统。通过第二账号触发该待检测的系统的多个业务逻辑的方式相同,具体可参考步骤S101中通过第一账号触发待检测的系统的多个业务逻辑的描述,此处不再赘述。
S207,分别获取通过所述第二账号触发的多个业务逻辑中的各个业务逻辑对应的第二业务流量,所述第二业务流量包括第三业务请求和第三返回数据,所述第三业务请求中的身份识别参数为所述第二账号对应的身份识别参数。
这里,第三业务请求是指以第二账号的身份触发待检测的系统的某个业务逻辑时,该待检测的系统对应的系统前台向该待检测系统对应的系统后台提交的该业务逻辑对应的业务请求;第三返回数据是指待检测的系统对应的系统后台在验证第二账号的身份通过的情况下根据以第二账号的身份提交的业务请求所返回的数据,通俗来说,第三返回数据可以理解为以第二账号的身份去执行在第二账号的权限范围内可以执行的操作所得到的数据。
分别获取通过所述第二账号触发的多个业务逻辑中的各个业务逻辑对应的第二业务流量的具体实现方式可参考步骤S102中分别获取通过所述第一账号触发的多个业务逻辑中的各个业务逻辑对应的第一业务流量的描述,此处不再赘述。
S208,确定第四业务请求,所述第四业务请求为所述第二业务请求中与所述第三业务请求相同的业务请求。
这里,第四业务请求是指第二业务请求与第三业务请求的交集。例如,通过步骤S204确定的第二业务请求包括业务请求1~业务请求10,通过步骤S206获取到的第三业务请求包括业务请求1~业务请求5,业务请求10~业务请求50,则可确定业务请求1~业务请求5以及业务请求10为第四业务请求。
S209,确定所述第四业务请求对应的第一返回数据和第三返回数据的相似度。
具体实现中,可通过文本相似度算法计算第四业务请求对应的第一返回数据和第三返回数据之间的相似度。
文本相似度算法可以为杰卡德相似系数算法,也可以为余弦相似度算法,也可以为SimHash算法,本申请实施例不做限制。其中,通过SimHash算法计算第四业务请求对应的第一返回数据和第三返回数据之间的相似度的具体过程可参考图5对应的实施例的描述,此处不做过多描述。
S210,在所述第四业务请求中确定第五业务请求,所述第五业务请求对应的第一返回数据和第三返回数据的相似度大于第二相似阈值。
例如,第四业务请求为定业务请求1~业务请求5以及业务请求10,其中,业务请求3~业务请求5对应的第一返回数据和第三返回数据的相似度大于第二相似阈值,则将业务请求3~业务请求5确定为第五业务请求。
这里,第二相似阈值可以为一个接近于1或等于1的百分比或分数,例如可以设置为99%、97%、64/65,等等。第二相似阈值可以与第一相似阈值相同,也可以与第一相似阈值不同。
第五业务请求对应的第一返回数据和第三返回数据的相似度大于第二相似阈值,说明以第一账号的身份去执行第一账号的权限范围内可以执行的操作所得到的数据与以第二账号的身份去执行第二账号的权限范围可以执行的操作所得到的数据相同,即第五业务请求是所有账号均可以提交的,第五业务请求对应的数据是所有的账号均可以获取到的数据,第五业务请求对应的数据是公共页面对应的数据,不存在越权。
举例来进行说明,例如,分别通过第一账号和第二账号去触发显示“平安银行”APP的“理财”功能的首页这一业务逻辑,在以第一账号触发和以第二账号触发这一业务逻辑时,由于“平安银行”APP的“理财”功能的首页是所有的账号均可以访问的,则“平安银行”APP对应的后台返回的第一返回数据和第三返回数据均为“平安银行”APP的“理财”功能的首页对应的页面数据,第一返回数据和第三返回数据的相似度大于第一相似阈值。由于“平安银行”APP的“理财”功能的首页公共页面,因此,显示“平安银行”APP的“理财”功能的首页这一业务逻辑不存在越权漏洞。
S211,确定所述第二业务请求中除所述第五业务请求之外的业务请求对应的业务逻辑存在越权漏洞。
举例来说,例如,通过步骤S204确定的第二业务请求为业务请求1~业务请求10,通过步骤S209确定的第五业务请求为业务请求3~业务请求5,则可以确定业务请求1~业务请求2以及业务请求6~业务请求10存在越权漏洞。
本申请实施例中,在通过分别以第一账号和第二账号的身份去发起在第一账号的权限范围内所能发起的请求以分别得到第一返回数据和第二返回数据,并确定第一返回数据和第二返回数据确定可能存在越权漏洞的第二业务请求之后,通过在第二业务请求中排除公共页面对应的业务请求,确定排除公共页面对应的业务请求后的第二业务请求对应的业务逻辑存在越权漏洞,降低越权漏洞误报的几率。
参见图3,图3是本申请实施例提供的通过流量代理的方式获取通过目标账号触发的多个业务逻辑中的各个业务逻辑对应的目标业务流量的流程示意图,如图所示,该流程 包括:
S301,分别拦截触发各个业务逻辑后待检测的系统对应的系统前台向所述待检测的系统对应的系统后台发起的多个业务请求。
本申请实施例中,如果目标账号为第一账号,则该多个业务请求为通过第一账号触发各个业务逻辑后待检测的系统对应的系统前台向所述待检测的系统对应的系统后台发起的多个业务请求;如果目标账号为第二账号,则该多个业务请求为通过第二账号触发各个业务逻辑后待检测的系统对应的系统前台向所述待检测的系统对应的系统后台发起的多个业务请求。
在一种可能的实现方式中,可以通过在该待检测的系统对应的系统前台设置代理服务器,将该代理服务器的地址设置为本机回环地址(127.0.0.0)并将端口设置为目标端口(如80端口),然后通过抓包工具(如burpsuit、wireshark等)监听本地的目标端口从而拦截触发各个业务逻辑后待检测的系统对应的系统前台向所述待检测的系统对应的系统后台发起的多个业务请求。
S302,将所述多个业务请求中存在目标身份识别参数的业务请求确定为目标业务请求,并保存所述目标业务请求。
本申请实施例中,如果目标账号为第一账号,则该目标业务请求为第一业务请求,该目标身份识别参数为第一账号对应的身份识别参数;如果目标账号为第二账号,则该目标业务请求为第二业务请求,该目标身份识别参数为第二账号对应的身份识别参数。
身份识别参数的定义可参考前述图1对应的实施例中步骤S102的描述,此处不再赘述。
可选地,在该目标账号为第一账号的情况下,如果该多个业务请求中存在第六业务请求,则确定第六业务请求对应的业务逻辑不存在越权漏洞,其中,第六业务请求为该多个业务请求中的不存在身份识别参数的业务请求。由于越权漏洞是指没有对请求的权限进行限制而可能存在漏洞,对于不存在身份识别参数的业务请求来说,其原本就不需要对请求的权限进行判断,即不可能存在越权漏洞,直接确定不存在身份识别参数的业务请求对应的逻辑不存在越权漏洞可省去对这一业务请求的检测,提高检测效率。
S303,对所述目标业务请求进行放行,并拦截所述系统后台根据所述目标业务请求返回的数据,作为所述目标业务请求对应的第一目标返回数据,保存第一目标返回数据。
这里,对目标业务请求进行放行是指将目标业务请求发送给该系统后台。
本申请实施例中,如果目标账号为第一账号,则该第一目标返回数据为第一返回数据;如果目标账号为第二账号,则该第一目标返回数据为第三返回数据。
可选地,在保存到该第一目标返回数据之后,还可以将该第一目标返回数据发送给所述待检测的系统对应的系统前台。
可选地,在该目标账号为第一账号的情况下,该流程还可以包括:
S304,对修改身份识别参数后的目标业务请求进行重放,并拦截所述系统后台根据重放的目标业务请求返回的数据,作为所述目标业务请求对应的第二目标返回数据,保存第二目标返回数据。
在目标账号为第一账号的情况下,目标身份识别参数为第一账号对应的身份识别参数, 修改身份识别参数后的目标业务请求中的身份识别参数为第二账号对应的身份识别参数。对修改身份识别参数之后的目标业务请求进行重放是指将步骤S302中保存的目标业务请求中的身份识别参数进行修改,将第一账号对应的身份识别参数修改为第二账号对应的身份识别参数,然后重新将目标业务请求发送给该系统后台。
本申请实施例中,第二目标返回数据可以为上述实施例中的第二返回数据。
本申请实施例中,通过截取触发各个业务逻辑后待检测的系统对应的系统前台向所述待检测的系统对应的系统后台发起的多个业务请求,并对多个业务请求中的目标业务请求进行放行以及拦截系统后台返回的数据,实现了通过代理的方式获取各个业务逻辑对应的流量数据。
参见图4,图4是本申请实施例提供的通过网络爬虫爬取的方式获取通过目标账号触发的多个业务逻辑中的各个业务逻辑对应的目标业务流量的流程示意图,在这种方式中,触发待检测的系统的多个业务逻辑这一操作由网络爬虫完成,如图所示,该流程包括:
S401,确定触发的多个业务逻辑对应的多个业务请求。
本申请实施例中,如果目标账号为第一账号,则该多个业务请求为通过第一账号触发的多个业务逻辑对应的多个业务请求;如果目标账号为第二账号,则该多个业务请求为通过第二账号触发的多个业务逻辑对应的多个业务请求。
S402,将所述多个业务请求中存在目标身份识别参数的业务请求确定为目标业务请求,并保存所述目标业务请求。
本申请实施例中,如果目标账号为第一账号,则该目标业务请求为第一业务请求,该目标身份识别参数为第一账号对应的身份识别参数;如果目标账号为第二账号,则该目标业务请求为第二业务请求,该目标身份识别参数为第二账号对应的身份识别参数。
S403,将所述目标业务请求发送给所述待检测的系统对应的系统后台。
S404,接收所述系统后台根据所述目标业务请求返回的数据,作为所述目标业务请求对应的第一目标返回数据,保存第一目标返回数据。
本申请实施例中,如果目标账号为第一账号,则该第一目标返回数据为第一返回数据;如果目标账号为第二账号,则该第一目标返回数据为第三返回数据。
可选地,该目标账号为第一账号的情况下,该流程还可以包括:
S405,将修改身份识别参数后的目标业务请求发送给所述系统后台。
在目标账号为第一账号的情况下,目标身份识别参数为第一账号对应的身份识别参数,修改身份识别参数后的目标业务请求中的身份识别参数为第二账号对应的身份识别参数。
S406,接收所述系统后台根据修改身份识别参数之后的目标业务请求返回的数据,作为所述目标业务请求对应的第二目标返回数据,保存第二目标返回数据。
本申请实施例中,第二目标返回数据可以为上述实施例中的第二返回数据。
本申请实施例中,通过网络爬虫保存多个业务逻辑对应的多个请求中的目标业务请求并向待检测的系统对应的系统后台发送这些目标业务请求,从而可以获取到这些目标业务请求对应的返回数据,实现了对各个业务逻辑对应的流量数据的获取。
参见图5,图5是本申请实施例提供的计算目标业务请求对应两个返回数据的相似度的方法的流程示意图,如图所示,该流程可包括:
S501,确定第一目标返回数据对应的第一目标SimHash值和第二目标返回数据对应的第二目标SimHash值。
这里,第一目标SimHash值为基于SimHash算法对第一目标返回数据进行计算得到的二进制字符串,第二目标SimHash值为基于SimHash算法对第二目标返回数据进行计算得到的二进制字符串。
本申请实施例中,如果目标业务请求为第一业务请求,则第一目标返回数据为第一返回数据,第一目标SimHash值为第一SimHash值,第二目标返回数据为第二返回数据,第二目标SimHash值为第二SimHash值;如果目标业务请求为第四业务请求,则第一目标返回数据为第一返回数据,第一目标SimHash值为第一SimHash值,第二目标返回数据为第三返回数据,第二目标SimHash值为第三SimHash值。
S502,确定第一目标SimHash值和第二目标SimHash值之间的汉明距离。
汉明距离指两个二进制字符串对应位不同的数据,具体实现中,可以对第一目标SimHash值和第二目标SimHash值进行异或运算得到异或运算值,确定异或运算值中1的个数,即为第一目标SimHash值和第二目标SimHash值之间的汉明距离。
举例来进行说明,例如,第一目标SimHash值为0111010101和第二目标SimHash值0101010100,将二者得到进行异或运算得到的异或运算值为0010000001,则确定第一目标SimHash值和第二目标SimHash值之间的汉明距离为2。
S503,如果第一目标SimHash值和第二目标SimHash值之间的汉明距离小于预设汉明距离阈值,则确定第一目标返回数据和第二目标返回数据的相似度大于目标相似阈值。
这里,预设汉明距离阈值可以为一个较小的值,例如为1,2,3,等等。
本申请实施例中,如果目标业务请求为第一业务请求,则目标相似阈值可以设置为第一相似阈值;如果目标业务请求为第四业务请求,则目标相似阈值可以设置为第二相似阈值。
本申请实施例中,通过确定一个业务请求对应的两个返回数据对应的SimHash值的汉明距离,可确定这个请求对应的两个返回数据的相似度,简单方便。
上面介绍了本申请实施例的方法,下面介绍本申请实施例的装置。
参见图6,图6是本申请实施例提供的一种越权漏洞检测装置的组成结构示意图,如图所示,所述装置60包括:
第一触发模块601,用于通过第一账号触发待检测的系统的多个业务逻辑;
第一流量获取模块602,用于分别获取通过所述第一账号触发的多个业务逻辑中的各个业务逻辑对应的第一业务流量,所述第一业务流量包括第一业务请求和所述第一业务请求对应的第一返回数据,所述第一业务请求中的身份识别参数为所述第一账号对应的身份识别参数;
参数修改模块603,用于分别将所述各个业务逻辑对应的第一业务请求中的身份识别参数修改为第二账号对应的身份识别参数,所述第一流量获取模块还用于分别获取修改身份识别参数后的第一业务请求对应的第二返回数据;
相似度确定模块604,用于分别确定所述各个第一业务请求对应的第一返回数据与所述第二返回数据的相似度;
漏洞确定模块605,用于如果所述各个第一业务请求中存在第二业务请求,则确定所述第二业务请求对应的业务逻辑存在越权漏洞,其中,所述第二业务请求对应的第一返回数据与第二返回数据的相似度大于第一相似阈值。
在一种可能的设计中,所述相似度确定模块604具体用于:
确定所述各个第一业务请求对应的第一SimHash值和第二SimHash值,所述第一SimHash值为所述第一返回数据的SimHash值,所述第二SimHash值为所述第二返回数据的SimHash值;
确定所述各个第一业务请求对应的第一SimHash值和第二SimHash值之间的汉明距离;
分别根据所述各个第一业务请求对应的第一SimHash值和第二SimHash值之间的汉明距离确定所述各个第一业务请求对应的第一返回数据与第二返回数据的相似度。
在一种可能的设计中,所述装置60还包括:
第二触发模块606,用于通过第二账号触发所述待检测的系统的多个业务逻辑;
第二流量获取模块607,用于分别获取通过所述第二账号触发的多个业务逻辑中的各个业务逻辑对应的第二业务流量,所述第二业务流量包括第三业务请求和所述第三业务请求对应的第三返回数据,所述第三业务请求中的身份识别参数为所述第二账号对应的身份识别参数;
业务请求确定模块608,用于确定第四业务请求,所述第四业务请求为所述第二业务请求中与所述第三业务请求相同的业务请求;
所述相似度确定模块604还用于确定所述第四业务请求对应的第一返回数据与第三返回数据的相似度;
所述漏洞确定模块605还用于如果所述第四业务请求中存在第五业务请求,则确定所述第二业务请求中的除所述第五业务请求之外的业务请求对应的业务逻辑存在越权漏洞,所述第五业务请求对应的第一返回数据与第三返回数据的相似度大于第二相似阈值。
在一种可能的设计中,所述第一流量获取模块602具体用于:
分别拦截触发所述各个业务逻辑后所述待检测的系统对应的系统前台向所述待检测的系统对应的系统后台发起的多个业务请求;
将所述多个业务请求中存在身份识别参数的业务请求确定为第一业务请求,并保存所述第一业务请求;
对所述第一业务请求进行放行,并拦截所述系统后台根据所述第一业务请求返回的数据,作为所述第一业务请求对应的第一返回数据;
保存所述第一返回数据。
在一种可能的设计中,所述第一流量获取模块602具体还用于:
如果所述多个业务请求中存在第六业务请求,则确定所述第六业务请求对应的业务逻辑不存在越权漏洞,所述第六业务请求为不存在身份识别参数的业务请求。
在一种可能的设计中,所述第一流量获取模块602具体用于:
通过网络爬虫分别获取所述业务逻辑中的各个业务逻辑对应的第一业务流量。
在一种可能的设计中,所述身份识别参数包括cookie信息、session信息、用户账户 标识或订单标识。
需要说明的是,图6对应的实施例中未提及的内容可参见方法实施例的描述,这里不再赘述。
本申请实施例中,提高了越权漏洞检测的检测效率且降低了越权漏洞误报的几率。
参见图7,图7是本申请实施例提供的另一种越权漏洞检测装置的组成结构示意图,如图所示,该装置70包括处理器701、存储器702以及输入输出接口703。处理器701连接到存储器702和输入输出接口703,例如处理器701可以通过总线连接到存储器702和输入输出接口703。
处理器701被配置为支持所述越权漏洞检测装置执行图1-图5所述的越权漏洞检测方法中相应的功能。该处理器701可以是中央处理器(Central Processing Unit,CPU),网络处理器(Network Processor,NP),硬件芯片或者其任意组合。上述硬件芯片可以是专用集成电路(Application-Specific Integrated Circuit,ASIC),可编程逻辑器件(Programmable Logic Device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(Complex Programmable Logic Device,CPLD),现场可编程逻辑门阵列(Field-Programmable Gate Array,FPGA),通用阵列逻辑(Generic Array Logic,GAL)或其任意组合。
存储器702存储器用于存储程序代码等。存储器702可以包括易失性存储器(Volatile Memory,VM),例如随机存取存储器(Random Access Memory,RAM);存储器702也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如只读存储器(Read-Only Memory,ROM),快闪存储器(flash memory),硬盘(Hard Disk Drive,HDD)或固态硬盘(Solid-State Drive,SSD);存储器702还可以包括上述种类的存储器的组合。本申请实施例中,存储器702用于存储越权漏洞检测程序。
所述输入输出接口703用于输入或输出数据,具体实现中,该输入输出接口可包括显示屏、键盘或鼠标等部件。
处理器701可以调用所述程序代码以执行以下操作:
通过第一账号触发待检测的系统的多个业务逻辑;
分别获取通过所述第一账号触发的多个业务逻辑中的各个业务逻辑对应的第一业务流量,所述第一业务流量包括第一业务请求和所述第一业务请求对应的第一返回数据,所述第一业务请求中的身份识别参数为所述第一账号对应的身份识别参数;
分别将所述各个业务逻辑对应的第一业务请求中的身份识别参数修改为第二账号对应的身份识别参数,并分别获取修改身份识别参数后的各个第一业务请求对应的第二返回数据;
分别确定所述各个第一业务请求对应的第一返回数据与第二返回数据的相似度;
如果所述各个第一业务请求中存在第二业务请求,则确定所述第二业务请求对应的业务逻辑存在越权漏洞,其中,所述第二业务请求对应的第一返回数据与第二返回数据的相似度大于第一相似阈值。
需要说明的是,各个操作的实现还可以对应参照图1-图5所示的方法实施例的相应描述;所述处理器701还可以与输入输出接口703配合执行上述方法实施例中的其他操作。
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被计算机执行时使所述计算机执行如前述实施例所述的方法,所述计算机可以为上述提到的越权漏洞检测装置的一部分。例如为上述的处理器701。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。
以上所揭露的仅为本申请较佳实施例而已,当然不能以此来限定本申请之权利范围,因此依本申请权利要求所作的等同变化,仍属本申请所涵盖的范围。
Claims (20)
- 一种越权漏洞检测方法,其特征在于,包括:通过第一账号触发待检测的系统的多个业务逻辑;分别获取通过所述第一账号触发的多个业务逻辑中的各个业务逻辑对应的第一业务流量,所述第一业务流量包括第一业务请求和所述第一业务请求对应的第一返回数据,所述第一业务请求中的身份识别参数为所述第一账号对应的身份识别参数;分别将所述各个业务逻辑对应的第一业务请求中的身份识别参数修改为第二账号对应的身份识别参数,并分别获取修改身份识别参数后的各个第一业务请求对应的第二返回数据;分别确定所述各个第一业务请求对应的第一返回数据与第二返回数据的相似度;如果所述各个第一业务请求中存在第二业务请求,则确定所述第二业务请求对应的业务逻辑存在越权漏洞,其中,所述第二业务请求对应的第一返回数据与第二返回数据的相似度大于第一相似阈值。
- 根据权利要求1所述的方法,其特征在于,所述分别确定所述各个第一业务请求对应的第一返回数据与第二返回数据的相似度包括:分别确定所述各个第一业务请求对应的第一SimHash值和第二SimHash值,所述第一SimHash值为所述第一返回数据的SimHash值,所述第二SimHash值为所述第二返回数据的SimHash值;分别确定所述各个第一业务请求对应的第一SimHash值和第二SimHash值之间的汉明距离;分别根据所述各个第一业务请求对应的第一SimHash值和第二SimHash值之间的汉明距离确定所述各个第一业务请求对应的第一返回数据与第二返回数据的相似度。
- 根据权利要求1所述的方法,其特征在于,所述确定所述第二业务请求对应的业务逻辑存在越权漏洞之后,还包括:通过第二账号触发所述待检测的系统的多个业务逻辑;分别获取通过所述第二账号触发的多个业务逻辑中的各个业务逻辑对应的第二业务流量,所述第二业务流量包括第三业务请求和所述第三业务请求对应的第三返回数据,所述第三业务请求中的身份识别参数为所述第二账号对应的身份识别参数;确定第四业务请求,所述第四业务请求为所述第二业务请求中与所述第三业务请求相同的业务请求;确定所述第四业务请求对应的第一返回数据与第三返回数据的相似度;如果所述第四业务请求中存在第五业务请求,则确定所述第二业务请求中的除所述第五业务请求之外的业务请求对应的业务逻辑存在越权漏洞,所述第五业务请求对应的第一返回数据与第三返回数据的相似度大于第二相似阈值。
- 根据权利要求1-3任一项所述的方法,其特征在于,所述分别获取通过所述第一账号触发的多个业务逻辑中的各个业务逻辑对应的第一业务流量包括:分别拦截触发所述各个业务逻辑后所述待检测的系统对应的系统前台向所述待检测的系统对应的系统后台发起的多个业务请求;将所述多个业务请求中存在身份识别参数的业务请求确定为第一业务请求,并保存所述第一业务请求;对所述第一业务请求进行放行,并拦截所述系统后台根据所述第一业务请求返回的数据,作为所述第一业务请求对应的第一返回数据;保存所述第一返回数据。
- 根据权利要求4所述的方法,其特征在于,所述分别拦截触发各个业务逻辑后所述待检测的系统对应的系统前台向所述待检测的系统对应的系统后台发起的多个业务请求之后还包括:如果所述多个业务请求中存在第六业务请求,则确定所述第六业务请求对应的业务逻辑不存在越权漏洞,所述第六业务请求为不存在身份识别参数的业务请求。
- 根据权利要求1-3任一项所述的方法,其特征在于,所述分别获取通过所述第一账号触发的多个业务逻辑中的各个业务逻辑对应的第一业务流量包括:通过网络爬虫爬取的方式分别获取所述各个业务逻辑对应的第一业务流量。
- 根据权利要求1所述的方法,其特征在于,所述身份识别参数包括cookie信息、session信息、用户账户标识或订单标识。
- 一种越权漏洞检测装置,其特征在于,包括:第一触发模块,用于通过第一账号触发待检测的系统的多个业务逻辑;第一流量获取模块,用于分别获取通过所述第一账号触发的多个业务逻辑中的各个业务逻辑对应的第一业务流量,所述第一业务流量包括第一业务请求和所述第一业务请求对应的第一返回数据,所述第一业务请求中的身份识别参数为所述第一账号对应的身份识别参数;参数修改模块,用于分别将所述各个业务逻辑对应的第一业务请求中的身份识别参数修改为第二账号对应的身份识别参数,所述第一流量获取模块还用于分别获取修改身份识别参数后的各个第一业务请求对应的第二返回数据;相似度确定模块,用于分别确定所述各个第一业务请求对应的第一返回数据与第二返回数据的相似度;漏洞确定模块,用于如果所述各个第一业务请求中存在第二业务请求,则确定所述第二业务请求对应的业务逻辑存在越权漏洞,其中,所述第二业务请求对应的第一返回数据与第二返回数据的相似度大于第一相似阈值。
- 根据权利要求8所述的装置,其特征在于,所述相似度确定模块具体用于:确定所述各个第一业务请求对应的第一SimHash值和第二SimHash值,所述第一SimHash值为所述第一返回数据的SimHash值,所述第二SimHash值为所述第二返回数据的SimHash值;确定所述各个第一业务请求对应的第一SimHash值和第二SimHash值之间的汉明距离;分别根据所述各个第一业务请求对应的第一SimHash值和第二SimHash值之间的汉明距离确定所述各个第一业务请求对应的第一返回数据与第二返回数据的相似度。
- 根据权利要求8所述的装置,其特征在于,所述装置还包括:第二触发模块,用于通过第二账号触发所述待检测的系统的多个业务逻辑;第二流量获取模块,用于分别获取通过所述第二账号触发的多个业务逻辑中的各个业务逻辑对应的第二业务流量,所述第二业务流量包括第三业务请求和所述第三业务请求对应的第三返回数据,所述第三业务请求中的身份识别参数为所述第二账号对应的身份识别参数;业务请求确定模块,用于确定第四业务请求,所述第四业务请求为所述第二业务请求中与所述第三业务请求相同的业务请求;所述相似度确定模块还用于确定所述第四业务请求对应的第一返回数据与第三返回数据的相似度;所述漏洞确定模块还用于如果所述第四业务请求中存在第五业务请求,则确定所述第二业务请求中的除所述第五业务请求之外的业务请求对应的业务逻辑存在越权漏洞,所述第五业务请求对应的第一返回数据与第三返回数据的相似度大于第二相似阈值。
- 根据权利要求8-10所述的装置,其特征在于,所述第一流量获取模块具体用于:分别拦截触发所述各个业务逻辑后所述待检测的系统对应的系统前台向所述待检测的系统对应的系统后台发起的多个业务请求;将所述多个业务请求中存在身份识别参数的业务请求确定为第一业务请求,并保存所述第一业务请求;对所述第一业务请求进行放行,并拦截所述系统后台根据所述第一业务请求返回的数据,作为所述第一业务请求对应的第一返回数据;保存所述第一返回数据。
- 根据权利要求11所述的装置,其特征在于,所述第一流量获取模块具体还用于:如果所述多个业务请求中存在第六业务请求,则确定所述第六业务请求对应的业务逻辑不存在越权漏洞,所述第六业务请求为不存在身份识别参数的业务请求。
- 根据权利要求8-10所述的装置,其特征在于,所述第一流量获取模块具体用于:通过网络爬虫分别获取所述业务逻辑中的各个业务逻辑对应的第一业务流量。
- 根据权利要求8所述的装置,其特征在于,所述身份识别参数包括cookie信息、session信息、用户账户标识或订单标识。
- 一种越权漏洞检测装置,其特征在于,包括处理器、存储器以及输入输出接口,所述处理器、存储器和输入输出接口相互连接,其中,所述输入输出接口用于输入输出数据,所述存储器用于存储程序代码,所述处理器用于调用所述程序代码,执行以下操作:通过第一账号触发待检测的系统的多个业务逻辑;分别获取通过所述第一账号触发的多个业务逻辑中的各个业务逻辑对应的第一业务流量,所述第一业务流量包括第一业务请求和所述第一业务请求对应的第一返回数据,所述第一业务请求中的身份识别参数为所述第一账号对应的身份识别参数;分别将所述各个业务逻辑对应的第一业务请求中的身份识别参数修改为第二账号对应的身份识别参数,并分别获取修改身份识别参数后的各个第一业务请求对应的第二返回数据;分别确定所述各个第一业务请求对应的第一返回数据与第二返回数据的相似度;如果所述各个第一业务请求中存在第二业务请求,则确定所述第二业务请求对应的业务逻辑存在越权漏洞,其中,所述第二业务请求对应的第一返回数据与第二返回数据的相似度大于第一相似阈值。
- 根据权利要求15所述的装置,其特征在于,所述处理器执行所述分别确定所述各个第一业务请求对应的第一返回数据与第二返回数据的相似度的操作,包括:分别确定所述各个第一业务请求对应的第一SimHash值和第二SimHash值,所述第一SimHash值为所述第一返回数据的SimHash值,所述第二SimHash值为所述第二返回数据的SimHash值;分别确定所述各个第一业务请求对应的第一SimHash值和第二SimHash值之间的汉明距离;分别根据所述各个第一业务请求对应的第一SimHash值和第二SimHash值之间的汉明距离确定所述各个第一业务请求对应的第一返回数据与第二返回数据的相似度。
- 根据权利要求15所述的装置,其特征在于,所述处理器还用于执行以下操作:通过第二账号触发所述待检测的系统的多个业务逻辑;分别获取通过所述第二账号触发的多个业务逻辑中的各个业务逻辑对应的第二业务流量,所述第二业务流量包括第三业务请求和所述第三业务请求对应的第三返回数据,所述第三业务请求中的身份识别参数为所述第二账号对应的身份识别参数;确定第四业务请求,所述第四业务请求为所述第二业务请求中与所述第三业务请求相同的业务请求;确定所述第四业务请求对应的第一返回数据与第三返回数据的相似度;如果所述第四业务请求中存在第五业务请求,则确定所述第二业务请求中的除所述第五业务请求之外的业务请求对应的业务逻辑存在越权漏洞,所述第五业务请求对应的第一返回数据与第三返回数据的相似度大于第二相似阈值。
- 根据权利要求15-17所述的装置,其特征在于,所述处理器执行所述分别获取通过所述第一账号触发的多个业务逻辑中的各个业务逻辑对应的第一业务流量的操作,包括:分别拦截触发所述各个业务逻辑后所述待检测的系统对应的系统前台向所述待检测的系统对应的系统后台发起的多个业务请求;将所述多个业务请求中存在身份识别参数的业务请求确定为第一业务请求,并保存所述第一业务请求;对所述第一业务请求进行放行,并拦截所述系统后台根据所述第一业务请求返回的数据,作为所述第一业务请求对应的第一返回数据;保存所述第一返回数据。
- 根据权利要求18所述的装置,其特征在于,所述处理器还用于执行以下操作:如果所述多个业务请求中存在第六业务请求,则确定所述第六业务请求对应的业务逻辑不存在越权漏洞,所述第六业务请求为不存在身份识别参数的业务请求。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行如权利要求1-7任一项所述的方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810676244.X | 2018-06-27 | ||
| CN201810676244.XA CN108932426B (zh) | 2018-06-27 | 2018-06-27 | 越权漏洞检测方法和装置 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020000723A1 true WO2020000723A1 (zh) | 2020-01-02 |
Family
ID=64447183
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2018/107641 Ceased WO2020000723A1 (zh) | 2018-06-27 | 2018-09-26 | 越权漏洞检测方法和装置 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN108932426B (zh) |
| WO (1) | WO2020000723A1 (zh) |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112765611A (zh) * | 2021-01-19 | 2021-05-07 | 上海微盟企业发展有限公司 | 一种越权漏洞检测方法、装置、设备及存储介质 |
| CN113032787A (zh) * | 2021-03-12 | 2021-06-25 | 北京安全共识科技有限公司 | 一种系统漏洞检测方法及装置 |
| CN113886818A (zh) * | 2021-10-28 | 2022-01-04 | 中国平安人寿保险股份有限公司 | 业务逻辑的异常处理方法、装置、计算机设备及存储介质 |
| CN114357460A (zh) * | 2021-12-28 | 2022-04-15 | 中国农业银行股份有限公司 | 漏洞检测方法、装置、设备及存储介质 |
| CN114386047A (zh) * | 2022-01-13 | 2022-04-22 | 平安普惠企业管理有限公司 | 应用漏洞检测方法、装置、电子设备及存储介质 |
| CN116055153A (zh) * | 2023-01-04 | 2023-05-02 | 浙江网商银行股份有限公司 | 一种防止越权访问的方法、装置和设备 |
Families Citing this family (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109902022A (zh) * | 2019-03-14 | 2019-06-18 | 深圳壹账通智能科技有限公司 | 针对垂直越权漏洞自动进行测试的方法及相关设备 |
| CN110489966B (zh) * | 2019-08-12 | 2024-11-15 | 腾讯科技(深圳)有限公司 | 平行越权漏洞检测方法、装置、存储介质及电子设备 |
| CN110674507A (zh) * | 2019-09-19 | 2020-01-10 | 深圳开源互联网安全技术有限公司 | 检测web应用越权的方法及系统 |
| CN110750786B (zh) * | 2019-10-30 | 2021-09-14 | 上海观安信息技术股份有限公司 | 一种账号异常访问敏感数据行为的检测方法及系统 |
| CN111125748A (zh) * | 2019-11-04 | 2020-05-08 | 广发银行股份有限公司 | 越权查询的判断方法、装置、计算机设备和存储介质 |
| CN111125713B (zh) * | 2019-12-18 | 2022-04-08 | 支付宝(杭州)信息技术有限公司 | 一种水平越权漏洞的检测方法、装置及电子设备 |
| CN111639020B (zh) * | 2020-05-06 | 2021-07-02 | 贝壳找房(北京)科技有限公司 | 一种程序漏洞复现方法、系统、装置、电子设备及其存储介质 |
| CN112115475B (zh) * | 2020-08-05 | 2025-03-21 | 杭州数梦工场科技有限公司 | 越权漏洞的检测方法、装置、存储介质及计算机设备 |
| CN113259327A (zh) * | 2021-04-20 | 2021-08-13 | 长沙市到家悠享网络科技有限公司 | 一种自动化接口检测方法、系统和计算机设备 |
| CN114841318B (zh) * | 2022-04-29 | 2024-10-15 | 哈尔滨工程大学 | 基于跨模态知识蒸馏的智能合约漏洞检测方法 |
| CN115460014B (zh) * | 2022-09-26 | 2025-07-11 | 建信金融科技有限责任公司 | 水平越权检测方法及装置 |
| CN116318984A (zh) * | 2023-03-17 | 2023-06-23 | 中国工商银行股份有限公司 | 水平越权攻击检测方法及装置 |
| CN116346488B (zh) * | 2023-04-13 | 2024-05-17 | 贝壳找房(北京)科技有限公司 | 一种越权访问的检测方法及装置 |
| CN119150292A (zh) * | 2024-08-09 | 2024-12-17 | 苏州国舜网络安全有限公司 | 一种业务逻辑漏洞检测方法及装置 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9112863B2 (en) * | 2009-12-14 | 2015-08-18 | International Business Machines Corporation | Method, program product and server for controlling a resource access to an electronic resource stored within a protected data environment |
| CN105357195A (zh) * | 2015-10-30 | 2016-02-24 | 深圳市深信服电子科技有限公司 | web访问的越权漏洞检测方法及装置 |
| CN107508839A (zh) * | 2017-09-28 | 2017-12-22 | 中国银联股份有限公司 | 一种控制web系统越权访问的方法和装置 |
| CN107566537A (zh) * | 2017-10-30 | 2018-01-09 | 郑州云海信息技术有限公司 | 一种web应用纵向越权漏洞的半自动检测方法及系统 |
| CN107577949A (zh) * | 2017-09-05 | 2018-01-12 | 郑州云海信息技术有限公司 | 一种Web越权漏洞检测方法与系统 |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8087088B1 (en) * | 2006-09-28 | 2011-12-27 | Whitehat Security, Inc. | Using fuzzy classification models to perform matching operations in a web application security scanner |
| CN107294919A (zh) * | 2016-03-31 | 2017-10-24 | 阿里巴巴集团控股有限公司 | 一种水平权限漏洞的检测方法及装置 |
| CN106101082A (zh) * | 2016-05-31 | 2016-11-09 | 乐视控股(北京)有限公司 | 权限漏洞检测方法及装置 |
| CN106713347B (zh) * | 2017-01-18 | 2019-06-11 | 国网江苏省电力公司电力科学研究院 | 一种电力移动应用越权访问漏洞检测方法 |
-
2018
- 2018-06-27 CN CN201810676244.XA patent/CN108932426B/zh active Active
- 2018-09-26 WO PCT/CN2018/107641 patent/WO2020000723A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9112863B2 (en) * | 2009-12-14 | 2015-08-18 | International Business Machines Corporation | Method, program product and server for controlling a resource access to an electronic resource stored within a protected data environment |
| CN105357195A (zh) * | 2015-10-30 | 2016-02-24 | 深圳市深信服电子科技有限公司 | web访问的越权漏洞检测方法及装置 |
| CN107577949A (zh) * | 2017-09-05 | 2018-01-12 | 郑州云海信息技术有限公司 | 一种Web越权漏洞检测方法与系统 |
| CN107508839A (zh) * | 2017-09-28 | 2017-12-22 | 中国银联股份有限公司 | 一种控制web系统越权访问的方法和装置 |
| CN107566537A (zh) * | 2017-10-30 | 2018-01-09 | 郑州云海信息技术有限公司 | 一种web应用纵向越权漏洞的半自动检测方法及系统 |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112765611A (zh) * | 2021-01-19 | 2021-05-07 | 上海微盟企业发展有限公司 | 一种越权漏洞检测方法、装置、设备及存储介质 |
| CN113032787A (zh) * | 2021-03-12 | 2021-06-25 | 北京安全共识科技有限公司 | 一种系统漏洞检测方法及装置 |
| CN113032787B (zh) * | 2021-03-12 | 2024-05-07 | 北京基调网络股份有限公司 | 一种系统漏洞检测方法及装置 |
| CN113886818A (zh) * | 2021-10-28 | 2022-01-04 | 中国平安人寿保险股份有限公司 | 业务逻辑的异常处理方法、装置、计算机设备及存储介质 |
| CN114357460A (zh) * | 2021-12-28 | 2022-04-15 | 中国农业银行股份有限公司 | 漏洞检测方法、装置、设备及存储介质 |
| CN114386047A (zh) * | 2022-01-13 | 2022-04-22 | 平安普惠企业管理有限公司 | 应用漏洞检测方法、装置、电子设备及存储介质 |
| CN116055153A (zh) * | 2023-01-04 | 2023-05-02 | 浙江网商银行股份有限公司 | 一种防止越权访问的方法、装置和设备 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN108932426B (zh) | 2022-05-03 |
| CN108932426A (zh) | 2018-12-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2020000723A1 (zh) | 越权漏洞检测方法和装置 | |
| US12301628B2 (en) | Correlating network event anomalies using active and passive external reconnaissance to identify attack information | |
| US20250047717A1 (en) | Cybersecurity risk analysis and anomaly detection using active and passive external reconnaissance | |
| US11750659B2 (en) | Cybersecurity profiling and rating using active and passive external reconnaissance | |
| US20240364749A1 (en) | Automated internet-scale web application vulnerability scanning and enhanced security profiling | |
| US11601475B2 (en) | Rating organization cybersecurity using active and passive external reconnaissance | |
| US12206707B2 (en) | Rating organization cybersecurity using probe-based network reconnaissance techniques | |
| WO2022028012A1 (zh) | 资产评分方法、装置、计算机设备及存储介质 | |
| CN112003838B (zh) | 网络威胁的检测方法、装置、电子装置和存储介质 | |
| US12111935B2 (en) | Intrusion detection | |
| CN111552973B (zh) | 对设备进行风险评估的方法、装置、电子设备及介质 | |
| CN106685899B (zh) | 用于识别恶意访问的方法和设备 | |
| WO2019144548A1 (zh) | 安全测试方法、装置、计算机设备和存储介质 | |
| US20160036812A1 (en) | Database Queries Integrity and External Security Mechanisms in Database Forensic Examinations | |
| WO2023151238A1 (zh) | 一种勒索病毒检测方法及相关系统 | |
| US11630895B2 (en) | System and method of changing the password of an account record under a threat of unlawful access to user data | |
| CN113596044A (zh) | 一种网络防护方法、装置、电子设备及存储介质 | |
| US11647031B2 (en) | Determining an origin server is potentially compromised | |
| CN120200815A (zh) | 一种基于攻击链的网络攻击分析方法、装置及电子设备 | |
| CN114598485B (zh) | 在小程序后台防止DDoS攻击的方法、设备和介质 | |
| WO2021154460A1 (en) | Cybersecurity profiling and rating using active and passive external reconnaissance | |
| WO2024251350A1 (en) | Unauthorized database access detection using honeypots | |
| CN121887409A (zh) | 用于确定越权风险的方法、设备、介质及程序产品 | |
| CN115459943A (zh) | 一种资源访问方法及装置 | |
| CN114900352A (zh) | 旁路阻断方法、装置、电子设备、介质和程序产品 |
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: 18924740 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 08.04.2021) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 18924740 Country of ref document: EP Kind code of ref document: A1 |