# Detection and Analysis of Man-Machine Interactive Software Vulnerabilities Based on Ultrasonic Data Acquisition and Signal Processing Algorithms

Authors: Lei Zhao
Journal: Advances in Multimedia
 (2021)

---

## Abstract

With the gradual increase in the informatization, there is much software in various industries, such as data management, business execution, public orientation, and company OA, which greatly facilitates the development of various tasks, but it also brings many hidden dangers. There exist certain vulnerabilities in some software, which have become backdoors to be attacked. In view of these needs and potential hazards, the ultrasonic data acquisition and signal processing algorithms are introduced in this paper, analyzing and grasping the possibility of potentially dangerous paths by combining the instruction addresses and locations of software vulnerabilities, and avoid the existence of these software vulnerabilities through corresponding constraint instructions. The simulation experiment results prove that the ultrasonic data acquisition and signal processing algorithms are effective and can support the detection and analysis of man-machine interactive software vulnerabilities.


---

## Body

## 1. Introduction

With the continuous development of social economy, informatization has gradually changed the business of various industries, and the data management, business logic, public maintenance, company operation OA, and other software have gradually become variegated and diverse; some run on the PC end, and others run on the mobile side [1]. From the perspective of the running network, some are included in related private networks, internet networks, government affairs networks, and local area networks. These pieces of software are relatively complex and complicated, so the stability of software and the security of resources are extremely important [2, 3]. The existence of hidden loopholes will have an impact on social security, so the security of information is very important, and conducting information security detection is extremely effective [4, 5].Therefore, during the running process of software, the corresponding program operation needs to be monitored in real time to determine which codes can be executed safely and which codes can be executed directly without symbolic execution [6, 7].Therefore, during the fixed detection process, setting the corresponding breakpoints for detection can make it clear that these signals are needed during the execution process, but as for detection, the processing and execution of breakpoints are actually an iterative process. By going through all the possibilities of the entire software program, the breakpoint can be understood. However, it should be noted that when the scale or size of software is large enough, it is difficult to fully realize the experience of all the paths, but for most of the paths, there are actually very few vulnerabilities. Therefore, the detection of vulnerabilities can be carried out directly by constructing corresponding test cases, such as stain testing and signal processing, but there are low coverage rate of codes and missing scans in most of these methods. Therefore, it is necessary to increase the detection coverage rate of the program to ensure that the scan of the vulnerability is the safest [8, 9].Therefore, some scholars replace the corresponding symbolic execution with the corresponding abstract symbol and perform equivalent semantic operations according to the essence of the relevant program, so as to realize the simulation of the program, but because the execution of the abstract symbol is static, the corresponding source code is required, which also caused a lot of misdeclaration of software programs.In view of the above limitations and requirements, based on ultrasonic data acquisition and signal processing algorithms, searching and analyzing are performed by collecting the corresponding instructions of the dangerous functions through combining and identifying the corresponding signal processing dangerous addresses, meanwhile, constructing the corresponding antitrigger mechanism to avoid further expansion or existence of the corresponding vulnerabilities or dangers, effectively reducing the possibility for triggering of software or programs in a timely and effective manner, aiming to explore the safety and perfection of human-computer interactive software, and further ensuring the effective and stable operation of software.


## 2. Ultrasonic Data Acquisition and Signal Processing Algorithms

