Code detection method, device and non-transitory computer-readable storage medium
By identifying and judging functions and parameters in the code, the hard-coded password in the code is accurately detected, and the problems of high false alarm rate, high false alarm rate and low detection efficiency in the existing technology are solved, and efficient hard-coded password is achieved. Test.
Patent Information
- Application Number
- CN202011337274.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-25
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2040-11-25
AI Technical Summary
The prior art is difficult to accurately and efficiently detect hard-coded passwords in codes, resulting in high false alarm rate, high false alarm rate, low detection efficiency and manual secondary confirmation is required.
By identifying functions and parameters in the code, find the connection parameters and definition parameters that call network functions, use the parameter processing function to determine whether the connection parameters are hardcoded passwords, and output a detection report if necessary, including determining whether the code has been obfuscated and detected. Weak processing passwords and strong processing passwords.
It realizes more accurate and efficient detection of hard-coded passwords in the code, reduces the false alarm rate and missed alarm rate, improves detection efficiency, and reduces the need for manual confirmation.
Smart Images

Figure CN114547590B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a code detection method, device, and non-transitory computer-readable storage medium. Background Art
[0002] When the password is encrypted in a hard-coded manner in the program, a hard-coded password will be obtained.
[0003] Hard-coded encryption means that anyone with code permissions can view the hard-coded passwords, and can also see the hard-coded passwords by decompiling the code. Once the vulnerability of hard-coded encryption is exploited, it will cause security issues that are difficult to correct. Summary of the invention
[0004] A technical problem solved by the present disclosure is how to detect hard-coded passwords in code more accurately and efficiently.
[0005] According to one aspect of the present disclosure, a code detection method is provided, including: identifying functions and parameters in a code; searching for connection parameters for calling a network function and definition parameters of the connection parameters from the parameters, the function including the network function; searching for a parameter processing function for processing the definition parameters as the connection parameters from the function, the function including the parameter processing function; judging whether the connection parameters are hard-coded passwords according to the parameter processing function and the definition parameters; and outputting a detection report for detecting the hard-coded passwords in the code when the connection parameters are hard-coded passwords.
[0006] In some embodiments, outputting a detection report for detecting a hard-coded password in the code includes: determining whether the code has been obfuscated; if the code has not been obfuscated, outputting connection parameters, and reporting that a hard-coded password has been detected in the code; if the code has been obfuscated, matching the code with a password keyword, outputting parameters in the code that match the password keyword, and reporting that a hard-coded password has been detected in the code.
[0007] In some embodiments, judging whether the connection parameters are hard-coded passwords based on the parameter processing function and the definition parameters includes: if after being processed by the parameter processing function, the definition parameters are different from the connection parameters, then the connection parameters are not hard-coded passwords; if after being processed by the parameter processing function, the definition parameters are the same as the connection parameters, or the parameter processing function is not found, then the connection parameters are hard-coded passwords.
[0008] In some embodiments, the code detection method also includes: when the connection parameters are not hard-coded passwords, determining whether the parameter processing function uses encryption parameters to process the definition parameters as connection parameters; if the parameter processing function uses encryption parameters to process the definition parameters as connection parameters, reporting that a strong processing password is detected in the code; if the parameter processing function does not use encryption parameters to process the definition parameters as connection parameters, reporting that a weak processing password is detected in the code.
[0009] In some embodiments, the code detection method also includes: determining the file type of the file; if the file type is a non-binary file, preloading the code in the file; if the file type is a binary file, reverse processing the file and preloading the code in the reverse-processed file.
[0010] According to another aspect of the present disclosure, a code detection device is provided, including: a code recognition module, configured to recognize functions and parameters in a code; a parameter search module, configured to search for connection parameters for calling a network function and definition parameters of the connection parameters from the parameters, the function including the network function; a function search module, configured to search for a parameter processing function for processing the definition parameters as the connection parameters from the function, the function including the parameter processing function; a hard-coded judgment module, configured to judge whether the connection parameters are hard-coded passwords according to the parameter processing function and the definition parameters; and a report output module, configured to output a detection report for detecting hard-coded passwords in the code when the connection parameters are hard-coded passwords.
[0011] In some embodiments, the report output module is configured to: determine whether the code has been obfuscated; if the code has not been obfuscated, output connection parameters, and report that a hard-coded password has been detected in the code; if the code has been obfuscated, match the code using a password keyword, output parameters in the code that match the password keyword, and report that a hard-coded password has been detected in the code.
[0012] In some embodiments, the hard-coded judgment module is configured as follows: if after being processed by the parameter processing function, the definition parameters are different from the connection parameters, then the connection parameters are not hard-coded passwords; if after being processed by the parameter processing function, the definition parameters are the same as the connection parameters, or the parameter processing function is not found, then the connection parameters are hard-coded passwords.
[0013] In some embodiments, the code detection device also includes a function judgment module, which is configured to: when the connection parameters are not hard-coded passwords, determine whether the parameter processing function uses encryption parameters to process the definition parameters as connection parameters; the report output module is also configured to: if the parameter processing function uses encryption parameters to process the definition parameters as connection parameters, report that a strong processing password is detected in the code; if the parameter processing function does not use encryption parameters to process the definition parameters as connection parameters, report that a weak processing password is detected in the code.
[0014] In some embodiments, the code detection device also includes a code preloading module, which is configured to: determine the file type of the file; if the file type is a non-binary file, preload the code in the file; if the file type is a binary file, reverse process the file and preload the code in the reverse-processed file.
[0015] According to another aspect of the present disclosure, another code detection device is provided, including: a memory; and a processor coupled to the memory, wherein the processor is configured to execute the aforementioned code detection method based on instructions stored in the memory.
[0016] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, the aforementioned code detection method is implemented.
[0017] The present disclosure can detect hard-coded passwords in the code more accurately and efficiently.
[0018] Other features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or related technologies, the drawings required for use in the embodiments or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0020] Figure 1 A flowchart of a code detection method according to some embodiments of the present disclosure is shown.
[0021] Figure 2 A flowchart diagram of some embodiments of outputting a detection report for detecting hard-coded passwords in code is shown.
[0022] Figure 3A schematic diagram of the structure of a code detection device according to some embodiments of the present disclosure is shown.
[0023] Figure 4 A schematic diagram of the structure of a code detection device according to some other embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present disclosure and its application or use. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0025] The inventors have found that if password keywords (such as password, pass, pwd, jdbc, etc.) are searched in the code to detect whether there are hard-coded passwords in the code, the detection accuracy is usually low and the detection efficiency is low, and the staff needs to perform manual secondary confirmation. The reasons for the low detection accuracy are mainly two aspects. On the one hand, there may be a named field with the same name as the password keyword in the code, but the field is not actually a password; on the other hand, the password may be used directly in the code instead of using the password keyword to represent the password. The reason for the low detection efficiency is that when searching for password keywords, character matching must be performed in the entire code. In view of this, the inventors provide a code detection method that can more accurately and efficiently detect hard-coded passwords in the code.
[0026] Combine the following Figure 1 Some embodiments of the disclosed code detection method are described.
[0027] Figure 1 FIG. 1 is a flow chart showing a code detection method according to some embodiments of the present disclosure. Figure 1 As shown, the code detection method includes steps S101 to S109, wherein steps S101 to S104 are the preparation stage, and steps S105 to S109 are the detection stage.
[0028] (Preparation stage)
[0029] In step S101 , the file type of the file is determined.
[0030] The file type includes binary type and non-binary type. The file type can be determined based on the file name suffix, for example, a file with the file name suffix .bin is a binary file. The file type can also be determined based on the magic number of the file. For example, if the first four bytes of the file output through the Linux command line are 7f45, then the file is a binary file.
[0031] If the file type is a non-binary file, step S102 is executed. In step S102, the code in the file is preloaded.
[0032] In the case where the file type is a binary file, steps S103 to S104 are executed. In step S103, the file is reverse processed, for example, using a reverse tool such as IDA (Interactive Disassembler) software to reverse process the file. In step S104, the code in the reverse processed file is preloaded.
[0033] (Detection phase)
[0034] In step S105 , functions and parameters in the code are identified.
[0035] After identifying the functions and parameters in the code, the code can be abstracted into a syntax tree.
[0036] In step S106, the connection parameters for calling the network function and the definition parameters of the connection parameters are searched from the parameters.
[0037] The functions in the code include network functions. For example, when a socket connection is established in the code, a function in the socket library is called, and the function in the socket library belongs to a network function. Then, by detecting the connection call to the network function, or by detecting keywords such as "connect" in the code, the connection parameters for calling the network function can be found. Assume that the connection parameter is b, and the definition parameter of the connection parameter b is a. Those skilled in the art should understand that the actual number of connection parameters can be multiple. In order to facilitate the description of the technical solution, it is explained here from the perspective of a single connection parameter.
[0038] In step S107, a parameter processing function that processes the definition parameter as a connection parameter is searched from the functions.
[0039] Those skilled in the art will appreciate that the functions in the code include parameter processing functions.
[0040] In step S108, it is determined whether the connection parameter is a hard-coded password according to the parameter processing function and the definition parameters.
[0041] If the definition parameters and the connection parameters are different after being processed by the parameter processing function, the connection parameters are not hard-coded passwords; if the definition parameters and the connection parameters are the same after being processed by the parameter processing function, or the parameter processing function is not found, the connection parameters are hard-coded passwords.
[0042] In the case where the connection parameter is a hard-coded password, step S109 is executed. In step S109, a detection report for detecting the hard-coded password in the code is output.
[0043] The above embodiment is applicable to white box testing and gray box testing scenarios. After preloading the code, by identifying, searching and judging the functions and parameters in the code, the hard-coded passwords in the code can be detected more accurately and efficiently, solving the problems of high false positive rate, high false negative rate, low detection efficiency and the need for manual secondary confirmation by staff when detecting hard-coded passwords in traditional code detection methods.
[0044] In some embodiments, the code detection method further includes steps S110 to S112.
[0045] In the case where the connection parameter is not a hard-coded password, step S110 is executed. In step S110, it is determined whether the parameter processing function processes the definition parameter into the connection parameter using the encryption parameter.
[0046] If the parameter processing function processes the definition parameter into a connection parameter using the encryption parameter, step S111 is executed. In step S111, it is reported that a strong processing password is detected in the code.
[0047] In the case where the parameter processing function processes the definition parameters into connection parameters using the encryption parameters, the connection parameters cannot be obtained by performing a simple processing operation on the definition parameters. In this case, it is determined that a strong processing password exists in the code.
[0048] If the parameter processing function does not use the encryption parameter to process the definition parameter into the connection parameter, step S112 is executed. In step S112, it is reported that a weak processing password is detected in the code.
[0049] In the case where the parameter processing function processes the definition parameters into connection parameters without using the encryption parameters, the connection parameters can be obtained by performing a simple processing operation on the definition parameters. In this case, it is determined that there is a weak processing password in the code.
[0050] These embodiments can not only accurately and efficiently detect hard-coded passwords in the code, but also detect weakly processed passwords and strongly processed passwords in the code.
[0051] Combine the following Figure 2 Some embodiments of outputting a detection report for detecting hard-coded passwords in code are described.
[0052] Figure 2 A schematic diagram of a process for outputting a detection report for detecting hard-coded passwords in code is shown in some embodiments. Figure 2 As shown, the method includes steps S2091 to S2094.
[0053] In step S2091, determine whether the code has been obfuscated.
[0054] In the obfuscated code, parameters and functions are in unreadable forms such as "C" and "D".
[0055] If the code is not obfuscated, step S2092 is executed. In step S2092, the connection parameters are output and a hard-coded password is reported to be detected in the code.
[0056] If the code is obfuscated, step S2093 is executed. In step S2093, the code is matched with a password keyword (e.g., password, pass, pwd, jdbc, etc.), the parameters in the code that match the password keyword are output, and a hard-coded password is detected in the code. Those skilled in the art will understand that if there is no parameter matching the password keyword in the code, it indicates that the password is difficult to detect from the code and the security of the code is relatively high.
[0057] If there is a hard-coded password in the code, then no matter whether the code is obfuscated or not, this embodiment can detect the hard-coded password from the code and output a detection report of detecting the hard-coded password in the code.
[0058] Combine the following Figure 3 Some embodiments of the code detection device disclosed in the present invention are described.
[0059] Figure 3 FIG. 1 is a schematic diagram showing the structure of a code detection device according to some embodiments of the present disclosure. Figure 3 As shown, the code detection device 30 includes: a code identification module 301, configured to identify functions and parameters in the code; a parameter search module 302, configured to search for connection parameters for calling network functions and definition parameters of connection parameters from parameters, and functions include network functions; a function search module 303, configured to search for parameter processing functions that process definition parameters as connection parameters from functions, and functions include parameter processing functions; a hard-coded judgment module 304, configured to judge whether the connection parameters are hard-coded passwords according to the parameter processing function and the definition parameters; a report output module 305, configured to output a detection report for detecting hard-coded passwords in the code when the connection parameters are hard-coded passwords.
[0060] In some embodiments, the code detection device 30 also includes a code preloading module 300, which is configured to: determine the file type of the file; if the file type is a non-binary file, preload the code in the file; if the file type is a binary file, reverse process the file and preload the code in the reverse-processed file.
[0061] In some embodiments, the hard-coded judgment module 304 is configured as follows: if after being processed by the parameter processing function, the definition parameters are different from the connection parameters, then the connection parameters are not hard-coded passwords; if after being processed by the parameter processing function, the definition parameters are the same as the connection parameters, or the parameter processing function is not found, then the connection parameters are hard-coded passwords.
[0062] The above embodiment is applicable to white box testing and gray box testing scenarios. After preloading the code, by identifying, searching and judging the functions and parameters in the code, the hard-coded passwords in the code can be detected more accurately and efficiently, solving the problems of high false positive rate, high false negative rate, low detection efficiency and the need for manual secondary confirmation by staff when detecting hard-coded passwords in traditional code detection methods.
[0063] In some embodiments, the report output module 305 is configured to: determine whether the code has been obfuscated; if the code has not been obfuscated, output connection parameters, and report that a hard-coded password has been detected in the code; if the code has been obfuscated, match the code using a password keyword, output parameters in the code that match the password keyword, and report that a hard-coded password has been detected in the code.
[0064] If there is a hard-coded password in the code, then no matter whether the code is obfuscated or not, this embodiment can detect the hard-coded password from the code and output a detection report of detecting the hard-coded password in the code.
[0065] In some embodiments, the code detection device 30 also includes a function judgment module 306, which is configured to: when the connection parameters are not hard-coded passwords, determine whether the parameter processing function uses encryption parameters to process the definition parameters as connection parameters; the report output module 305 is also configured to: if the parameter processing function uses encryption parameters to process the definition parameters as connection parameters, report that a strong processing password is detected in the code; if the parameter processing function does not use encryption parameters to process the definition parameters as connection parameters, report that a weak processing password is detected in the code.
[0066] This embodiment can not only accurately and efficiently detect hard-coded passwords in the code, but also detect weakly processed passwords and strongly processed passwords in the code.
[0067] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0068] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0069] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0070] Combine the following Figure 4 Some other embodiments of the code detection device disclosed in the present invention are described.
[0071] Figure 4 FIG. 2 shows a schematic diagram of the structure of a code detection device in some other embodiments of the present disclosure. Figure 4 As shown, the code detection device 40 includes: a memory 410 and a processor 420 coupled to the memory 410 , and the processor 420 is configured to execute the code detection method in any of the aforementioned embodiments based on instructions stored in the memory 410 .
[0072] The memory 410 may include, for example, a system memory, a fixed non-volatile storage medium, etc. The system memory may store, for example, an operating system, an application program, a boot loader, and other programs.
[0073] The code detection device 40 may also include an input / output interface 430, a network interface 440, a storage interface 450, etc. These interfaces 430, 440, 450, the memory 410, and the processor 420 may be connected, for example, via a bus 460. The input / output interface 430 provides a connection interface for input / output devices such as a display, a mouse, a keyboard, and a touch screen. The network interface 440 provides a connection interface for various networked devices. The storage interface 450 provides a connection interface for external storage devices such as SD cards and USB flash drives.
[0074] The present disclosure also includes a non-transitory computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the code detection method in any of the aforementioned embodiments.
[0075] If the aforementioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0076] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0077] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0078] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0079] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0080] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0081] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure should be included in the protection scope of the present disclosure.
Claims
1. A code detection method, comprising: Identify functions and parameters in the code; Searching for connection parameters for calling a network function and definition parameters of the connection parameters from the parameters, the function including the network function; Searching for a parameter processing function for processing the definition parameter into the connection parameter from the function, wherein the function includes the parameter processing function; According to the parameter processing function and the definition parameter, determining whether the connection parameter is a hard-coded password includes: if after being processed by the parameter processing function, the definition parameter is the same as the connection parameter, or if the parameter processing function is not found, then the connection parameter is a hard-coded password; In the case where the connection parameter is a hard-coded password, a detection report for detecting the hard-coded password in the code is output.
2. The code detection method according to claim 1, wherein: The output of the detection report of detecting hard-coded passwords in the code includes: Determining whether the code has been obfuscated; If the code is not obfuscated, output the connection parameters and report that a hard-coded password is detected in the code; If the code is obfuscated, the code is matched using a password keyword, parameters in the code that match the password keyword are output, and a hard-coded password is reported to be detected in the code.
3. The code detection method according to claim 1, wherein: The determining, according to the parameter processing function and the defined parameter, whether the connection parameter is a hard-coded password further comprises: If, after being processed by the parameter processing function, the definition parameter is different from the connection parameter, then the connection parameter is not a hard-coded password.
4. The code detection method according to claim 1, further comprising: In the case where the connection parameter is not a hard-coded password, determining whether the parameter processing function processes the definition parameter into the connection parameter using an encryption parameter; If the parameter processing function processes the definition parameter into the connection parameter using an encryption parameter, reporting that a strong processing password is detected in the code; If the parameter processing function does not utilize encryption parameters to process the definition parameters into the connection parameters, it is reported that a weak processing password is detected in the code.
5. The code detection method according to claim 1, further comprising: Determine the file type of the file; In the case where the file type is a non-binary file, preloading the code in the file; In the case that the file type is a binary file, the file is reverse processed, and the code in the reverse processed file is preloaded.
6. A code detection device, comprising: A code recognition module configured to recognize functions and parameters in the code; a parameter search module configured to search for connection parameters for calling a network function and definition parameters of the connection parameters from the parameters, the function including the network function; A function search module, configured to search the function for processing the definition parameter into the connection parameter, wherein the function includes the parameter processing function; a hard-coded judgment module configured to judge whether the connection parameter is a hard-coded password according to the parameter processing function and the definition parameter, including: if the definition parameter is the same as the connection parameter after being processed by the parameter processing function, or the parameter processing function is not found, then the connection parameter is a hard-coded password; The report output module is configured to output a detection report for detecting a hard-coded password in the code when the connection parameter is a hard-coded password.
7. The code detection device according to claim 6, wherein: The report output module is configured to: Determining whether the code has been obfuscated; If the code is not obfuscated, output the connection parameters and report that a hard-coded password is detected in the code; If the code is obfuscated, the code is matched using a password keyword, parameters in the code that match the password keyword are output, and a hard-coded password is reported to be detected in the code.
8. The code detection device according to claim 6, wherein: The hard-coded judgment module is configured as follows: If, after being processed by the parameter processing function, the definition parameter is different from the connection parameter, then the connection parameter is not a hard-coded password.
9. The code detection device according to claim 6, further comprising a function determination module configured to: determine whether the parameter processing function uses encryption parameters to process the definition parameters into the connection parameters when the connection parameters are not hard-coded passwords; The report output module is also configured to: if the parameter processing function uses encryption parameters to process the definition parameters into the connection parameters, report that a strong processing password is detected in the code; if the parameter processing function does not use encryption parameters to process the definition parameters into the connection parameters, report that a weak processing password is detected in the code.
10. The code detection device according to claim 6, further comprising a code preloading module configured to: Determine the file type of the file; In the case where the file type is a non-binary file, preloading the code in the file; In the case that the file type is a binary file, the file is reverse processed, and the code in the reverse processed file is preloaded.
11. A code detection device, comprising: Memory; as well as A processor coupled to the memory, wherein the processor is configured to execute the code detection method according to any one of claims 1 to 5 based on instructions stored in the memory.
12. A non-transitory computer-readable storage medium, wherein: The non-transitory computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, the code detection method according to any one of claims 1 to 5 is implemented.
