WO2018086292A1 - 应用软件安全漏洞检测方法、系统、设备及存储介质 - Google Patents
应用软件安全漏洞检测方法、系统、设备及存储介质 Download PDFInfo
- Publication number
- WO2018086292A1 WO2018086292A1 PCT/CN2017/077984 CN2017077984W WO2018086292A1 WO 2018086292 A1 WO2018086292 A1 WO 2018086292A1 CN 2017077984 W CN2017077984 W CN 2017077984W WO 2018086292 A1 WO2018086292 A1 WO 2018086292A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- point
- external input
- sensitive
- call point
- call
- 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
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
- G06F21/57—Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
- G06F21/577—Assessing vulnerabilities and evaluating computer system security
Definitions
- the present invention relates to the field of data security technologies, and in particular, to an application software security vulnerability detection method, system, device, and computer readable storage medium.
- the main object of the present invention is to provide a software security vulnerability detection method, system, device and computer readable storage medium, which aims to solve the technical problem of low efficiency of detection of security vulnerability of application software.
- the present invention provides an application software security vulnerability detection method, and the application software security vulnerability detection method includes the following steps:
- the external input point corresponding to the sensitive call point is backtracked according to the variable parameter of the sensitive call point;
- the external input point corresponding to the sensitive call point is successfully found, the external input point is determined to be a security vulnerability of the application software.
- the step of searching back the external input point corresponding to the sensitive call point according to the variable parameter of the sensitive call point includes:
- predecessor call point is based on a return value of the function call output, then backtracking to find the predecessor call point of the predecessor call point argument to determine the source node;
- the source node is an external input point, determining that the external input point is an external input point corresponding to the sensitive call point;
- the backtracking is stopped, and it is determined that the external input point corresponding to the sensitive call point is not found.
- the application software security vulnerability detection method further includes:
- the step of backtracking and searching for the external input point corresponding to the sensitive call point according to the variable parameter of the sensitive call point further includes:
- the right value is a variable input by the external input point, determining that the external input point is an external input point corresponding to the sensitive call point;
- the backtracking is stopped, and it is determined that the external input point corresponding to the sensitive call point is not found.
- the method further includes:
- the method further includes:
- the present invention further provides an application software security vulnerability detection system, where the application software security vulnerability detection system includes:
- An acquisition module configured to collect data flow information flowing through the sensitive call point during operation of the application software based on an instrument inserted in a sensitive call point of the application software;
- a determining module configured to determine, according to the data flow information, whether the sensitive calling point is contaminated by the tainted data
- a backtracking module configured to: if the sensitive call point is polluted, look up the external input point corresponding to the sensitive call point according to the variable parameter of the sensitive call point;
- a determining module configured to determine that the external input point is a security vulnerability of the application software if the external input point corresponding to the sensitive calling point is successfully found.
- the backtracking module is further configured to:
- the backtracking module is further configured to:
- the backtracking module is further configured to:
- the precursor call point outputs the variable parameter as an assignment, acquiring an right value corresponding to the variable parameter; if the right value is a variable input by the external input point, determining that the external input point is the sensitive The external input point corresponding to the call point; if the right value is a constant assignment, the backtracking is stopped, and it is determined that the external input point corresponding to the sensitive call point is not found.
- the application software security vulnerability detection system further comprises:
- a smudge module is configured to input smear data at each external input point of the application software when the application software is running.
- the determining module is further configured to:
- the present invention further provides an application software security vulnerability detecting device, the application software security vulnerability detecting device comprising a processor and a memory, wherein the memory stores an application software security vulnerability detecting program;
- the processor is configured to execute the application security vulnerability detection program to implement the following steps:
- the external input point corresponding to the sensitive call point is backtracked according to the variable parameter of the sensitive call point;
- the external input point corresponding to the sensitive call point is successfully found, the external input point is determined to be a security vulnerability of the application software.
- the processor is further configured to execute the application software security vulnerability detection program to implement the following steps:
- predecessor call point is based on a return value of the function call output, then backtracking to find the predecessor call point of the predecessor call point argument to determine the source node;
- the source node is an external input point, determining that the external input point is an external input point corresponding to the sensitive call point;
- the backtracking is stopped, and it is determined that the external input point corresponding to the sensitive call point is not found.
- the processor is further configured to execute the application software security vulnerability detection program to implement the following steps:
- the processor is further configured to execute the application software security vulnerability detection program to implement the following steps:
- the right value is a variable input by the external input point, determining that the external input point is an external input point corresponding to the sensitive call point;
- the backtracking is stopped, and it is determined that the external input point corresponding to the sensitive call point is not found.
- the present invention also provides a computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors To achieve the following steps:
- the external input point corresponding to the sensitive call point is backtracked according to the variable parameter of the sensitive call point;
- the external input point corresponding to the sensitive call point is successfully found, the external input point is determined to be a security vulnerability of the application software.
- the one or more programs are executable by the one or more processors, and the following steps are also implemented:
- predecessor call point is based on a return value of the function call output, then backtracking to find the predecessor call point of the predecessor call point argument to determine the source node;
- the source node is an external input point, determining that the external input point is an external input point corresponding to the sensitive call point;
- the backtracking is stopped, and it is determined that the external input point corresponding to the sensitive call point is not found.
- the one or more programs are executable by the one or more processors, and the following steps are also implemented:
- the one or more programs are executable by the one or more processors, and the following steps are also implemented:
- the right value is a variable input by the external input point, determining that the external input point is an external input point corresponding to the sensitive call point;
- the backtracking is stopped, and it is determined that the external input point corresponding to the sensitive call point is not found.
- An application software security vulnerability detecting method, system, device and computer readable storage medium collects an application calling point through a sensitive calling point during operation of the application software based on an instrumentation configured in advance at a sensitive calling point of the application software.
- Data flow information, dynamic data collection, simulation of the actual running state of the application software, the data collected relative to the static data is more authentic, can better detect the security of the application software, and improve the detection efficiency of the security vulnerability;
- the external input point corresponding to the sensitive call point is backtracked, that is, the external input point which is more than enough to call the sensitive call point is found; if the external input point corresponding to the sensitive call point is successfully found, it is determined that the find is found.
- the external input point is a security vulnerability of the application software.
- the offline automatic stain data propagation analysis is used to detect potential security vulnerabilities in the application.
- FIG. 1 is a schematic flowchart of a first embodiment of a method for detecting a security vulnerability of an application software according to the present invention
- FIG. 2 is a schematic diagram showing the refinement process of the step of searching back the external input point corresponding to the sensitive call point according to the variable parameter of the sensitive call point in FIG. 1;
- FIG. 3 is a schematic diagram showing the refinement process of the step of searching back the external input point corresponding to the sensitive call point according to the variable parameter of the sensitive call point in FIG. 1;
- FIG. 4 is a schematic flowchart of a second embodiment of a method for detecting a security vulnerability of an application software according to the present invention
- FIG. 5 is a schematic flowchart of a third embodiment of a method for detecting a security vulnerability of an application software according to the present invention.
- FIG. 6 is a schematic diagram of functional modules of a first embodiment of an application software security vulnerability detection system according to the present invention.
- FIG. 7 is a schematic diagram of functional modules of a second embodiment of an application software security vulnerability detection system according to the present invention.
- FIG. 8 is a schematic structural diagram of a device in a hardware operating environment according to an embodiment of the present invention.
- a first embodiment of an application security vulnerability detection method of the present invention provides an application security vulnerability detection method, where the application software security vulnerability detection method includes:
- Step S10 Collect data flow information flowing through the sensitive call point during the running of the application software based on the instrumentation configured in advance at the application software sensitive call point.
- the invention configures the instrumentation through the function-sensitive calling point of the application software, and acquires the data flow flowing through the instrumentation point (that is, the sensitive calling point) during the running of the program, and is used for detecting whether the sensitive calling point is safe, thereby performing data backtracking. . Since the collected data is the data in the real running process of the application software, it is real and effective, which reduces the probability of false negatives and false positives, and improves the detection efficiency of the security vulnerability of the application software.
- the instrument is configured to be inserted at a sensitive call point to be detected by the application software to be detected, so as to collect the running of the application software.
- the key to calling data is configured to be inserted at a sensitive call point to be detected by the application software to be detected, so as to collect the running of the application software.
- the application software to be detected is started, and the data flow information collected by the instrumentation through the sensitive call point is obtained.
- the data flow information collected by the instrumentation includes the parameters passed to the sensitive call point when the sensitive call point is called during the running of the application software, and the return value output by the sensitive call point after executing the function call according to the passed parameter.
- the sensitive call point is a key call point in the application software, or a call point with high security requirements.
- the tester can manually determine the sensitive call point to be detected, and configure at each sensitive call point to be detected. Inserting piles.
- Step S20 Determine, according to the data flow information, whether the sensitive call point is contaminated by the tainted data.
- the smudge data will transmit the pollution-related parameters during the running of the application software, and the associated parameters will be labeled with pollution.
- the parameter flowing through the sensitive call point carries the smudge label, it can be determined that the sensitive call point is contaminated by the smudge data, that is, the data input by the external input point can influence and control the sensitive call point, and there is a risk.
- Step S30 If the sensitive call point is contaminated, the external input point corresponding to the sensitive call point is backtracked according to the variable parameter of the sensitive call point.
- the sensitive call point is polluted, first determine the variable parameters of the sensitive call point. For example, if the sensitive call point uses the formal parameter execution function to output the return value, the parameter of the sensitive call point is the variable parameter, which needs to be traced to the sensitive call. Point, the actual parameter assigned to the parameter.
- the actual parameters passed to the sensitive call point are backtracked, and the source of the parameter value of the variable is searched to obtain the call point of the value affecting the parameter of the variable until the found
- the call point that affects the value of this variable parameter is the source node, such as constant assignment, external input point, etc., stopping data backtracking.
- the source node of the call point that can affect the value of the variable parameter is an external input point
- the step of searching back the external input point corresponding to the sensitive call point according to the variable parameter of the sensitive call point includes:
- Step S31 backtracking and searching for a precursor call point for outputting the variable parameter according to the variable parameter
- Step S32 if the precursor call point is based on the return value of the function call output, then backtracking to find the precursor call point of the precursor call point argument, and determining the source node;
- Step S33 if the source node is an external input point, determining that the external input point is an external input point corresponding to the sensitive call point;
- Step S34 If the source node is a constant value, the backtracking is stopped, and it is determined that the external input point corresponding to the sensitive calling point is not found.
- the parameter passed to the sensitive call point is A
- the sensitive call point will output the return value according to the A execution function call, and then the formal parameter of the sensitive call point is determined as the variable parameter.
- the predecessor call point executes the function call earlier than the comparison call point in the execution order of each call point of the application software. For example, in the above "Finding the call point of output A", the function execution order of the predecessor call point should be earlier than the current sensitive call point.
- the parameter output by the precursor call point 1 is the variable input by the external input point, that is, A is output corresponding to the variable input by the precursor call point 1 according to the external input point, it can be confirmed that the external input point is the source node of the data stream, That is, the external input point corresponding to the current sensitive call point.
- the B seeks to return the B caller's call point according to B, that is, the search outputs B as the return value, and the execution order is earlier than the predecessor call point. The call point of 1, and so on, until the source node of the data stream is found.
- the source node is an external input point, it can be determined that the source node is an external input point corresponding to the sensitive call point.
- the source node is assigned a constant, it can be determined that the external input point is not backtracked, the current sensitive call point is safe, and the backtracking is stopped.
- variable parameters When data backtracking is performed according to variable parameters, multiple call point output parameters may be encountered as the variable parameters.
- the call point of the execution order before the sensitive call point is filtered out. It can also be called a call point whose execution order is earlier than the sensitive call point.
- the call point is the current search for the data backtracking call point; if the filter has more call points, then according to this The execution order of multiple call points, determining that the execution order is the latest, but the call point earlier than the sensitive call point is the currently searched, used for further data backtracking call point, that is, the execution order is closest to the sensitive call point.
- the precursor call point If there is only one call point after filtering, it can be determined that the call point is the current search for the data backtracking call point; if the filter has more call points, then according to this The execution order of multiple call points, determining that the execution order is the latest, but the call point earlier than the sensitive call point is the currently searched, used for further data backtracking call point, that is, the execution order is closest to the sensitive call point. The precursor call point.
- the execution order of call point 2 and call point 3 is obtained. If call point 2 is executed before call point 3 and sensitive call point is executed later than call point 3, the execution order of call point 3 is closer to the sensitive call point, and call point 3 is determined to be the precursor call point; if call point 3 precedes the call Point 2 execution, the sensitive call point is executed later than call point 2, then the execution order of call point 2 is closer to the sensitive call point, and the call point 2 is determined to be the precursor call point.
- the execution order is earlier than the current call point and is closest to the current call point. For the predecessor call point, continue data backtracking.
- the precursor call point can be uniquely determined, and data lookback and external input point search can be performed by calling point timing.
- the step of backtracking and searching for an external input point corresponding to the sensitive call point according to the parameter that is transmitted to the sensitive call point in the data flow information further includes: :
- Step S35 If the precursor call point outputs the variable parameter as an assignment, acquiring an right value corresponding to the variable parameter;
- Step S36 if the right value is a variable input by the external input point, determining that the external input point is an external input point corresponding to the sensitive call point;
- Step S37 If the right value is a constant assignment, the backtracking is stopped, and it is determined that the external input point corresponding to the sensitive call point is not found.
- variable parameter value of the sensitive call point is determined by the assignment of the predecessor parameter, that is, the parameter that is passed to the sensitive call point and the variable parameter is assigned is the assignment of the predecessor call point, then the corresponding right value is backtracked, that is, the pair is passed. The right value assigned to the variable argument of the sensitive call point.
- the right value is a variable input by an external input point, that is, the precursor call point is assigned to the output parameter according to the variable input by the external input point, it can be determined that the external input point is an external input point corresponding to the sensitive call point.
- Step S40 If the external input point corresponding to the sensitive call point is successfully found, determine that the external input point is a security vulnerability of the application software.
- the found external input point may be used to input the data, and the sensitive call point is called to bring security risks to the application software.
- the external input point is a security vulnerability of the application software, and the vulnerability is reported.
- the data flow information flowing through the sensitive call point during the running of the application software is collected, and the dynamic data collection is performed to simulate the actual running state of the application software, as opposed to
- the data collected by static data is more authentic, can better detect the security of the application software, improve the efficiency of security vulnerability detection; then, according to the data flow information flowing through the sensitive call point, determine whether the sensitive call point is tainted Data pollution; if the sensitive call point is polluted, the sensitive call point may be called by the external input point, which affects the application software security. At this time, according to the variable parameters of the sensitive call point, the external input point corresponding to the sensitive call point is backtracked.
- the offline automatic stain data propagation analysis is performed to detect potential security vulnerabilities in the application.
- the second embodiment of the application security vulnerability detection method of the present invention provides an application security vulnerability detection method, based on the first embodiment of the application security vulnerability detection method of the present invention, before the step S10, Also includes:
- Step S50 When the application software is running, inputting stain data at each external input point of the application software.
- the stain data with the pollution label is input into the application software through various external input points of the application software.
- the taint data After the taint data is input into the application software, it follows the call of each call point, and pollutes the associated parameters through assignment, function call, and the like. If the contaminated parameter flows through the call point, the call point is considered to be smeared.
- the sensitive call point is contaminated during the running of the application software, it can be determined that the associated parameter of the taint data input by the external input point can flow through the sensitive call point for function call, that is, the sensitive call point can be called by the external input point. There is a security hole. Then, according to the data flow of the sensitive call point, data backtracking is performed to find an external input point capable of calling a sensitive call point, and the external input point capable of calling the sensitive call point is a security vulnerability of the application software.
- the smear data is input at each external input point of the application software to detect whether the sensitive call point is infected, so as to find a corresponding security vulnerability according to the infected sensitive call point.
- Implemented detection of application software vulnerabilities by inputting the smear data to each external input point, the application software is run, and the sensitive call point having the risk of being called by the external input point can be quickly and accurately marked, thereby improving the accuracy of the risk call point and realizing the application.
- the detection of deep logic of software reduces the false positives and false negatives of vulnerabilities and improves the efficiency of vulnerability detection.
- a third embodiment of the application security vulnerability detection method of the present invention provides an application security vulnerability detection method, based on the first embodiment or the second embodiment of the application security vulnerability detection method of the present invention.
- the embodiment takes the first embodiment of the application security vulnerability detection method of the present invention as an example.
- the method further includes:
- Step S60 Determine a path backtracking to find the external input point as a dangerous path.
- the path information of the external input point is extracted, and the path of the stain data input from the external input point to the sensitive call point and the infected call points on the path are obtained.
- the above-mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
- the first embodiment of the application software security vulnerability detection system of the present invention provides an application software security vulnerability detection system, where the application software security vulnerability detection system includes:
- the collecting module 10 is configured to collect data flow information flowing through the sensitive calling point during the running of the application software based on the instrumentation configured in advance at the application software sensitive calling point.
- the invention configures the instrumentation through the function-sensitive calling point of the application software, and acquires the data flow flowing through the instrumentation point (that is, the sensitive calling point) during the running of the program, and is used for detecting whether the sensitive calling point is safe, thereby performing data backtracking. . Since the collected data is the data in the real running process of the application software, it is real and effective, which reduces the probability of false negatives and false positives, and improves the detection efficiency of the security vulnerability of the application software.
- the instrument is configured to be inserted at a sensitive call point to be detected by the application software to be detected, so as to collect the running of the application software.
- the key to calling data is configured to be inserted at a sensitive call point to be detected by the application software to be detected, so as to collect the running of the application software.
- the application software to be detected is started, and the collection module 10 acquires the data flow information collected by the instrumentation through the sensitive call point.
- the data flow information collected by the instrumentation includes the parameters passed to the sensitive call point when the sensitive call point is called during the running of the application software, and the return value output by the sensitive call point after executing the function call according to the passed parameter.
- the sensitive call point is a key call point in the application software, or a call point with high security requirements.
- the tester can manually determine the sensitive call point to be detected, and configure at each sensitive call point to be detected. Inserting piles.
- the determining module 20 is configured to determine, according to the data flow information, whether the sensitive calling point is contaminated by the stain data.
- the smudge data will transmit the pollution-related parameters during the running of the application software, and the associated parameters will be labeled with pollution.
- the judging module 20 can determine that the sensitive call point is contaminated by the smudge data, that is, the data input by the external input point can influence and control the sensitive call point, and there is a risk. .
- the backtracking module 30 is configured to backtrack and search the external input point corresponding to the sensitive calling point according to the variable parameter of the sensitive calling point if the sensitive calling point is contaminated.
- the backtracking module 30 first needs to determine the variable parameters of the sensitive call point.
- the sensitive call point uses the formal parameter execution function to output the return value, and the parameter of the sensitive call point is the variable parameter, which needs to be traced.
- the actual parameters passed to the sensitive call point are backtracked, and the source of the parameter value of the variable is searched to obtain the call point of the value affecting the parameter of the variable until the found
- the call point that affects the value of this variable parameter is the source node, such as constant assignment, external input point, etc., stopping data backtracking.
- the backtracking module 30 determines that the external input point is an external input point corresponding to the sensitive call point, and the data input by the external input point can influence and control the sensitivity. Calling points pose a risk to the application.
- the backtracking module 30 is further configured to:
- the parameter passed to the sensitive call point is A
- the sensitive call point will output the return value according to the A execution function call
- the backtracking module 30 determines the parameter of the sensitive call point as the variable parameter.
- the backtracking module 30 searches for the precursor call point of the return or output A in the application software according to the parameter A passed to the sensitive call point, that is, finds the call point that outputs A as the return value and the execution order is earlier than the sensitive call point.
- the predecessor call point executes the function call earlier than the comparison call point in the execution order of each call point of the application software. For example, in the above "Finding the call point of output A", the function execution order of the predecessor call point should be earlier than the current sensitive call point.
- the traceback module 30 determines whether the parameter output by the precursor call point 1 is a variable input by the external input point.
- the traceback module 30 can confirm that the external input point is the data stream.
- the source node which is the external input point corresponding to the current sensitive call point.
- the B seeks to return the B caller's call point according to B, that is, the search outputs B as the return value, and the execution order is earlier than the predecessor call point. The call point of 1, and so on, until the source node of the data stream is found.
- the traceback module 30 can determine to find the source node as an external input point corresponding to the sensitive call point.
- the backtracking module 30 can determine that the current input point is not backtracked, the current sensitive call point is safe, and the backtracking is stopped.
- the backtracking module 30 finds a plurality of outputting the variable parameters and the execution order precedes the calling point of the sensitive calling point, determining that the execution order of the plurality of calling points is the closest to the near-sensitive calling point The precursor call point.
- the backtracking module 30 When the backtracking module 30 performs data backtracking according to the variable parameters, multiple call point output parameters may be encountered as the variable parameters. At this time, the backtracking module 30 first selects the execution order prior to the sensitive according to the execution order of each call point.
- the call point of the call point can also be called the call point whose execution order is earlier than the sensitive call point.
- the backtracking module 30 can determine that the call point is the currently searched for the data backtracking call point; if the screen has more than one call point, then The backtracking module 30 determines, according to the execution order of the plurality of call points, that the call point that is executed at the latest but earlier than the sensitive call point is the currently searched, and is used for further data backtracking call point, that is, the execution order is determined. Near the sensitive call point is the precursor call point.
- the execution order of call point 2 and call point 3 is obtained. If call point 2 is executed before call point 3 and sensitive call point is executed later than call point 3, the execution order of call point 3 is closer to the sensitive call point, and call point 3 is determined to be the precursor call point; if call point 3 precedes the call Point 2 execution, the sensitive call point is executed later than call point 2, then the execution order of call point 2 is closer to the sensitive call point, and the call point 2 is determined to be the precursor call point.
- the execution order is earlier than the current call point and is closest to the current call point. For the predecessor call point, continue data backtracking.
- the traceback module 30 can uniquely determine the precursor call point, and realizes data backtracking and external input point search by calling point timing.
- the backtracking module 30 is further configured to:
- the precursor call point outputs the variable parameter as an assignment, acquiring an right value corresponding to the variable parameter; if the right value is a variable input by the external input point, determining that the external input point is the sensitive The external input point corresponding to the call point; if the right value is a constant assignment, the backtracking is stopped, and it is determined that the external input point corresponding to the sensitive call point is not found.
- variable parameter value of the sensitive call point is determined by the assignment of the predecessor parameter, that is, the parameter that is passed to the sensitive call point and the variable parameter is assigned is the assignment of the predecessor call point
- the backtracking module 30 backtracks the corresponding right value, That is, the right value assigned to the variable parameter passed to the sensitive call point.
- the right value is a variable input by an external input point, that is, the precursor call point is assigned to the output parameter according to the variable input by the external input point, it can be determined that the external input point is an external input point corresponding to the sensitive call point.
- the backtracking module 30 can determine the current data chain security, does not go back to the external input point, and stops the backtracking.
- the backtracking module 30 implements data tracking of function calls and assignments, ensuring the integrity and accuracy of the backtracking call points.
- the determining module 40 is configured to determine that the external input point is a security vulnerability of the application software if the external input point corresponding to the sensitive calling point is successfully found.
- the found external input point may be used to input the data, and the sensitive call point is called to bring security risks to the application software.
- the determining module 40 can determine that the external input point is a security vulnerability of the application software and perform vulnerability reporting.
- the collection module 10 collects data flow information flowing through the sensitive call point during the running of the application software based on the instrument piled in the sensitive call point of the application software, performs dynamic data collection, and simulates the actual running state of the application software. Compared with the static data, the collected data is more authentic, can better perform the security detection of the application software, and improve the security vulnerability detection efficiency; then, the judging module 20 judges according to the data flow information flowing through the sensitive call point. Whether the sensitive call point is contaminated by the smudge data; if the sensitive call point is contaminated, the sensitive call point may be called by the external input point, which affects the security of the application software.
- the traceback module 30 backtracks and searches for the sensitive parameter according to the variable parameter of the sensitive call point.
- the external input point corresponding to the call point that is, the external input point that is more than enough to call the sensitive call point; if the external input point corresponding to the sensitive call point is successfully found, the determining module 40 determines that the found external input point is the application software.
- Security vulnerabilities pose risks to applications.
- the offline automatic stain data propagation analysis is performed to detect potential security vulnerabilities in the application.
- the second embodiment of the application software security vulnerability detection system of the present invention provides an application software security vulnerability detection system, based on the first embodiment of the application software security vulnerability detection system of the present invention, the application software security vulnerability.
- the inspection system also includes:
- the smear module 50 is configured to input smear data at each external input point of the application software when the application software is running.
- the stain module 50 inputs the stain data with the pollution label into the application software through various external input points of the application software. .
- the taint data After the taint data is input into the application software, it follows the call of each call point, and pollutes the associated parameters through assignment, function call, and the like. If the contaminated parameter flows through the call point, the call point is considered to be smeared.
- the traceback module 30 performs data backtracking according to the data stream of the sensitive call point, and finds an external input point that can call the sensitive call point. This can call the external input point of the sensitive call point as the security vulnerability of the application software.
- the stain module 50 inputs the stain data at each external input point of the application software to detect whether the sensitive call point is infected, thereby searching for the corresponding corresponding point according to the infected sensitive call point.
- Security vulnerabilities have enabled the detection of application software vulnerabilities.
- the application software is run, and the sensitive call point having the risk of being called by the external input point can be quickly and accurately marked, thereby improving the accuracy of the risk call point and realizing the application.
- the detection of deep logic of software reduces the false positives and false negatives of vulnerabilities and improves the efficiency of vulnerability detection.
- the third embodiment of the application software security vulnerability detection system of the present invention provides an application software security vulnerability detection system. Based on the first embodiment and the second embodiment of the application software security vulnerability detection system of the present invention, the determination module 40 Also used,
- the determining module 40 extracts the path information of the external input point, obtains the path of the stain data input from the external input point to the sensitive call point, and the infected each on the path. Call point.
- the determining module 40 marks the path as a dangerous path, so that the developer can understand the specific risk of the sensitive calling point to improve the completeness of the application software.
- the determining module 40 determines that the path of the corresponding call point corresponding to the external input point is found to be a dangerous path, so that the developer can further analyze the cause of the vulnerability and improve the security of the application software.
- the foregoing collection module 10, the determination module 20, the backtracking module 30, the determination module 40, and the stain module 50 may be embedded in the hardware or independent of the application security vulnerability detection system. It may be stored in software in the memory of the application security vulnerability detection system, so that the processor invokes the operations corresponding to the above modules.
- the processor can be a central processing unit (CPU), a microprocessor, a microcontroller, or the like.
- FIG. 8 is a schematic structural diagram of a device in a hardware operating environment according to an embodiment of the present invention.
- the application security vulnerability detecting device in the embodiment of the present invention may be a PC, or may be a terminal device such as a smart phone, a tablet computer, an e-book reader, or a portable computer.
- the application software security vulnerability detecting device may include a processor 1001, such as a CPU, and a memory 1002. Connection communication between these components can be achieved via a communication bus.
- the memory 1002 may be a high speed RAM memory or a stable memory (non-volatile) Memory), such as disk storage.
- the memory 1002 can also optionally be a storage device independent of the aforementioned processor 1001.
- the application security vulnerability detecting device may further include a user interface, a network interface, a camera, and an RF (Radio). Frequency, RF) circuits, sensors, audio circuits, WiFi modules, and more.
- the user interface may include a display, an input unit such as a keyboard, and the optional user interface may also include a standard wired interface, a wireless interface.
- the network interface can optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
- the application software security vulnerability detecting device structure shown in FIG. 8 does not constitute a limitation on the application software security vulnerability detecting device, and may include more or less components than the illustration, or a combination of some Parts, or different parts.
- an operating system and an application security vulnerability detection program may be included in the memory 1002 as a computer storage medium.
- the operating system is a program that manages and controls the hardware and software resources of the application security vulnerability detection device, and supports the operation of the application security vulnerability detection program and other software or programs.
- the processor 1001 may be configured to execute an application security vulnerability detection program stored in the memory 1002 to implement the following steps:
- the external input point corresponding to the sensitive call point is backtracked according to the variable parameter of the sensitive call point;
- the external input point corresponding to the sensitive call point is successfully found, the external input point is determined to be a security vulnerability of the application software.
- processor 1001 can also execute an application security vulnerability detection program stored in the memory 1002 to implement the following steps:
- predecessor call point is based on a return value of the function call output, then backtracking to find the predecessor call point of the predecessor call point argument to determine the source node;
- the source node is an external input point, determining that the external input point is an external input point corresponding to the sensitive call point;
- the backtracking is stopped, and it is determined that the external input point corresponding to the sensitive call point is not found.
- processor 1001 can also execute an application security vulnerability detection program stored in the memory 1002 to implement the following steps:
- processor 1001 can also execute an application security vulnerability detection program stored in the memory 1002 to implement the following steps:
- the right value is a variable input by the external input point, determining that the external input point is an external input point corresponding to the sensitive call point;
- the backtracking is stopped, and it is determined that the external input point corresponding to the sensitive call point is not found.
- processor 1001 can also execute an application security vulnerability detection program stored in the memory 1002 to implement the following steps:
- processor 1001 can also execute an application security vulnerability detection program stored in the memory 1002 to implement the following steps:
- the specific embodiment of the application software security vulnerability detecting device of the present invention is basically the same as the foregoing embodiment of the application software security vulnerability detecting method and system, and details are not described herein.
- the present invention provides a computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the following steps:
- the external input point corresponding to the sensitive call point is backtracked according to the variable parameter of the sensitive call point;
- the external input point corresponding to the sensitive call point is successfully found, the external input point is determined to be a security vulnerability of the application software.
- the one or more programs may be executed by the one or more processors, and the following steps are also implemented:
- predecessor call point is based on a return value of the function call output, then backtracking to find the predecessor call point of the predecessor call point argument to determine the source node;
- the source node is an external input point, determining that the external input point is an external input point corresponding to the sensitive call point;
- the backtracking is stopped, and it is determined that the external input point corresponding to the sensitive call point is not found.
- the one or more programs may be executed by the one or more processors, and the following steps are also implemented:
- the one or more programs may be executed by the one or more processors, and the following steps are also implemented:
- the right value is a variable input by the external input point, determining that the external input point is an external input point corresponding to the sensitive call point;
- the backtracking is stopped, and it is determined that the external input point corresponding to the sensitive call point is not found.
- the one or more programs may be executed by the one or more processors, and the following steps are also implemented:
- the one or more programs may be executed by the one or more processors, and the following steps are also implemented:
- the technical solution of the present invention which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
- a storage medium such as ROM/RAM, disk,
- the optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
本发明公开了一种应用软件安全漏洞检测方法,该方法包括:基于预先在应用软件敏感调用点配置的插桩,采集所述应用软件运行过程中流经所述敏感调用点的数据流信息;根据所述数据流信息,判断所述敏感调用点是否被污点数据污染;若所述敏感调用点被污染,则根据所述敏感调用点的变量参数,回溯查找所述敏感调用点对应的外部输入点;若成功查找到所述敏感调用点对应的外部输入点,则确定所述外部输入点为所述应用软件的安全漏洞。本发明还公开了一种应用软件安全漏洞检测系统、设备及计算机可读存储介质。本发明大大提高了应用软件的安全漏洞检测效率。
Description
技术领域
本发明涉及数据安全技术领域,尤其涉及一种应用软件安全漏洞检测方法、系统、设备及计算机可读存储介质。
背景技术
智能手机中安装的应用软件类型多样,为人们的生活、娱乐、工作带来了极大的便利。由于应用软件可能涉及各用户的隐私、财产安全,因此,应用软件的安全性一直是人们关注的重点。
现有应用软件安全漏洞检测大部分是基于静态的规则扫描和应用组件类的模糊测试实现,如墨贝系统和Drozer工具,是通过对应用软件代码的静态扫描实现软件安全性的检测。这样的检测方法方案比较粗糙,仅仅是基于代码文字的规则匹配,存在大量的误报和漏报;另一方面,由于检测的覆盖面有限,并不能深入发现应用软件的功能逻辑所存在的安全隐患。
因此,如何提高应用软件的安全漏洞检测效率成为了亟需解决的问题。
发明内容
本发明的主要目的在于提供一种软件安全漏洞检测方法、系统、设备及计算机可读存储介质,旨在解决应用软件的安全漏洞检测效率低的技术问题。
为实现上述目的,本发明提供一种应用软件安全漏洞检测方法,所述应用软件安全漏洞检测方法包括以下步骤:
基于预先在应用软件敏感调用点配置的插桩,采集所述应用软件运行过程中流经所述敏感调用点的数据流信息;
根据所述数据流信息,判断所述敏感调用点是否被污点数据污染;
若所述敏感调用点被污染,则根据所述敏感调用点的变量参数,回溯查找所述敏感调用点对应的外部输入点;
若成功查找到所述敏感调用点对应的外部输入点,则确定所述外部输入点为所述应用软件的安全漏洞。
优选地,所述根据所述敏感调用点的变量参数,回溯查找所述敏感调用点对应的外部输入点的步骤包括:
根据所述变量参数,回溯查找输出所述变量参数的前驱调用点;
若所述前驱调用点是基于函数调用输出的返回值,则再次回溯查找返回所述前驱调用点实参的前驱调用点,确定源节点;
若所述源节点为外部输入点,则确定所述外部输入点为所述敏感调用点对应的外部输入点;
若所述源节点为常量赋值,则停止回溯,确定未找到所述敏感调用点对应的外部输入点。
优选地,所述应用软件安全漏洞检测方法还包括:
若找到多个输出所述变量参数且执行顺序先于所述敏感调用点的调用点,则确定所述多个调用点中执行顺序最接所述近敏感调用点的为所述前驱调用点。
优选地,所述根据所述敏感调用点的变量参数,回溯查找所述敏感调用点对应的外部输入点的步骤还包括:
若所述前驱调用点将所述变量参数作为赋值输出,则获取所述变量参数对应的右值;
若所述右值为外部输入点输入的变量,则确定所述外部输入点为所述敏感调用点对应的外部输入点;
若所述右值为常量赋值,则停止回溯,确定未找到所述敏感调用点对应的外部输入点。
优选地,所述基于预先在应用软件敏感调用点配置的插桩,采集所述应用软件运行过程中流经所述敏感调用点的数据流信息的步骤之前,还包括:
当所述应用软件运行时,在所述应用软件的各外部输入点输入污点数据。
优选地,所述确定所述外部输入点为所述应用软件的安全漏洞的步骤之后,还包括:
确定回溯找到所述外部输入点的路径为危险路径。
此外,为实现上述目的,本发明还提供一种应用软件安全漏洞检测系统,所述应用软件安全漏洞检测系统包括:
采集模块,用于基于预先在应用软件敏感调用点配置的插桩,采集所述应用软件运行过程中流经所述敏感调用点的数据流信息;
判断模块,用于根据所述数据流信息,判断所述敏感调用点是否被污点数据污染;
回溯模块,用于若所述敏感调用点被污染,则根据所述敏感调用点的变量参数,回溯查找所述敏感调用点对应的外部输入点;
确定模块,用于若成功查找到所述敏感调用点对应的外部输入点,则确定所述外部输入点为所述应用软件的安全漏洞。
优选地,所述回溯模块还用于,
根据所述变量参数,回溯查找输出所述变量参数的前驱调用点;若所述前驱调用点是基于函数调用输出的返回值,则再次回溯查找返回所述前驱调用点实参的前驱调用点,确定源节点;若所述源节点为外部输入点,则确定所述外部输入点为所述敏感调用点对应的外部输入点;若所述源节点为常量赋值,则停止回溯,确定未找到所述敏感调用点对应的外部输入点。
优选地,所述回溯模块还用于,
若找到多个输出所述变量参数且执行顺序先于所述敏感调用点的调用点,则确定所述多个调用点中执行顺序最接所述近敏感调用点的为所述前驱调用点。
优选地,所述回溯模块还用于,
若所述前驱调用点将所述变量参数作为赋值输出,则获取所述变量参数对应的右值;若所述右值为外部输入点输入的变量,则确定所述外部输入点为所述敏感调用点对应的外部输入点;若所述右值为常量赋值,则停止回溯,确定未找到所述敏感调用点对应的外部输入点。
优选地,所述应用软件安全漏洞检测系统还包括:
污点模块,用于当所述应用软件运行时,在所述应用软件的各外部输入点输入污点数据。
优选地,所述确定模块还用于,
确定回溯找到所述外部输入点的路径为危险路径。
此外,为实现上述目的,本发明还提供一种应用软件安全漏洞检测设备,所述应用软件安全漏洞检测设备包括处理器及存储器,所述存储器中存储有应用软件安全漏洞检测程序;
所述处理器用于执行所述应用软件安全漏洞检测程序,以实现以下步骤:
基于预先在应用软件敏感调用点配置的插桩,采集所述应用软件运行过程中流经所述敏感调用点的数据流信息;
根据所述数据流信息,判断所述敏感调用点是否被污点数据污染;
若所述敏感调用点被污染,则根据所述敏感调用点的变量参数,回溯查找所述敏感调用点对应的外部输入点;
若成功查找到所述敏感调用点对应的外部输入点,则确定所述外部输入点为所述应用软件的安全漏洞。
优选地,所述处理器还用于执行所述应用软件安全漏洞检测程序,以实现以下步骤:
根据所述变量参数,回溯查找输出所述变量参数的前驱调用点;
若所述前驱调用点是基于函数调用输出的返回值,则再次回溯查找返回所述前驱调用点实参的前驱调用点,确定源节点;
若所述源节点为外部输入点,则确定所述外部输入点为所述敏感调用点对应的外部输入点;
若所述源节点为常量赋值,则停止回溯,确定未找到所述敏感调用点对应的外部输入点。
优选地,所述处理器还用于执行所述应用软件安全漏洞检测程序,以实现以下步骤:
若找到多个输出所述变量参数且执行顺序先于所述敏感调用点的调用点,则确定所述多个调用点中执行顺序最接所述近敏感调用点的为所述前驱调用点。
优选地,所述处理器还用于执行所述应用软件安全漏洞检测程序,以实现以下步骤:
若所述前驱调用点将所述变量参数作为赋值输出,则获取所述变量参数对应的右值;
若所述右值为外部输入点输入的变量,则确定所述外部输入点为所述敏感调用点对应的外部输入点;
若所述右值为常量赋值,则停止回溯,确定未找到所述敏感调用点对应的外部输入点。
此外,为实现上述目的,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现以下步骤:
基于预先在应用软件敏感调用点配置的插桩,采集所述应用软件运行过程中流经所述敏感调用点的数据流信息;
根据所述数据流信息,判断所述敏感调用点是否被污点数据污染;
若所述敏感调用点被污染,则根据所述敏感调用点的变量参数,回溯查找所述敏感调用点对应的外部输入点;
若成功查找到所述敏感调用点对应的外部输入点,则确定所述外部输入点为所述应用软件的安全漏洞。
优选地,所述一个或者多个程序可被所述一个或者多个处理器执行,还实现以下步骤:
根据所述变量参数,回溯查找输出所述变量参数的前驱调用点;
若所述前驱调用点是基于函数调用输出的返回值,则再次回溯查找返回所述前驱调用点实参的前驱调用点,确定源节点;
若所述源节点为外部输入点,则确定所述外部输入点为所述敏感调用点对应的外部输入点;
若所述源节点为常量赋值,则停止回溯,确定未找到所述敏感调用点对应的外部输入点。
优选地,所述一个或者多个程序可被所述一个或者多个处理器执行,还实现以下步骤:
若找到多个输出所述变量参数且执行顺序先于所述敏感调用点的调用点,则确定所述多个调用点中执行顺序最接所述近敏感调用点的为所述前驱调用点。
优选地,所述一个或者多个程序可被所述一个或者多个处理器执行,还实现以下步骤:
若所述前驱调用点将所述变量参数作为赋值输出,则获取所述变量参数对应的右值;
若所述右值为外部输入点输入的变量,则确定所述外部输入点为所述敏感调用点对应的外部输入点;
若所述右值为常量赋值,则停止回溯,确定未找到所述敏感调用点对应的外部输入点。
本发明实施例提出的一种应用软件安全漏洞检测方法、系统、设备和计算机可读存储介质,通过基于预先在应用软件敏感调用点配置的插桩,采集应用软件运行过程中流经敏感调用点的数据流信息,进行动态的数据采集,模拟应用软件实际运行的状态,相对于静态数据来说采集的数据更具有真实性,能够更好的进行应用软件的安全性检测,提高安全漏洞检测效率;然后,根据流经敏感调用点的数据流信息,判断敏感调用点是否被污点数据污染;若敏感调用点被污染,则敏感调用点可能被外部输入点关联调用,影响应用软件安全,此时,根据敏感调用点的变量参数,回溯查找敏感调用点对应的外部输入点,也即查找更够调用敏感调用点的外部输入点;若成功查找到敏感调用点对应的外部输入点,则确定此找到的外部输入点为应用软件的安全漏洞,会给应用软件带来风险。本发明中基于应用软件运行过程中的关键调用和数据处理操作的实时监控输出,通过离线自动污点数据传播分析,检测应用潜在的安全漏洞。通过采用动态插桩和离线数据流分析动静态结合的检测技术,能够覆盖应用软件更深层次功能和逻辑检查,不存在漏报,且采集的数据来自实际运行过程,真实有效,不存在误报,大大提高了应用软件的安全漏洞检测效率。
附图说明
图1为本发明应用软件安全漏洞检测方法第一实施例的流程示意图;
图2为图1中根据所述敏感调用点的变量参数,回溯查找所述敏感调用点对应的外部输入点的步骤的细化流程示意图;
图3为图1中根据所述敏感调用点的变量参数,回溯查找所述敏感调用点对应的外部输入点的步骤的细化流程示意图;
图4为本发明应用软件安全漏洞检测方法第二实施例的流程示意图;
图5为本发明应用软件安全漏洞检测方法第三实施例的流程示意图;
图6为本发明应用软件安全漏洞检测系统第一实施例的功能模块示意图;
图7为本发明应用软件安全漏洞检测系统第二实施例的功能模块示意图;
图8是本发明实施例方案涉及的硬件运行环境的设备结构示意图。
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
参照图1,本发明应用软件安全漏洞检测方法第一实施例提供一种应用软件安全漏洞检测方法,所述应用软件安全漏洞检测方法包括:
步骤S10、基于预先在应用软件敏感调用点配置的插桩,采集所述应用软件运行过程中流经所述敏感调用点的数据流信息。
本发明通过在应用软件的函数敏感调用点配置插桩,在程序运行时,获取流经插桩点(也即敏感调用点)的数据流,用于检测敏感调用点是否安全,从而进行数据回溯。由于采集的数据是应用软件真实运行过程中的数据,因此真实有效,降低了漏洞漏报和误报的概率,提高了应用软件的安全漏洞检测效率。
具体的,作为一种实施方式,首先,在不破坏待检测应用软件的程序原有逻辑完整性的前提下,在待检测应用软件需检测的敏感调用点配置插桩,以采集应用软件的运行时的关键调用数据。
在配置程序插桩后,启动待检测的应用软件,获取插桩采集的流经敏感调用点的数据流信息。
插桩采集的数据流信息包括应用软件运行过程中,调用此敏感调用点时传递给此敏感调用点的参数,以及敏感调用点根据传递的参数执行函数调用后输出的返回值等信息。
需要说明的是,敏感调用点是应用软件中的关键调用点,或是安全性要求要高的调用点,可以由测试人员人为确定需检测的敏感调用点,在需检测的各敏感调用点配置插桩。
步骤S20、根据所述数据流信息,判断所述敏感调用点是否被污点数据污染。
需要说明的是,在通过外部输入点向应用软件输入污点数据后,污点数据会在应用软件运行的过程中,传递污染关联的参数,关联参数会被打上污染标签。
则,若流经敏感调用点的参数携带有污点标签,则可以判定此敏感调用点被污点数据污染,也即,外部输入点输入的数据能够影响、控制此敏感调用点,存在风险。
步骤S30、若所述敏感调用点被污染,则根据所述敏感调用点的变量参数,回溯查找所述敏感调用点对应的外部输入点。
若敏感调用点被污染,则首先需要确定敏感调用点的变量参数,例如,敏感调用点使用形参执行函数输出返回值,则敏感调用点的形参即为变量参数,需要追踪传递给敏感调用点、对形参赋值的实参。
然后,根据插桩采集的数据流信息中传递给此敏感调用点的实参,进行数据回溯,查找此变量参数数值的来源,以获取影响此变量参数的值的调用点,直至查找到的能够影响此变量参数的值的调用点为源节点,例如常量赋值、外部输入点等时,停止数据回溯。
需要说明的是,源节点的参数不再受应用软件内部其他调用点的影响。
若能够影响此变量参数的值的调用点的源节点为外部输入点,则确定此外部输入点为敏感调用点对应的外部输入点,此外部输入点输入的数据能够影响、控制敏感调用点,给应用软件造成风险。
作为一种实施方式,参照图2,所述根据所述敏感调用点的变量参数,回溯查找所述敏感调用点对应的外部输入点的步骤包括:
步骤S31、根据所述变量参数,回溯查找输出所述变量参数的前驱调用点;
步骤S32、若所述前驱调用点是基于函数调用输出的返回值,则再次回溯查找返回所述前驱调用点实参的前驱调用点,确定源节点;
步骤S33、若所述源节点为外部输入点,则确定所述外部输入点为所述敏感调用点对应的外部输入点;
步骤S34、若所述源节点为常量赋值,则停止回溯,确定未找到所述敏感调用点对应的外部输入点。
例如,主函数调用当前敏感调用点时,传递给敏感调用点的参数为A,敏感调用点根据A执行函数调用后会对应输出返回值,则确定敏感调用点的形参为变量参数。
然后,根据传递给敏感调用点的参数A,查找应用软件中返回或输出A的前驱调用点,也即查找将A作为返回值输出且执行顺序早于敏感调用点的调用点。
需要说明的是,前驱调用点在应用软件的各调用点执行顺序中,早于对比调用点执行函数调用。例如上述“查找输出A的前驱调用点”中,前驱调用点的函数执行顺序应当早于当前敏感调用点。
若前驱调用点1输出的返回值为A,则判断前驱调用点1输出的参数是否为外部输入点输入的变量。
若前驱调用点1输出的参数是外部输入点输入的变量,也即A是由前驱调用点1根据外部输入点输入的变量对应输出的,则可以确认此外部输入点为数据流的源节点,也就是当前敏感调用点对应的外部输入点。
若前驱调用点1是根据输入的实参B,执行函数调用运算得到A,则根据B继续查找返回B的前驱调用点,也即查找将B作为返回值输出,且执行顺序早于前驱调用点1的调用点,以此类推,直至找到数据流的源节点。
若源节点为外部输入点,则可以确定找到源节点为敏感调用点对应的外部输入点。
若源节点为常量赋值,则可以确定未回溯到外部输入点,当前敏感调用点安全,停止回溯。
进一步地,若找到多个输出所述变量参数且执行顺序先于所述敏感调用点的调用点,则确定所述多个调用点中执行顺序最接所述近敏感调用点的为所述前驱调用点。
在根据变量参数进行数据回溯时,可能会遇到多个调用点输出参数均为此变量参数,此时,首先根据各调用点的执行顺序,筛选出执行顺序先于敏感调用点的调用点,也可称为执行顺序早于敏感调用点的调用点。
若筛选后,得到的调用点只有一个,则就可以确定此调用点为当前查找的、用于进一步进行数据回溯前驱调用点;若筛选后,得到的调用点有多个,则此时根据这多个调用点的执行顺序,确定执行顺序最晚、但早于敏感调用点的调用点为当前查找的、用于进一步进行数据回溯前驱调用点,也即确定执行顺序最接近敏感调用点的为前驱调用点。
例如,若输出A的调用点包括调用点2、调用点3,则获取调用点2、调用点3的执行顺序。若调用点2先于调用点3执行,敏感调用点晚于调用点3执行,则调用点3的执行顺序更加接近敏感调用点,确定调用点3为前驱调用点;若调用点3先于调用点2执行,敏感调用点晚于调用点2执行,则调用点2的执行顺序更加接近敏感调用点,确定调用点2为前驱调用点。
同理,在后续回溯数据时,若遇到多个调用点输出的参数均为当前回溯的参数、无法确定前驱调用点的情况时,选取执行顺序早于当前调用点、且最接近当前调用点的为前驱调用点,继续进行数据回溯。
由此,在有多个调用点输出变量参数时,可以唯一确定前驱调用点,实现了通过调用点时序,进行数据回溯和外部输入点的查找。
进一步地,作为另一种实施方式,参照图3,所述根据所述数据流信息中传递给所述敏感调用点的参数,回溯查找所述敏感调用点对应的外部输入点的步骤,还包括:
步骤S35、若所述前驱调用点将所述变量参数作为赋值输出,则获取所述变量参数对应的右值;
步骤S36、若所述右值为外部输入点输入的变量,则确定所述外部输入点为所述敏感调用点对应的外部输入点;
步骤S37、若所述右值为常量赋值,则停止回溯,确定未找到所述敏感调用点对应的外部输入点。
若敏感调用点的变量参数值是由前驱参数的赋值决定的,也即传递给敏感调用点、对变量参数进行赋值的参数是前驱调用点的赋值,则回溯对应的右值,也即对传递给敏感调用点的变量参数进行赋值的右值。
若此右值是外部输入点输入的变量,也即前驱调用点是根据外部输入点输入的变量对输出的参数进行赋值的,则可以确定此外部输入点为敏感调用点对应的外部输入点。
若右值为常量赋值,则可以确定当前数据链安全,未回溯到外部输入点,停止回溯。
由此,实现了对函数调用和赋值的数据追踪,保障了回溯调用点的完整性和准确性。
步骤S40、若成功查找到所述敏感调用点对应的外部输入点,则确定所述外部输入点为所述应用软件的安全漏洞。
若成功回溯数据找到敏感调用点对应的外部输入点,则找到的外部输入点可能会被利用输入数据,调用此敏感调用点,给应用软件带来安全隐患。
由此,可以确定此外部输入点为应用软件的安全漏洞,进行漏洞上报。
在本实施例中,基于预先在应用软件敏感调用点配置的插桩,采集应用软件运行过程中流经敏感调用点的数据流信息,进行动态的数据采集,模拟应用软件实际运行的状态,相对于静态数据来说采集的数据更具有真实性,能够更好的进行应用软件的安全性检测,提高安全漏洞检测效率;然后,根据流经敏感调用点的数据流信息,判断敏感调用点是否被污点数据污染;若敏感调用点被污染,则敏感调用点可能被外部输入点关联调用,影响应用软件安全,此时,根据敏感调用点的变量参数,回溯查找敏感调用点对应的外部输入点,也即查找更够调用敏感调用点的外部输入点;若成功查找到敏感调用点对应的外部输入点,则确定此找到的外部输入点为应用软件的安全漏洞,会给应用软件带来风险。本实施例中基于应用软件运行过程中的关键调用和数据处理操作的实时监控输出,通过离线自动污点数据传播分析,检测应用潜在的安全漏洞。通过采用动态插桩和离线数据流分析动静态结合的检测技术,能够覆盖应用软件更深层次功能和逻辑检查,不存在漏报,且采集的数据来自实际运行过程,真实有效,不存在误报,大大提高了应用软件的安全漏洞检测效率。
进一步地,参照图4,本发明应用软件安全漏洞检测方法第二实施例提供一种应用软件安全漏洞检测方法,基于上述本发明应用软件安全漏洞检测方法第一实施例,所述步骤S10之前,还包括:
步骤S50、当所述应用软件运行时,在所述应用软件的各外部输入点输入污点数据。
当应用软件的敏感调用点已经配置好插桩,启动运行时,或在应用软件运行的过程中,通过应用软件的各个外部输入点,向应用软件中输入带有污染标签的污点数据。
污点数据再被输入应用软件后,跟随各调用点的调用,通过赋值、函数调用等方式,污染关联的参数。若被污染的参数流经调用点,则可认为此调用点被污点。
若应用软件运行的过程中敏感调用点被污染,则可以确定外部输入点输入的污点数据的关联参数能够流经此敏感调用点进行函数调用,也即此敏感调用点能够被外部输入点调用,存在安全漏洞。然后,根据敏感调用点的数据流进行数据回溯,查找能够调用敏感调用点的外部输入点,此能够调用敏感调用点的外部输入点即为应用软件的安全漏洞。
在本实施例中,当所述应用软件运行时,在应用软件的各外部输入点输入污点数据,用以检测敏感调用点是否被感染,从而根据被感染的敏感调用点查找对应的安全漏洞,实现了对应用软件漏洞的检测。本实施例通过向各外部输入点输入污点数据,使应用软件运行起来,能够快速、准确的标记出存在被外部输入点调用风险的敏感调用点,进而提高风险调用点的准确率,实现对应用软件深层逻辑的检测,减少漏洞的误报和漏报,提高漏洞检测的效率。
进一步地,参照图5,本发明应用软件安全漏洞检测方法第三实施例提供一种应用软件安全漏洞检测方法,基于上述本发明应用软件安全漏洞检测方法第一实施例或第二实施例(本实施例以上述本发明应用软件安全漏洞检测方法第一实施例为例),所述步骤S40之后,还包括:
步骤S60、确定回溯找到所述外部输入点的路径为危险路径。
当成功找到敏感调用点对应的外部输入点时,将找到外部输入点的路径信息提取出来,得到从外部输入点输入的污点数据流向敏感调用点的路径,以及路径上被感染的各调用点。
然后,标记此路径为危险路径,便于研发人员了解敏感调用点的具体风险,以提高应用软件的完全性。
在本实施例中,确定回溯找到敏感调用点对应外部输入点的路径为危险路径,以便于研发人员进行进一步地漏洞原因分析、提升应用软件的安全性。
需要说明的是,本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
参照图6,本发明应用软件安全漏洞检测系统第一实施例提供一种应用软件安全漏洞检测系统,所述应用软件安全漏洞检测系统包括:
采集模块10,用于基于预先在应用软件敏感调用点配置的插桩,采集所述应用软件运行过程中流经所述敏感调用点的数据流信息。
本发明通过在应用软件的函数敏感调用点配置插桩,在程序运行时,获取流经插桩点(也即敏感调用点)的数据流,用于检测敏感调用点是否安全,从而进行数据回溯。由于采集的数据是应用软件真实运行过程中的数据,因此真实有效,降低了漏洞漏报和误报的概率,提高了应用软件的安全漏洞检测效率。
具体的,作为一种实施方式,首先,在不破坏待检测应用软件的程序原有逻辑完整性的前提下,在待检测应用软件需检测的敏感调用点配置插桩,以采集应用软件的运行时的关键调用数据。
在配置程序插桩后,启动待检测的应用软件,采集模块10获取插桩采集的流经敏感调用点的数据流信息。
插桩采集的数据流信息包括应用软件运行过程中,调用此敏感调用点时传递给此敏感调用点的参数,以及敏感调用点根据传递的参数执行函数调用后输出的返回值等信息。
需要说明的是,敏感调用点是应用软件中的关键调用点,或是安全性要求要高的调用点,可以由测试人员人为确定需检测的敏感调用点,在需检测的各敏感调用点配置插桩。
判断模块20,用于根据所述数据流信息,判断所述敏感调用点是否被污点数据污染。
需要说明的是,在通过外部输入点向应用软件输入污点数据后,污点数据会在应用软件运行的过程中,传递污染关联的参数,关联参数会被打上污染标签。
则,若流经敏感调用点的参数携带有污点标签,则判断模块20可以判定此敏感调用点被污点数据污染,也即,外部输入点输入的数据能够影响、控制此敏感调用点,存在风险。
回溯模块30,用于若所述敏感调用点被污染,则根据所述敏感调用点的变量参数,回溯查找所述敏感调用点对应的外部输入点。
若敏感调用点被污染,则回溯模块30首先需要确定敏感调用点的变量参数,例如,敏感调用点使用形参执行函数输出返回值,则敏感调用点的形参即为变量参数,需要追踪传递给敏感调用点、对形参赋值的实参。
然后,根据插桩采集的数据流信息中传递给此敏感调用点的实参,进行数据回溯,查找此变量参数数值的来源,以获取影响此变量参数的值的调用点,直至查找到的能够影响此变量参数的值的调用点为源节点,例如常量赋值、外部输入点等时,停止数据回溯。
需要说明的是,源节点的参数不再受应用软件内部其他调用点的影响。
若能够影响此变量参数的值的调用点的源节点为外部输入点,则回溯模块30确定此外部输入点为敏感调用点对应的外部输入点,此外部输入点输入的数据能够影响、控制敏感调用点,给应用软件造成风险。
作为一种实施方式,所述回溯模块30还用于,
根据所述变量参数,回溯查找输出所述变量参数的前驱调用点;若所述前驱调用点是基于函数调用输出的返回值,则再次回溯查找返回所述前驱调用点实参的前驱调用点,确定源节点;若所述源节点为外部输入点,则确定所述外部输入点为所述敏感调用点对应的外部输入点;若所述源节点为常量赋值,则停止回溯根据,确定未找到所述敏感调用点对应的外部输入点。
例如,主函数调用当前敏感调用点时,传递给敏感调用点的参数为A,敏感调用点根据A执行函数调用后会对应输出返回值,则回溯模块30确定敏感调用点的形参为变量参数。
然后,回溯模块30根据传递给敏感调用点的参数A,查找应用软件中返回或输出A的前驱调用点,也即查找将A作为返回值输出且执行顺序早于敏感调用点的调用点。
需要说明的是,前驱调用点在应用软件的各调用点执行顺序中,早于对比调用点执行函数调用。例如上述“查找输出A的前驱调用点”中,前驱调用点的函数执行顺序应当早于当前敏感调用点。
若前驱调用点1输出的返回值为A,则回溯模块30判断前驱调用点1输出的参数是否为外部输入点输入的变量。
若前驱调用点1输出的参数是外部输入点输入的变量,也即A是由前驱调用点1根据外部输入点输入的变量对应输出的,则回溯模块30可以确认此外部输入点为数据流的源节点,也就是当前敏感调用点对应的外部输入点。
若前驱调用点1是根据输入的实参B,执行函数调用运算得到A,则根据B继续查找返回B的前驱调用点,也即查找将B作为返回值输出,且执行顺序早于前驱调用点1的调用点,以此类推,直至找到数据流的源节点。
若源节点为外部输入点,则回溯模块30可以确定找到源节点为敏感调用点对应的外部输入点。
若源节点为常量赋值,则回溯模块30可以确定未回溯到外部输入点,当前敏感调用点安全,停止回溯。
进一步地,若回溯模块30找到多个输出所述变量参数且执行顺序先于所述敏感调用点的调用点,则确定所述多个调用点中执行顺序最接所述近敏感调用点的为所述前驱调用点。
回溯模块30在根据变量参数进行数据回溯时,可能会遇到多个调用点输出参数均为此变量参数,此时,回溯模块30首先根据各调用点的执行顺序,筛选出执行顺序先于敏感调用点的调用点,也可称为执行顺序早于敏感调用点的调用点。
若筛选后,得到的调用点只有一个,则回溯模块30就可以确定此调用点为当前查找的、用于进一步进行数据回溯前驱调用点;若筛选后,得到的调用点有多个,则此时回溯模块30根据这多个调用点的执行顺序,确定执行顺序最晚、但早于敏感调用点的调用点为当前查找的、用于进一步进行数据回溯前驱调用点,也即确定执行顺序最接近敏感调用点的为前驱调用点。
例如,若输出A的调用点包括调用点2、调用点3,则获取调用点2、调用点3的执行顺序。若调用点2先于调用点3执行,敏感调用点晚于调用点3执行,则调用点3的执行顺序更加接近敏感调用点,确定调用点3为前驱调用点;若调用点3先于调用点2执行,敏感调用点晚于调用点2执行,则调用点2的执行顺序更加接近敏感调用点,确定调用点2为前驱调用点。
同理,在后续回溯数据时,若遇到多个调用点输出的参数均为当前回溯的参数、无法确定前驱调用点的情况时,选取执行顺序早于当前调用点、且最接近当前调用点的为前驱调用点,继续进行数据回溯。
由此,在有多个调用点输出变量参数时,回溯模块30可以唯一确定前驱调用点,实现了通过调用点时序,进行数据回溯和外部输入点的查找。
进一步地,作为另一种实施方式,所述回溯模块30还用于,
若所述前驱调用点将所述变量参数作为赋值输出,则获取所述变量参数对应的右值;若所述右值为外部输入点输入的变量,则确定所述外部输入点为所述敏感调用点对应的外部输入点;若所述右值为常量赋值,则停止回溯,确定未找到所述敏感调用点对应的外部输入点。
若敏感调用点的变量参数值是由前驱参数的赋值决定的,也即传递给敏感调用点、对变量参数进行赋值的参数是前驱调用点的赋值,则回溯模块30回溯对应的右值,也即对传递给敏感调用点的变量参数进行赋值的右值。
若此右值是外部输入点输入的变量,也即前驱调用点是根据外部输入点输入的变量对输出的参数进行赋值的,则可以确定此外部输入点为敏感调用点对应的外部输入点。
若右值为常量赋值,则回溯模块30可以确定当前数据链安全,未回溯到外部输入点,停止回溯。
由此,回溯模块30实现了对函数调用和赋值的数据追踪,保障了回溯调用点的完整性和准确性。
确定模块40,用于若成功查找到所述敏感调用点对应的外部输入点,则确定所述外部输入点为所述应用软件的安全漏洞。
若成功回溯数据找到敏感调用点对应的外部输入点,则找到的外部输入点可能会被利用输入数据,调用此敏感调用点,给应用软件带来安全隐患。
由此,确定模块40可以确定此外部输入点为应用软件的安全漏洞,进行漏洞上报。
在本实施例中,采集模块10基于预先在应用软件敏感调用点配置的插桩,采集应用软件运行过程中流经敏感调用点的数据流信息,进行动态的数据采集,模拟应用软件实际运行的状态,相对于静态数据来说采集的数据更具有真实性,能够更好的进行应用软件的安全性检测,提高安全漏洞检测效率;然后,判断模块20根据流经敏感调用点的数据流信息,判断敏感调用点是否被污点数据污染;若敏感调用点被污染,则敏感调用点可能被外部输入点关联调用,影响应用软件安全,此时,回溯模块30根据敏感调用点的变量参数,回溯查找敏感调用点对应的外部输入点,也即查找更够调用敏感调用点的外部输入点;若成功查找到敏感调用点对应的外部输入点,则确定模块40确定此找到的外部输入点为应用软件的安全漏洞,会给应用软件带来风险。本实施例中基于应用软件运行过程中的关键调用和数据处理操作的实时监控输出,通过离线自动污点数据传播分析,检测应用潜在的安全漏洞。通过采用动态插桩和离线数据流分析动静态结合的检测技术,能够覆盖应用软件更深层次功能和逻辑检查,不存在漏报,且采集的数据来自实际运行过程,真实有效,不存在误报,大大提高了应用软件的安全漏洞检测效率。
进一步地,参照图7,本发明应用软件安全漏洞检测系统第二实施例提供一种应用软件安全漏洞检测系统,基于上述本发明应用软件安全漏洞检测系统第一实施例,所述应用软件安全漏洞检测系统还包括:
污点模块50,用于当所述应用软件运行时,在所述应用软件的各外部输入点输入污点数据。
当应用软件的敏感调用点已经配置好插桩,启动运行时,或在应用软件运行的过程中,污点模块50通过应用软件的各个外部输入点,向应用软件中输入带有污染标签的污点数据。
污点数据再被输入应用软件后,跟随各调用点的调用,通过赋值、函数调用等方式,污染关联的参数。若被污染的参数流经调用点,则可认为此调用点被污点。
若应用软件运行的过程中敏感调用点被污染,则可以确定外部输入点输入的污点数据的关联参数能够流经此敏感调用点进行函数调用,也即此敏感调用点能够被外部输入点调用,存在安全漏洞。然后,回溯模快30根据敏感调用点的数据流进行数据回溯,查找能够调用敏感调用点的外部输入点,此能够调用敏感调用点的外部输入点即为应用软件的安全漏洞。
在本实施例中,当所述应用软件运行时,污点模块50在应用软件的各外部输入点输入污点数据,用以检测敏感调用点是否被感染,从而根据被感染的敏感调用点查找对应的安全漏洞,实现了对应用软件漏洞的检测。本实施例通过向各外部输入点输入污点数据,使应用软件运行起来,能够快速、准确的标记出存在被外部输入点调用风险的敏感调用点,进而提高风险调用点的准确率,实现对应用软件深层逻辑的检测,减少漏洞的误报和漏报,提高漏洞检测的效率。
进一步地,本发明应用软件安全漏洞检测系统第三实施例提供一种应用软件安全漏洞检测系统,基于上述本发明应用软件安全漏洞检测系统第一实施例、第二实施例,所述确定模块40还用于,
确定回溯找到所述外部输入点的路径为危险路径。
当成功找到敏感调用点对应的外部输入点时,确定模块40将找到外部输入点的路径信息提取出来,得到从外部输入点输入的污点数据流向敏感调用点的路径,以及路径上被感染的各调用点。
然后,确定模块40标记此路径为危险路径,便于研发人员了解敏感调用点的具体风险,以提高应用软件的完全性。
在本实施例中,确定模块40确定回溯找到敏感调用点对应外部输入点的路径为危险路径,以便于研发人员进行进一步地漏洞原因分析、提升应用软件的安全性。
需要说明的是,在硬件实现上,以上采集模块10、判断模块20、回溯模块30、确定模块40以及污点模块50等可以以硬件形式内嵌于或独立于应用软件安全漏洞检测系统中,也可以以软件形式存储于应用软件安全漏洞检测系统的存储器中,以便于处理器调用执行以上各个模块对应的操作。该处理器可以为中央处理单元(CPU)、微处理器、单片机等。
如图8所示,图8是本发明实施例方案涉及的硬件运行环境的设备结构示意图。
本发明实施例应用软件安全漏洞检测设备可以是PC,也可以是智能手机、平板电脑、电子书阅读器、便携计算机等终端设备。
如图8所示,应用软件安全漏洞检测设备可以包括:处理器1001,例如CPU,以及存储器1002。这些组件之间的连接通信可以通过通信总线实现。存储器1002可以是高速RAM存储器,也可以是稳定的存储器(non-volatile
memory),例如磁盘存储器。存储器1002可选的还可以是独立于前述处理器1001的存储装置。
可选地,应用软件安全漏洞检测设备还可以包括用户接口、网络接口、摄像头、RF(Radio
Frequency,射频)电路,传感器、音频电路、WiFi模块等等。用户接口可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口还可以包括标准的有线接口、无线接口。网络接口可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。
本领域技术人员可以理解,图8中示出的应用软件安全漏洞检测设备结构并不构成对应用软件安全漏洞检测设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
如图8所示,作为一种计算机存储介质的存储器1002中可以包括操作系统以及应用软件安全漏洞检测程序。其中,操作系统是管理和控制应用软件安全漏洞检测设备硬件与软件资源的程序,支持应用软件安全漏洞检测程序及其他软件或程序的运行。
在图8所示的应用软件安全漏洞检测设备中,处理器1001可以用于执行存储器1002中存储的应用软件安全漏洞检测程序,以实现以下步骤:
基于预先在应用软件敏感调用点配置的插桩,采集所述应用软件运行过程中流经所述敏感调用点的数据流信息;
根据所述数据流信息,判断所述敏感调用点是否被污点数据污染;
若所述敏感调用点被污染,则根据所述敏感调用点的变量参数,回溯查找所述敏感调用点对应的外部输入点;
若成功查找到所述敏感调用点对应的外部输入点,则确定所述外部输入点为所述应用软件的安全漏洞。
进一步地,处理器1001还可以执行存储器1002中存储的应用软件安全漏洞检测程序,以实现以下步骤:
根据所述变量参数,回溯查找输出所述变量参数的前驱调用点;
若所述前驱调用点是基于函数调用输出的返回值,则再次回溯查找返回所述前驱调用点实参的前驱调用点,确定源节点;
若所述源节点为外部输入点,则确定所述外部输入点为所述敏感调用点对应的外部输入点;
若所述源节点为常量赋值,则停止回溯,确定未找到所述敏感调用点对应的外部输入点。
进一步地,处理器1001还可以执行存储器1002中存储的应用软件安全漏洞检测程序,以实现以下步骤:
若找到多个输出所述变量参数且执行顺序先于所述敏感调用点的调用点,则确定所述多个调用点中执行顺序最接所述近敏感调用点的为所述前驱调用点。
进一步地,处理器1001还可以执行存储器1002中存储的应用软件安全漏洞检测程序,以实现以下步骤:
若所述前驱调用点将所述变量参数作为赋值输出,则获取所述变量参数对应的右值;
若所述右值为外部输入点输入的变量,则确定所述外部输入点为所述敏感调用点对应的外部输入点;
若所述右值为常量赋值,则停止回溯,确定未找到所述敏感调用点对应的外部输入点。
进一步地,处理器1001还可以执行存储器1002中存储的应用软件安全漏洞检测程序,以实现以下步骤:
当所述应用软件运行时,在所述应用软件的各外部输入点输入污点数据。
进一步地,处理器1001还可以执行存储器1002中存储的应用软件安全漏洞检测程序,以实现以下步骤:
确定回溯找到所述外部输入点的路径为危险路径。
本发明应用软件安全漏洞检测设备的具体实施例与上述应用软件安全漏洞检测方法和系统各实施例基本相同,在此不作赘述。
本发明提供了一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现以下步骤:
基于预先在应用软件敏感调用点配置的插桩,采集所述应用软件运行过程中流经所述敏感调用点的数据流信息;
根据所述数据流信息,判断所述敏感调用点是否被污点数据污染;
若所述敏感调用点被污染,则根据所述敏感调用点的变量参数,回溯查找所述敏感调用点对应的外部输入点;
若成功查找到所述敏感调用点对应的外部输入点,则确定所述外部输入点为所述应用软件的安全漏洞。
进一步地,所述一个或者多个程序可被所述一个或者多个处理器执行,还实现以下步骤:
根据所述变量参数,回溯查找输出所述变量参数的前驱调用点;
若所述前驱调用点是基于函数调用输出的返回值,则再次回溯查找返回所述前驱调用点实参的前驱调用点,确定源节点;
若所述源节点为外部输入点,则确定所述外部输入点为所述敏感调用点对应的外部输入点;
若所述源节点为常量赋值,则停止回溯,确定未找到所述敏感调用点对应的外部输入点。
进一步地,所述一个或者多个程序可被所述一个或者多个处理器执行,还实现以下步骤:
若找到多个输出所述变量参数且执行顺序先于所述敏感调用点的调用点,则确定所述多个调用点中执行顺序最接所述近敏感调用点的为所述前驱调用点。
进一步地,所述一个或者多个程序可被所述一个或者多个处理器执行,还实现以下步骤:
若所述前驱调用点将所述变量参数作为赋值输出,则获取所述变量参数对应的右值;
若所述右值为外部输入点输入的变量,则确定所述外部输入点为所述敏感调用点对应的外部输入点;
若所述右值为常量赋值,则停止回溯,确定未找到所述敏感调用点对应的外部输入点。
进一步地,所述一个或者多个程序可被所述一个或者多个处理器执行,还实现以下步骤:
当所述应用软件运行时,在所述应用软件的各外部输入点输入污点数据。
进一步地,所述一个或者多个程序可被所述一个或者多个处理器执行,还实现以下步骤:
确定回溯找到所述外部输入点的路径为危险路径。
本发明计算机可读存储介质的具体实施例与上述应用软件安全漏洞检测方法和系统各实施例基本相同,在此不作赘述。
还需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。
以上仅为本发明的可选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。
Claims (20)
- 一种应用软件安全漏洞检测方法,其特征在于,所述应用软件安全漏洞检测方法包括以下步骤:基于预先在应用软件敏感调用点配置的插桩,采集所述应用软件运行过程中流经所述敏感调用点的数据流信息;根据所述数据流信息,判断所述敏感调用点是否被污点数据污染;若所述敏感调用点被污染,则根据所述敏感调用点的变量参数,回溯查找所述敏感调用点对应的外部输入点;若成功查找到所述敏感调用点对应的外部输入点,则确定所述外部输入点为所述应用软件的安全漏洞。
- 如权利要求1所述的应用软件安全漏洞检测方法,其特征在于,所述根据所述敏感调用点的变量参数,回溯查找所述敏感调用点对应的外部输入点的步骤包括:根据所述变量参数,回溯查找输出所述变量参数的前驱调用点;若所述前驱调用点是基于函数调用输出的返回值,则再次回溯查找返回所述前驱调用点实参的前驱调用点,确定源节点;若所述源节点为外部输入点,则确定所述外部输入点为所述敏感调用点对应的外部输入点;若所述源节点为常量赋值,则停止回溯,确定未找到所述敏感调用点对应的外部输入点。
- 如权利要求2所述的应用软件安全漏洞检测方法,其特征在于,所述应用软件安全漏洞检测方法还包括:若找到多个输出所述变量参数且执行顺序先于所述敏感调用点的调用点,则确定所述多个调用点中执行顺序最接所述近敏感调用点的为所述前驱调用点。
- 如权利要求2所述的应用软件安全漏洞检测方法,其特征在于,所述根据所述敏感调用点的变量参数,回溯查找所述敏感调用点对应的外部输入点的步骤还包括:若所述前驱调用点将所述变量参数作为赋值输出,则获取所述变量参数对应的右值;若所述右值为外部输入点输入的变量,则确定所述外部输入点为所述敏感调用点对应的外部输入点;若所述右值为常量赋值,则停止回溯,确定未找到所述敏感调用点对应的外部输入点。
- 如权利要求1所述的应用软件安全漏洞检测方法,其特征在于,所述基于预先在应用软件敏感调用点配置的插桩,采集所述应用软件运行过程中流经所述敏感调用点的数据流信息的步骤之前,还包括:当所述应用软件运行时,在所述应用软件的各外部输入点输入污点数据。
- 如权利要求1所述的应用软件安全漏洞检测方法,其特征在于,所述确定所述外部输入点为所述应用软件的安全漏洞的步骤之后,还包括:确定回溯找到所述外部输入点的路径为危险路径。
- 一种应用软件安全漏洞检测系统,其特征在于,所述应用软件安全漏洞检测系统包括:采集模块,用于基于预先在应用软件敏感调用点配置的插桩,采集所述应用软件运行过程中流经所述敏感调用点的数据流信息;判断模块,用于根据所述数据流信息,判断所述敏感调用点是否被污点数据污染;回溯模块,用于若所述敏感调用点被污染,则根据所述敏感调用点的变量参数,回溯查找所述敏感调用点对应的外部输入点;确定模块,用于若成功查找到所述敏感调用点对应的外部输入点,则确定所述外部输入点为所述应用软件的安全漏洞。
- 如权利要求7所述的应用软件安全漏洞检测系统,其特征在于,所述回溯模块还用于,根据所述变量参数,回溯查找输出所述变量参数的前驱调用点;若所述前驱调用点是基于函数调用输出的返回值,则再次回溯查找返回所述前驱调用点实参的前驱调用点,确定源节点;若所述源节点为外部输入点,则确定所述外部输入点为所述敏感调用点对应的外部输入点;若所述源节点为常量赋值,则停止回溯,确定未找到所述敏感调用点对应的外部输入点。
- 如权利要求8所述的应用软件安全漏洞检测系统,其特征在于,所述回溯模块还用于,若找到多个输出所述变量参数且执行顺序先于所述敏感调用点的调用点,则确定所述多个调用点中执行顺序最接所述近敏感调用点的为所述前驱调用点。
- 如权利要求8所述的应用软件安全漏洞检测系统,其特征在于,所述回溯模块还用于,若所述前驱调用点将所述变量参数作为赋值输出,则获取所述变量参数对应的右值;若所述右值为外部输入点输入的变量,则确定所述外部输入点为所述敏感调用点对应的外部输入点;若所述右值为常量赋值,则停止回溯,确定未找到所述敏感调用点对应的外部输入点。
- 如权利要求7所述的应用软件安全漏洞检测系统,其特征在于,所述应用软件安全漏洞检测系统还包括:污点模块,用于当所述应用软件运行时,在所述应用软件的各外部输入点输入污点数据。
- 如权利要求7所述的应用软件安全漏洞检测系统,其特征在于,所述确定模块还用于,确定回溯找到所述外部输入点的路径为危险路径。
- 一种应用软件安全漏洞检测设备,其特征在于,所述应用软件安全漏洞检测设备包括处理器及存储器,所述存储器中存储有应用软件安全漏洞检测程序;所述处理器用于执行所述应用软件安全漏洞检测程序,以实现以下步骤:基于预先在应用软件敏感调用点配置的插桩,采集所述应用软件运行过程中流经所述敏感调用点的数据流信息;根据所述数据流信息,判断所述敏感调用点是否被污点数据污染;若所述敏感调用点被污染,则根据所述敏感调用点的变量参数,回溯查找所述敏感调用点对应的外部输入点;若成功查找到所述敏感调用点对应的外部输入点,则确定所述外部输入点为所述应用软件的安全漏洞。
- 如权利要求13所述的应用软件安全漏洞检测设备,其特征在于,所述处理器还用于执行所述应用软件安全漏洞检测程序,以实现以下步骤:根据所述变量参数,回溯查找输出所述变量参数的前驱调用点;若所述前驱调用点是基于函数调用输出的返回值,则再次回溯查找返回所述前驱调用点实参的前驱调用点,确定源节点;若所述源节点为外部输入点,则确定所述外部输入点为所述敏感调用点对应的外部输入点;若所述源节点为常量赋值,则停止回溯,确定未找到所述敏感调用点对应的外部输入点。
- 如权利要求14所述的应用软件安全漏洞检测设备,其特征在于,所述处理器还用于执行所述应用软件安全漏洞检测程序,以实现以下步骤:若找到多个输出所述变量参数且执行顺序先于所述敏感调用点的调用点,则确定所述多个调用点中执行顺序最接所述近敏感调用点的为所述前驱调用点。
- 如权利要求14所述的应用软件安全漏洞检测设备,其特征在于,所述处理器还用于执行所述应用软件安全漏洞检测程序,以实现以下步骤:若所述前驱调用点将所述变量参数作为赋值输出,则获取所述变量参数对应的右值;若所述右值为外部输入点输入的变量,则确定所述外部输入点为所述敏感调用点对应的外部输入点;若所述右值为常量赋值,则停止回溯,确定未找到所述敏感调用点对应的外部输入点。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现以下步骤:基于预先在应用软件敏感调用点配置的插桩,采集所述应用软件运行过程中流经所述敏感调用点的数据流信息;根据所述数据流信息,判断所述敏感调用点是否被污点数据污染;若所述敏感调用点被污染,则根据所述敏感调用点的变量参数,回溯查找所述敏感调用点对应的外部输入点;若成功查找到所述敏感调用点对应的外部输入点,则确定所述外部输入点为所述应用软件的安全漏洞。
- 如权利要求17所述的计算机可读存储介质,其特征在于,所述一个或者多个程序可被所述一个或者多个处理器执行,还实现以下步骤:根据所述变量参数,回溯查找输出所述变量参数的前驱调用点;若所述前驱调用点是基于函数调用输出的返回值,则再次回溯查找返回所述前驱调用点实参的前驱调用点,确定源节点;若所述源节点为外部输入点,则确定所述外部输入点为所述敏感调用点对应的外部输入点;若所述源节点为常量赋值,则停止回溯,确定未找到所述敏感调用点对应的外部输入点。
- 如权利要求18所述的计算机可读存储介质,其特征在于,所述一个或者多个程序可被所述一个或者多个处理器执行,还实现以下步骤:若找到多个输出所述变量参数且执行顺序先于所述敏感调用点的调用点,则确定所述多个调用点中执行顺序最接所述近敏感调用点的为所述前驱调用点。
- 如权利要求18所述的计算机可读存储介质,其特征在于,所述一个或者多个程序可被所述一个或者多个处理器执行,还实现以下步骤:若所述前驱调用点将所述变量参数作为赋值输出,则获取所述变量参数对应的右值;若所述右值为外部输入点输入的变量,则确定所述外部输入点为所述敏感调用点对应的外部输入点;若所述右值为常量赋值,则停止回溯,确定未找到所述敏感调用点对应的外部输入点。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201611036378.2A CN107038378B (zh) | 2016-11-14 | 2016-11-14 | 应用软件安全漏洞检测方法和系统 |
| CN201611036378.2 | 2016-11-14 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2018086292A1 true WO2018086292A1 (zh) | 2018-05-17 |
Family
ID=59531016
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2017/077984 Ceased WO2018086292A1 (zh) | 2016-11-14 | 2017-03-24 | 应用软件安全漏洞检测方法、系统、设备及存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN107038378B (zh) |
| WO (1) | WO2018086292A1 (zh) |
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111506900A (zh) * | 2020-04-15 | 2020-08-07 | 北京字节跳动网络技术有限公司 | 漏洞检测方法、装置、电子设备及计算机存储介质 |
| CN111625833A (zh) * | 2020-04-13 | 2020-09-04 | 中国科学院软件研究所 | 一种高效的软件程序释放后重用漏洞判定方法和装置 |
| CN112162777A (zh) * | 2020-09-27 | 2021-01-01 | 北京软安科技有限公司 | 一种源代码特征提取方法及装置 |
| CN114389978A (zh) * | 2021-12-21 | 2022-04-22 | 中国人民解放军32802部队 | 一种基于静态污点分析的网络协议侧信道检测方法和系统 |
| CN114417355A (zh) * | 2022-01-07 | 2022-04-29 | 上海交通大学 | 针对工业控制系统的轻量级安全性检测系统及方法 |
| CN114741700A (zh) * | 2022-03-28 | 2022-07-12 | 中国人民解放军战略支援部队信息工程大学 | 基于符号化污点分析的公共组件库漏洞可利用性分析方法及装置 |
| CN114780962A (zh) * | 2022-04-02 | 2022-07-22 | 中国人民解放军战略支援部队信息工程大学 | 基于动态能量调控的Windows程序模糊测试方法及系统 |
| WO2022267343A1 (zh) * | 2021-06-25 | 2022-12-29 | 深圳前海微众银行股份有限公司 | 漏洞检测方法、设备及可读存储介质 |
| CN117077151A (zh) * | 2023-10-16 | 2023-11-17 | 北京华云安信息技术有限公司 | 漏洞挖掘方法、装置、设备以及存储介质 |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110381033B (zh) * | 2019-06-24 | 2021-06-08 | 深圳开源互联网安全技术有限公司 | Web应用漏洞检测方法、装置、系统、存储介质和服务器 |
| CN111931186B (zh) * | 2020-08-12 | 2023-09-08 | 中国工商银行股份有限公司 | 软件风险识别方法及装置 |
| CN115080426A (zh) * | 2022-06-28 | 2022-09-20 | 中国工商银行股份有限公司 | 程序文件的检测方法及装置、存储介质和电子设备 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102662840A (zh) * | 2012-03-31 | 2012-09-12 | 天津大学 | Firefox浏览器扩展行为自动检测系统及方法 |
| CN103207969A (zh) * | 2013-04-12 | 2013-07-17 | 百度在线网络技术(北京)有限公司 | 检测Android恶意软件的装置以及方法 |
| CN104462981A (zh) * | 2013-09-12 | 2015-03-25 | 深圳市腾讯计算机系统有限公司 | 漏洞检测方法及装置 |
| CN106055980A (zh) * | 2016-05-30 | 2016-10-26 | 南京邮电大学 | 一种基于规则的JavaScript安全性检测方法 |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103714000A (zh) * | 2013-12-18 | 2014-04-09 | 杭州电子科技大学 | 一种面向敏感区域的嵌入式软件测试用例生成方法 |
| CN104021073B (zh) * | 2014-05-06 | 2017-02-01 | 南京大学 | 一种基于指针分析的软件漏洞检测方法 |
| CN103995782B (zh) * | 2014-06-17 | 2016-06-22 | 电子科技大学 | 一种基于污点不变集的污点分析方法 |
| CN104598383B (zh) * | 2015-02-06 | 2018-02-09 | 中国科学院软件研究所 | 一种基于模式的动态漏洞挖掘集成系统和方法 |
| CN104765687B (zh) * | 2015-04-10 | 2017-07-21 | 江西师范大学 | 基于对象跟踪和污点分析的j2ee程序漏洞检测方法 |
| CN105487983B (zh) * | 2015-12-24 | 2018-01-12 | 郑州恩倍网络科技有限公司 | 基于智能路径引导的敏感点逼近方法 |
-
2016
- 2016-11-14 CN CN201611036378.2A patent/CN107038378B/zh active Active
-
2017
- 2017-03-24 WO PCT/CN2017/077984 patent/WO2018086292A1/zh not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102662840A (zh) * | 2012-03-31 | 2012-09-12 | 天津大学 | Firefox浏览器扩展行为自动检测系统及方法 |
| CN103207969A (zh) * | 2013-04-12 | 2013-07-17 | 百度在线网络技术(北京)有限公司 | 检测Android恶意软件的装置以及方法 |
| CN104462981A (zh) * | 2013-09-12 | 2015-03-25 | 深圳市腾讯计算机系统有限公司 | 漏洞检测方法及装置 |
| CN106055980A (zh) * | 2016-05-30 | 2016-10-26 | 南京邮电大学 | 一种基于规则的JavaScript安全性检测方法 |
Cited By (16)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111625833A (zh) * | 2020-04-13 | 2020-09-04 | 中国科学院软件研究所 | 一种高效的软件程序释放后重用漏洞判定方法和装置 |
| CN111625833B (zh) * | 2020-04-13 | 2023-06-13 | 中国科学院软件研究所 | 一种高效的软件程序释放后重用漏洞判定方法和装置 |
| CN111506900A (zh) * | 2020-04-15 | 2020-08-07 | 北京字节跳动网络技术有限公司 | 漏洞检测方法、装置、电子设备及计算机存储介质 |
| CN111506900B (zh) * | 2020-04-15 | 2023-07-18 | 抖音视界有限公司 | 漏洞检测方法、装置、电子设备及计算机存储介质 |
| CN112162777A (zh) * | 2020-09-27 | 2021-01-01 | 北京软安科技有限公司 | 一种源代码特征提取方法及装置 |
| WO2022267343A1 (zh) * | 2021-06-25 | 2022-12-29 | 深圳前海微众银行股份有限公司 | 漏洞检测方法、设备及可读存储介质 |
| CN114389978A (zh) * | 2021-12-21 | 2022-04-22 | 中国人民解放军32802部队 | 一种基于静态污点分析的网络协议侧信道检测方法和系统 |
| CN114389978B (zh) * | 2021-12-21 | 2024-04-02 | 中国人民解放军32802部队 | 一种基于静态污点分析的网络协议侧信道检测方法和系统 |
| CN114417355A (zh) * | 2022-01-07 | 2022-04-29 | 上海交通大学 | 针对工业控制系统的轻量级安全性检测系统及方法 |
| CN114417355B (zh) * | 2022-01-07 | 2022-11-08 | 上海交通大学 | 针对工业控制系统的轻量级安全性检测系统及方法 |
| CN114741700A (zh) * | 2022-03-28 | 2022-07-12 | 中国人民解放军战略支援部队信息工程大学 | 基于符号化污点分析的公共组件库漏洞可利用性分析方法及装置 |
| CN114741700B (zh) * | 2022-03-28 | 2024-05-03 | 中国人民解放军战略支援部队信息工程大学 | 基于符号化污点分析的公共组件库漏洞可利用性分析方法及装置 |
| CN114780962A (zh) * | 2022-04-02 | 2022-07-22 | 中国人民解放军战略支援部队信息工程大学 | 基于动态能量调控的Windows程序模糊测试方法及系统 |
| CN114780962B (zh) * | 2022-04-02 | 2024-04-26 | 中国人民解放军战略支援部队信息工程大学 | 基于动态能量调控的Windows程序模糊测试方法及系统 |
| CN117077151A (zh) * | 2023-10-16 | 2023-11-17 | 北京华云安信息技术有限公司 | 漏洞挖掘方法、装置、设备以及存储介质 |
| CN117077151B (zh) * | 2023-10-16 | 2024-01-26 | 北京华云安信息技术有限公司 | 漏洞挖掘方法、装置、设备以及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107038378A (zh) | 2017-08-11 |
| CN107038378B (zh) | 2018-06-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2018086292A1 (zh) | 应用软件安全漏洞检测方法、系统、设备及存储介质 | |
| WO2018086294A1 (zh) | 应用软件安全漏洞检测方法、系统、设备及存储介质 | |
| WO2018023981A1 (zh) | 舆情分析方法、装置、设备及计算机可读存储介质 | |
| WO2018086293A1 (zh) | 数据泄露接口检测方法、装置、设备及存储介质 | |
| WO2019051908A1 (zh) | 终端控制方法、装置及计算机可读存储介质 | |
| WO2017080190A1 (zh) | 二维码生成显示方法和装置 | |
| WO2021002696A1 (en) | Method for transferring subscription and electronic device for supporting the same | |
| WO2019051944A1 (zh) | 一种进程保护方法、装置、设备以及计算机可读存储介质 | |
| WO2015089856A1 (zh) | 一种触控界面的实现方法及装置 | |
| WO2017084337A1 (zh) | 一种身份验证方法、装置和系统 | |
| WO2018036156A1 (zh) | 用户信息视图构建方法、系统、设备及存储介质 | |
| WO2023017931A1 (ko) | 사이버 위협 정보 처리 장치, 사이버 위협 정보 처리 방법 및 사이버 위협 정보 처리하는 프로그램을 저장하는 저장매체 | |
| WO2019019378A1 (zh) | 业务处理方法、装置、适配器及计算机可读存储介质 | |
| WO2022065816A1 (en) | Method and apparatus for moving profiles with different versions during device change | |
| WO2019056462A1 (zh) | 名单分配方法、装置、设备以及计算机可读存储介质 | |
| WO2015124073A1 (en) | Process monitoring method, apparatus, and system | |
| WO2019051895A1 (zh) | 终端控制方法、装置及存储介质 | |
| EP4186258A1 (en) | Method and apparatus for recovering profile in case of device change failure | |
| EP3831019A1 (en) | Home appliance and online system that performs pairing of the same | |
| WO2017219479A1 (zh) | 智能电视的字符输入方法及系统 | |
| WO2018149194A1 (zh) | 团险投保方法、系统、设备和计算机可读存储介质 | |
| CN107944270A (zh) | 一种可验证的安卓恶意软件检测系统及方法 | |
| WO2020060231A1 (ko) | 네트워크 보안 모니터링 방법, 네트워크 보안 모니터링 장치 및 시스템 | |
| WO2019051934A1 (zh) | 业务人员考核方法、考核平台和计算机可读存储介质 | |
| WO2019143043A1 (ko) | 네트워크 성능 진단 방법 및 장치, 및 시스템 |
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: 17869934 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 11.09.2019) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 17869934 Country of ref document: EP Kind code of ref document: A1 |