For software vulnerabilities, due to different methods and processes during their generation, the corresponding detection methods are also different. Of course, it should be noted that no special method can completely detect all the vulnerabilities. The detection of specific vulnerabilities requires several corresponding methods. For example, the detection of vulnerabilities that are easily triggered by overflow of values, divisors of 0, etc., needs to be identified and analyzed [10–12].For the vulnerability detection of software or programs using corresponding signals, as shown in Figure1, first, an initial input is given. When the target program or software is executed, the input data are first initialized in the symbolized manner. During the execution of the program or software, the constraints of the corresponding mandatory path shall be collected. After the entire program is executed, a set will be obtained for the constraints of the path; in view of the set of mandatory constraints, all the conditions are negated, and the input of corresponding constraints is performed. Through the construction of corresponding test cases, continuous iterations are achieved, while the status of the program or software execution is monitored simultaneously. If the situation exists, it means there may be a problem, and a detailed analysis and exploration of the cause of the breakpoint or the place where the error is reported need to be performed to determine whether it is a vulnerability and related attributes.Figure 1
The general process of detecting software vulnerabilities using signal processing.If you need to detect a certain type of vulnerabilities, you first need to identify the relevant patterns of this type of vulnerabilities. This requires the aggregation and classification of existing vulnerabilities, and the related vulnerabilities can be obtained through summarization and induction; meanwhile, they can have corresponding characteristics in the form of expression [13, 14]. If there may be function insecurity and data overflow (more than 256 or overflow of memory), these functions can be classified as dangerous functions, and the calls of these dangerous functions can also be considered as the use of dangerous paths.In the process of signal denoising, the selection and quantification of the threshold are very critical; it can be said that it directly affects the effect of denoising. Therefore, in the application, the selection method and quantification rule of the threshold should be determined according to the specific situation [15].Commonly used threshold processing methods include hard threshold and soft threshold.(1)x˜=x,x≥λ,0,x<λ,x˜=x−λ,x≥λ,0,x<λ,x+λ,x≤−λ.The soft and hard threshold compromise method is(2)x˜=x−αλ,x≥λ,0,x<λ,x+αλ,x≤−λ.In order to compare the noise reduction effects of different threshold noise reduction methods, the signal-to-noise ratio is used as the evaluation criterion. The formula for the signal-to-noise ratio is(3)SNR=10×log∑i=1Nf2i∑i=1Nsi−fi2.In the formula,f(i) is the original signal; s(i) is the noisy signal; N is the signal length.The processing of all signals is mainly to use the corresponding signal for searching the program until the dangerous function and the corresponding dangerous path are found. After the dangerous path is found, the corresponding test and detection can be carried out. No detailed instructions are required for other paths. In this way, the calculation amount of the test is reduced, and the scope of the test is reduced, therefore further improving the efficiency of the test. The specific execution workflow is shown in Figure2. First of all, the specific pattern of the vulnerability needs to be clarified by sorting out and determining the existence of the dangerous function by means of the corresponding pattern, and then the ultrasonic data collection is used to identify and locate the instructional address of the corresponding dangerous function to determine the dangerous function according to the corresponding constraint dataset. Finally, until the program is executed, the corresponding constraints of the dangerous path corresponding to the dangerous function can be summarized.Figure 2
The execution workflow of guided signal processing.The input signal is used to initialize the corresponding input file, analyze the branch quality, and run the target program, while the corresponding type analysis technique is used to obtain more type information, specifically as shown in Figure3.Figure 3
Structural diagram of the detection tool.Through programming, the loopholes in the integer are identified to determine whether there are any conflicts in the existing data types.


## 3. Binary Program Ultrasonic Data Acquisition

Ultrasonic data acquisition refers to the analysis of the source code or binary code of the program without running the program [16–18]. Through ultrasonic data acquisition, a clear framework understanding of the program can be realized, and the combination of dynamic and static is realized according to the corresponding ultrasonic data acquisition, focusing on solving the problem of false alarm rate [19, 20].The specific process is shown in Figure4. First, the list of dangerous functions is sorted out, and corresponding initialization is performed. Those functions listed as dangerous are the objects of focus; secondly, each dangerous function in the list is analyzed and extracted; for each function, the corresponding call address is obtained by calling the corresponding tool. If the address used is reasonable and legal, the call points to the corresponding code list, and finally, the instructional address is printed and marked in red directly.Figure 4
Flowchart of the ultrasonic data acquisition algorithm.


## 4. Formal Description of Integer Vulnerabilities

Integer vulnerabilities may appear in operations related to integer variables, assignment operations, etc., but not these two types of instructions are integer vulnerabilities. It is also necessary to determine whether the value of the integer variable is within the range that its type can represent and whether the value is related to the external input.


### 4.1. Type Indication

The corresponding types can be effectively classified, which can be divided into two types: width information and symbol information.Definition 1.
UseT to represent the integer type, C42 indicates the width type, and Ts represents the length type.Definition 2.
Assumingt ∈ T, two-tuple C44 records the range of values that t can represent. C40+C41+C43=8 represents the minimum value that t can represent, and mint represents the maximum value.


### 4.2. Modeling Integer Vulnerabilities

For the operations and assignment operations mentioned in the previous article, we restrict them to check whether they constitute integer vulnerabilities. This restriction is our modeling of integer vulnerabilities. We construct the following constraints:Rule 1operation (addr)⟶minresut ≤ result-value ≤ maxresultresult_value = loperand opcode roperandRule 2assignment (addr)⟶mindestination ≤ source − value ≤ maxdestinationRule 3operand’s type is bot⟶operand_value ≥ 0


## 4.1. Type Indication

The corresponding types can be effectively classified, which can be divided into two types: width information and symbol information.Definition 1.
UseT to represent the integer type, C42 indicates the width type, and Ts represents the length type.Definition 2.
Assumingt ∈ T, two-tuple C44 records the range of values that t can represent. C40+C41+C43=8 represents the minimum value that t can represent, and mint represents the maximum value.


## 4.2. Modeling Integer Vulnerabilities

For the operations and assignment operations mentioned in the previous article, we restrict them to check whether they constitute integer vulnerabilities. This restriction is our modeling of integer vulnerabilities. We construct the following constraints:Rule 1operation (addr)⟶minresut ≤ result-value ≤ maxresultresult_value = loperand opcode roperandRule 2assignment (addr)⟶mindestination ≤ source − value ≤ maxdestinationRule 3operand’s type is bot⟶operand_value ≥ 0


## 5. Ultrasonic Data Collection and Analysis

For the binary program, the ultrasonic data acquisition method is used to extract the type information from the binary program and construct the suspicious set.The extended type analysis is as follows: (1) a decompiler is used to convert the binary program into an intermediary language. (2) On the intermediary language, according to the order of decompilation, some specific functions and statements are used to extract information, including arithmetic/logical operations, judgment statements, array subscripts, memory allocation functions, and memory copy functions.


## 6. Simulation Experiment

The simulation experiment is selected to use the normal operating system; firstly, the program is used to test to determine whether the dangerous path can be identified, and secondly, the real program is used to test.


### 6.1. Simple Program Test

The test program is a binary program test_strcpy in the ELF format, and part of the source code is as follows:void function (char∗str){char buffer [6];strcpy (buffer, str);}int main (int argc, char∗argv[]){char buf [5] = {0};int fd, i, num = 0;fd = open (argv [1], O_RDONLY);for (i = 0; i ≤ 3; i++)read (fd,&buf [i], sizeof (char));if (buf [0] = =  “g”) num++;if (buf [1] = = “o”) num++;if (buf [2] = = “o”) num++;if (buf [3] = = “d”) num++;if (num = = 2) return 2;if (num = = 4) {function (buf); return 4; }return 0;}First, the corresponding string is obtained from the input file to see if it is similar or the same as the dangerous character of the corresponding dangerous function. If the output result of the same number of characters is different, then the dangerous function needs to be called in the corresponding list.Given the content of the corresponding initialization input file, the dangerous function is used for the test to generate the corresponding test case. The specific calls are shown in Table1.Table 1
Test results.
Test case number12345Contentgaaa“NUL”oaa“NULL”“NULL”Ob“NUL”“NUL”“NUL”d“NUL”“NUL”odTest case number678910Content“NUL” ooa“NULL”o“NULL”dGoaag“NUL”oag“NUL”“NUL”dTest case number1112131415ContentG“NUL”odGoodgo“NUL”dGood“NUL” oodThe accuracy of this result is analyzed mainly from two aspects as follows: one is whether the total number of paths should be 15, and the other is whether the no. 14 test case will take a dangerous path.(1) Integer overflow: in view of the integer overflow, the integer overflow is detected through the EFLAGS register. (2) Error in sign: if it is a sign error, it is necessary to check which conflicting operations exist to determine whether the value is a negative number. (3) Assignment truncation: through the detection of assignment statements, the judgment of the operating range is realized.


## 6.1. Simple Program Test

The test program is a binary program test_strcpy in the ELF format, and part of the source code is as follows:void function (char∗str){char buffer [6];strcpy (buffer, str);}int main (int argc, char∗argv[]){char buf [5] = {0};int fd, i, num = 0;fd = open (argv [1], O_RDONLY);for (i = 0; i ≤ 3; i++)read (fd,&buf [i], sizeof (char));if (buf [0] = =  “g”) num++;if (buf [1] = = “o”) num++;if (buf [2] = = “o”) num++;if (buf [3] = = “d”) num++;if (num = = 2) return 2;if (num = = 4) {function (buf); return 4; }return 0;}First, the corresponding string is obtained from the input file to see if it is similar or the same as the dangerous character of the corresponding dangerous function. If the output result of the same number of characters is different, then the dangerous function needs to be called in the corresponding list.Given the content of the corresponding initialization input file, the dangerous function is used for the test to generate the corresponding test case. The specific calls are shown in Table1.Table 1
Test results.
Test case number12345Contentgaaa“NUL”oaa“NULL”“NULL”Ob“NUL”“NUL”“NUL”d“NUL”“NUL”odTest case number678910Content“NUL” ooa“NULL”o“NULL”dGoaag“NUL”oag“NUL”“NUL”dTest case number1112131415ContentG“NUL”odGoodgo“NUL”dGood“NUL” oodThe accuracy of this result is analyzed mainly from two aspects as follows: one is whether the total number of paths should be 15, and the other is whether the no. 14 test case will take a dangerous path.(1) Integer overflow: in view of the integer overflow, the integer overflow is detected through the EFLAGS register. (2) Error in sign: if it is a sign error, it is necessary to check which conflicting operations exist to determine whether the value is a negative number. (3) Assignment truncation: through the detection of assignment statements, the judgment of the operating range is realized.


## 7. Real Application Testing

The corresponding program is used to test. The specific test results are shown in Figure5. First, input and initialize a file, and constrain by finding the corresponding dangerous path. Meanwhile, save these constraints, specifically as shown in Figure 5. It can be seen from the results that the restriction of the dangerous path is relatively more complicated than other programs. Meanwhile, it shows that the ultrasonic data acquisition and signal processing algorithm can effectively realize the identification and analysis of the dangerous function and the dangerous path.Figure 5
Test results of the real application.Through ultrasonic data acquisition and signal processing algorithms, the dangerous function and dangerous path can be effectively identified, and the corresponding constraint collection is realized. After summary and analysis, the corresponding test case detection and analysis can be realized. On this basis, the dangerous path can be further tested until the vulnerabilities are discovered.


## 8. Suspicious Instruction Set

The static analysis and construction of the instruction set can be realized through the corresponding tools. This is the first step to detect vulnerabilities. Depending on the difference of the program, the results of static analysis are also different. From the results, it can be seen that the static analysis by the ultrasonic data acquisition and signal processing algorithms greatly reduces the amount of computation required by the number of instructions.


## 9. Accuracy of Type Information Extraction

By comparing the doubtful instructional type information with the corresponding type of the program, it can be found that the matching degree between the two is relatively high, reaching more than 92%. The specific experimental results are shown in Table2. The main manifestations of the inconsistent types are in the following: (1) it is difficult to ensure consistency between pointer variables and integer variables; (2) it is also difficult to ensure consistency between pointers and specific arrays, which are easily regarded as unsigned.Table 2
The number of suspicious instructions and the accuracy of their type information.
Program nameSizeInteger overflowSymbol errorAssignment truncationTotalAccuracy of type information (%)slocate-2.746.3 K5/61/11/18/8100zgv-5.8284.4 K22/2418/1816/1658/5998.3Python-2.5.23.1 M94/9622/2261/67177/18496.2ngiRCd-0.8.1329.5 K13/1713/1318/1946/4993.9OpenSSH-2.2.1150.2 K13/151/19/924/2596mpg123-1.7.11.02 M6/84/41/112/1392.3rdesktop-1.5.0562.7 K2/21/10/03/3100Note. x/y: y represents the number of suspicious instructions, and x represents the number of instructions with correct type information.Corresponding tools have been tested for effectiveness. Specifically as shown in Table3, the ultrasonic data acquisition and signal processing algorithms are effective, achieving more than 94% of the detection of vulnerabilities, and only one is underreported.Table 3
Integer vulnerability detection.
CVE#Program nameName of vulnerabilitiesTypeWhether detectReported vulnerabilitiesReal vulnerabilities2013-0326slocateParse-decode-path bugInteger overflow√222014-1095zgvMultiple integer overflowInteger overflow√22222018-1721PythonZlib extension module bugSymbol error√222015-0199ngiRCdList-MakeMask bugInteger overflow√222011-0144OpenSSHDetect-attack bugAssignment truncation√222019-1301mpgThestore-id3-text bugSymbol error√432018-1801rdesktopIso-recv-msg function () bugInteger overflow√22Through the dynamic performance test, the result is shown in Figure6. It can be seen from the result that the dynamic detection component is suitable for monitoring the program at runtime. The performance overhead of the dye analysis component is also tested by us, and its performance overhead is about 50 times. Since the dye analysis component can reduce the false alarm rate of detecting integer vulnerabilities, but will introduce a large performance overhead, we provide an interface to provide users with the choice of whether to use the dye analysis component.Figure 6
Performance overhead of dynamic detection components.


## 10. Conclusions

With the continuous deepening of informatization, for all walks of life, security and stability of software have become the emphasis and difficulty of attention. The algorithms of ultrasonic data acquisition and symbol processing are introduced in this paper, and the dangerous functions are obtained within the program by sorting out the ultrasonic data acquisition methods. On this basis, the signal processing is used to identify and analyze the dangerous path, and continuous iterative analysis to the traversal of the program is performed completely, the corresponding full path efficiency is tested, the full detection of dangerous paths is realized, and the software vulnerabilities are detected. The simulation experiment proves that the algorithms of ultrasonic data acquisition and symbol processing are effective, can effectively identify dangerous paths, and support the detection and analysis of man-machine interactive software vulnerabilities.



---

*Source: 7684146-2021-11-30.xml*