Automated credential detection method, device, electronic device and storage medium

Through automated credential detection methods, the credential storage area is systematically monitored and scanned, solving the problems of complexity and inefficiency of credential collection in traditional technologies, and achieving efficient and accurate credential management and security testing.

CN118427802BActive Publication Date: 2024-09-24BEIJING TIMES XINWEI INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410895953.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-09-24
Estimated Expiration
2044-07-05

AI Technical Summary

Technical Problem

Traditional credential collection technology involves multiple storage methods, which makes the collection of credential information complex and inefficient. It requires a lot of time and reduces the penetration efficiency of the red team in network attack and defense drills.

Method used

By pre-defining and centrally managing the application's credential storage area, it systematically monitors file read and write activities, and automatically scans target folders to find credential files that meet specific conditions, avoiding carpet searches and improving credential acquisition efficiency.

Benefits of technology

It improves the efficiency of credential acquisition, reduces manual operation errors and time consumption, ensures the accuracy and security of credential management, and improves the efficiency of security testing and application configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118427802B
    Figure CN118427802B
Patent Text Reader

Abstract

The present application provides an automated credential detection method, device, electronic device and storage medium, which relates to the technical field of network security, and the method includes: obtaining a target application in a list of installed programs; determining a target program type corresponding to the target application; determining a preset credential storage area corresponding to the target program type; determining a target folder read by the target application according to a file read and write operation for the preset credential storage area, the target folder being in the preset credential storage area; scanning the target folder, querying a target file that meets preset conditions, and outputting the target file as a credential file of the target application. The present application has the effect of improving the efficiency of credential acquisition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of network security, and in particular to an automated credential detection method, device, electronic device, and storage medium. Background Art

[0002] In today's Internet age, cybersecurity attack and defense exercises are a vital task. Attack and defense drills are usually exercises that simulate attack and defense behaviors in actual network environments. These exercises are designed to test the organization's security measures, identify potential security risks, and train security teams to deal with various threats and attacks. In attack and defense drills, after the red team (simulated attacker) gets the intranet machine, intranet information collection is a crucial step. Intranet information collection refers to obtaining and analyzing information inside the target network, including but not limited to network topology, host information, services and applications, user credential information, etc. By collecting this information, the red team can better understand the structure and composition of the target network, so as to conduct penetration testing or simulated attacks more effectively.

[0003] The collection of credential information is particularly important in intranet information collection. Credential information includes authentication information such as username, password, and token, which is the key credential for accessing target systems and services. By obtaining valid credential information, the red team can easily gain access to target systems and data, thereby implementing deeper simulated attacks, such as lateral movement and data retrieval.

[0004] However, traditional credential collection technology has some significant shortcomings. Credential information may be stored in a variety of different places, including configuration files, databases, registries, memory, etc. The red team needs to adopt different collection methods for different storage methods, which increases the complexity and difficulty of credential collection. As a result, a lot of time is required to search for valid credential information, thereby reducing the efficiency of red team penetration.

[0005] In this context, it is particularly important to develop a credential collection system that can automatically and efficiently collect credentials. For applications that have not learned the credential collection method, the existing credential collection system cannot automatically identify the application and needs to manually check whether the relevant program exists. After confirming that it exists, the credentials of the program need to be manually collected. Finally, the credential collection system learns the credential collection method of the application. The process of manually collecting credentials consumes a lot of time, resulting in low efficiency of attack and defense drills. Therefore, a method is needed to improve the efficiency of credential acquisition. Summary of the invention

[0006] The present application provides an automated credential detection method, device, electronic device and storage medium, which have the effect of improving the efficiency of credential acquisition.

[0007] In a first aspect of the present application, an automated credential detection method is provided, the method comprising:

[0008] Get the target application in the list of installed programs;

[0009] Determining a target program type corresponding to the target application program;

[0010] Determine a preset credential storage area corresponding to the target program type;

[0011] Determining a target folder read by the target application according to a file read and write operation on the preset credential storage area, the target folder being located in the preset credential storage area;

[0012] The target folder is scanned to search for a target file that meets a preset condition, and the target file is output as a credential file of the target application.

[0013] By adopting the above technical solution, by pre-defining and centrally managing the credential storage areas of the application, systematically monitoring the file read and write activities in these areas, and automatically scanning the target folders to find credential files that meet specific conditions, the efficiency of credential acquisition is significantly improved. First, according to the target program type of the target application, find out the possible preset credential storage area of ​​the target program type. Then monitor the preset credential storage area. If the target application performs file read and write operations on the preset credential storage area, it is further determined that the credential file may be stored in the area. Finally, it is only necessary to scan the folders in the preset credential storage area to query the credential file. This avoids the traditional carpet search of multiple uncertain locations, making credential collection more direct and efficient, while reducing errors and time consumption in manual operations, and ensuring the accuracy and security of credential management. Through automated processes, credential files can be quickly identified and verified, thereby improving the overall efficiency of security testing and application configuration.

[0014] Optionally, determining the target program type corresponding to the target application program specifically includes:

[0015] Querying a first execution file, a first configuration file, and a first resource file of the target application;

[0016] querying at least one of a second executable file, a second configuration file, and a second resource file of a first application, wherein the first application is any one of a plurality of pre-stored applications in a preset database, and the first application corresponds to the target program type;

[0017] If it is determined that the first execution file contains the same key information as the second execution file, then determining that the target application corresponds to the target program type, the key information including the execution file name; and\or,

[0018] If it is determined that the first configuration file contains the same key data as the second configuration file, then determining that the target application corresponds to the target program type; and\or,

[0019] If it is determined that the first resource file contains the same resource data as the second resource file, it is determined that the target application corresponds to the target program type.

[0020] By adopting the above technical solution, the target application's executable files, configuration files, and resource files are analyzed in detail, and these files are compared with the known application files in the preset database, so that the specific type of the target application can be effectively determined. Based on the matching of file naming, configuration data, and resource content, high-precision and high-reliability application identification is ensured.

[0021] Optionally, the determining a preset credential storage area corresponding to the target program type specifically includes:

[0022] Determine a first application and a second application corresponding to the target program type, wherein the first application and the second application are any two pre-stored application programs among a plurality of pre-stored application programs in a preset database;

[0023] Obtain a first credential storage path of the first application, and obtain a second credential storage path of the second application;

[0024] Extracting a common storage path of the first credential storage path and the second credential storage path;

[0025] The folder corresponding to the common storage path is set as the preset credential storage area.

[0026] By adopting the above technical solution, the credential storage paths of two applications selected in the preset database are analyzed and compared, so as to effectively extract the common parts of these paths and set them as the preset credential storage area, thereby narrowing the scope of subsequent credential detection and improving detection efficiency.

[0027] Optionally, obtaining the target application in the installed program list specifically includes:

[0028] Query Windows Installer and registry to obtain an installer list, wherein the installer list includes multiple installers;

[0029] Get the list of running programs.

[0030] Merging the installation program list and the process list to obtain the installed program list, wherein the installed program list includes a plurality of installed application programs;

[0031] A search is performed in a detected list according to the name of the installed application to determine a target application that has not undergone credential detection, wherein the detected list includes a plurality of applications that have undergone credential detection.

[0032] By adopting the above technical solution, a comprehensive list of installed programs is obtained by querying Windows Installer and the registry, and then merged with the process list of the currently running program to create a more complete list of installed applications. Then, by comparing this list with a detected list (including applications that have been tested for credentials), those applications that have not been tested for credentials can be effectively identified. This method can significantly improve the coverage and security of credential management and ensure that all critical applications have been tested for credential security.

[0033] Optionally, determining the target folder to be read by the target application according to the file read and write operations on the preset credential storage area specifically includes:

[0034] Capture multiple file read and write operations against the file system in real time;

[0035] Determine the first file corresponding to each of the file read and write operations;

[0036] Determine, according to the file storage path of the first file, a second file among the plurality of the first files, wherein the file storage path of the folder corresponding to the second file includes the common storage path;

[0037] The target folder for storing the second file is determined according to the file storage path of the second file.

[0038] By adopting the above technical solution, the read and write operations of the file system are monitored in real time to track the actual access behavior of the application to the file, and then accurately determine which files are accessed and their storage paths. First, the operation of the file is captured, and then the storage path of these files is analyzed to identify the folders associated with the preset credential storage area, and further analyze the target folders where the credential data may exist.

[0039] Optionally, scanning the target folder, searching for a target file that meets a preset condition, and outputting the target file as a credential file of the target application program specifically includes:

[0040] Determine a first file type of a first credential file and a second file type of a second credential file, wherein the first credential file is a credential file of the first application and the second credential file is a credential file of the second application;

[0041] Acquire multiple scanned files contained in the scanned target folder;

[0042] If it is determined that the file type of the scanned file is the same as the first file type, or if it is determined that the file type of the scanned file is the same as the second file type, the scanned file is determined to be the target file.

[0043] By adopting the above technical solution, the file types are systematically determined and compared, and the credential files belonging to a specific application in a specific target folder are effectively identified and confirmed. First, the credential file type is defined, then the specific folder is scanned to obtain a list of files, and finally the file types are compared to accurately identify those files that meet the preset credential file type.

[0044] Optionally, after scanning the target folder, searching for a target file that meets a preset condition, and outputting the target file as a credential file of the target application, the method further includes:

[0045] Reading the first data content of the target file;

[0046] Extracting a voucher field satisfying a preset format from the first data content;

[0047] Obtaining local files of the target application;

[0048] Reading second data content of the local file;

[0049] Determining an encrypted field satisfying the preset format from the second data content;

[0050] The credential field is used to replace the encrypted field, and it is determined whether the target application can complete the credential authentication operation. If it is determined that the target application can complete the credential authentication operation, the target file is determined to be the credential file of the target application.

[0051] By adopting the above technical solution, the data content of the target file is read and the credential fields that conform to the preset format are extracted therefrom. These fields are then compared and replaced with the encrypted fields in the local file of the target application. Then, it is tested whether the replaced credentials can successfully perform the authentication operation of the application, because only the correct credential file can pass the authentication of the application, thereby completing the verification of the obtained credential file.

[0052] In a second aspect of the present application, an automated credential detection device is provided, the device comprising an acquisition module, an identification module, a judgment module and a scanning module, wherein:

[0053] The acquisition module is used to acquire the target application in the installed program list;

[0054] The identification module is used to determine the target program type corresponding to the target application program;

[0055] The determination module is used to determine a preset credential storage area corresponding to the target program type;

[0056] The determination module is used to determine a target folder read by the target application according to a file read and write operation on the preset credential storage area, wherein the target folder is located in the preset credential storage area;

[0057] The scanning module is used to scan the target folder, search for a target file that meets a preset condition, and output the target file as a credential file of the target application.

[0058] Optionally, the acquisition module is used to query the first execution file, the first configuration file and the first resource file of the target application;

[0059] The identification module is used to query at least one of a second executable file, a second configuration file, and a second resource file of a first application, wherein the first application is any one of a plurality of pre-stored applications in a preset database, and the first application corresponds to the target program type;

[0060] The judgment module is used to determine that the target application corresponds to the target program type if it is determined that the first execution file contains the same key information as the second execution file, and the key information includes the execution file name; and\or,

[0061] The determination module is configured to determine that the target application corresponds to the target program type if it is determined that the first configuration file contains the same key data as the second configuration file; and\or,

[0062] The judgment module is used to determine that the target application corresponds to the target program type if it is determined that the first resource file contains the same resource data as the second resource file.

[0063] Optionally, the identification module is used to determine a first application and a second application corresponding to the target program type, wherein the first application and the second application are any two pre-stored applications among a plurality of pre-stored applications in a preset database;

[0064] The acquisition module is used to acquire a first credential storage path of the first application and acquire a second credential storage path of the second application;

[0065] The acquisition module is used to extract a common storage path of the first credential storage path and the second credential storage path;

[0066] The determining module is used to set the folder corresponding to the common storage path as the preset credential storage area.

[0067] Optionally, the acquisition module is used to query Windows Installer and registry to obtain an installation program list, wherein the installation program list includes multiple installation programs;

[0068] The acquisition module is used to obtain a process list of running programs;

[0069] The scanning module is used to merge the installation program list and the process list to obtain the installed program list, wherein the installed program list includes a plurality of installed application programs;

[0070] The scanning module is used to search in a detected list according to the name of the installed application to determine a target application that has not undergone credential detection, and the detected list contains multiple applications that have undergone credential detection.

[0071] Optionally, the acquisition module is used to capture multiple file read and write operations on the file system in real time;

[0072] The judgment module is used to determine the first file corresponding to each of the file read and write operations;

[0073] The determination module is configured to determine, based on a file storage path of the first file, a second file among the plurality of the first files, wherein the file storage path of the folder corresponding to the second file includes the common storage path;

[0074] The determination module is used to determine the target folder for storing the second file according to the file storage path of the second file.

[0075] Optionally, the identification module is used to determine a first file type of a first credential file and a second file type of a second credential file, the first credential file being a credential file of the first application, and the second credential file being a credential file of the second application;

[0076] The acquisition module is used to acquire multiple scanned files contained in the scanned target folder;

[0077] The judgment module is configured to determine that the scanned file is the target file if it is determined that the file type of the scanned file is the same as the first file type, or if it is determined that the file type of the scanned file is the same as the second file type.

[0078] Optionally, the identification module is used to read the first data content of the target file;

[0079] The identification module is used to extract the voucher field that meets the preset format from the first data content;

[0080] The acquisition module is used to acquire the local files of the target application;

[0081] The acquisition module is used to read the second data content of the local file;

[0082] The determination module is used to determine the encryption field that meets the preset format from the second data content;

[0083] The determination module is used to replace the encrypted field with the credential field and determine whether the target application can complete the credential authentication operation. If it is determined that the target application can complete the credential authentication operation, the target file is determined to be the credential file of the target application.

[0084] In the third aspect of the present application, an electronic device is provided, including a processor, a memory, a user interface and a network interface, the memory is used to store instructions, the user interface and the network interface are both used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes any one of the methods described above.

[0085] In a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the instructions are executed, any of the methods described above is executed.

[0086] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

[0087] By pre-defining and centrally managing the credential storage areas of applications, systematically monitoring the file read and write activities in these areas, and automatically scanning the target folders to find credential files that meet specific conditions, the efficiency of credential acquisition is significantly improved. First, based on the target program type of the target application, find the possible preset credential storage area for the target program type. Then monitor the preset credential storage area. If the target application performs file read and write operations on the preset credential storage area, it is further determined that the credential file may be stored in this area. Finally, it is only necessary to scan the folders in the preset credential storage area to query the credential file. This avoids the traditional carpet search of multiple uncertain locations, making credential collection more direct and efficient, while reducing errors and time consumption in manual operations, ensuring the accuracy and security of credential management. Through automated processes, credential files can be quickly identified and verified, thereby improving the overall efficiency of security testing and application configuration. BRIEF DESCRIPTION OF THE DRAWINGS

[0088] Figure 1 It is a flowchart of an automated credential detection method disclosed in an embodiment of the present application;

[0089] Figure 2 It is a module schematic diagram of an automated credential detection device disclosed in an embodiment of the present application;

[0090] Figure 3 It is a structural schematic diagram of an electronic device disclosed in an embodiment of the present application.

[0091] Explanation of the reference numerals: 201, acquisition module; 202, identification module; 203, judgment module; 204, scanning module; 301, processor; 302, communication bus; 303, user interface; 304, network interface; 305, memory. DETAILED DESCRIPTION

[0092] In order to enable technicians in this field to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.

[0093] In the description of the embodiments of the present application, words such as "for example" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "for example" or "for example" is intended to present related concepts in a specific way.

[0094] In the description of the embodiments of the present application, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.

[0095] In today's Internet age, cybersecurity attack and defense exercises are crucial, especially the intranet information collection part of the exercises, which includes the acquisition of key user credential information. This information is the basis for implementing deeper network attacks. However, traditional credential collection methods are complicated and inefficient because they involve multiple storage methods. Therefore, it is particularly important to develop a system that can automatically and efficiently collect credentials to improve the penetration efficiency of the red team in network attack and defense exercises, thereby improving the effectiveness of attack and defense exercises.

[0096] This embodiment discloses an automated credential detection method. Figure 1 , including the following steps:

[0097] S110, obtaining a target application in a list of installed programs.

[0098] The embodiment of the present application discloses an automated credential detection method applied to a server, which is a test computer for attack and defense drills, wherein the credential data and other private data are all fabricated data for the purpose of attack and defense drills, for example, the user name and password are all temporarily fabricated. And the server is fully granted the authority to read the data to complete the attack and defense drills.

[0099] Credential information includes user name, password, token and other authentication information, which is the key credential for accessing the server's systems and services. Before detecting the credential information of an application, it is necessary to identify the applications installed on the server. Usually, users only need to enter the name of the program or process to be found as a parameter, which can automatically traverse the server's installation programs and processes and detect whether the program to be found exists. The server then marks the existing application and records the installation location to facilitate subsequent credential searches and improve efficiency.

[0100] In one possible implementation, obtaining a target application in a list of installed programs specifically includes: querying Windows Installer and the registry to obtain a list of installers, the list of installers including multiple installers; obtaining a list of processes of running programs; merging the list of installers with the list of processes to obtain a list of installed programs, the list of installed programs including multiple installed applications; searching in a detected list according to the name of the installed application to determine a target application that has not undergone credential detection, the detected list including multiple applications that have undergone credential detection.

[0101] Specifically, in Windows systems, information about installed applications is usually stored in the Windows Installer database and the Windows registry. Windows Installer (MSI) maintains a database that contains information about all applications installed on the server through MSI. First, obtain the programs installed through Windows Installer. In addition to applications installed by MSI, many programs may be installed through other installers (such as EXE installers). This information is usually stored in the server's registry. The application-related program information of the installer can be obtained by directly retrieving the relevant path in the registry. Examples of retrieval paths include: "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall". Each subkey under these paths usually represents an installed program, which contains information such as the program name, installation path, and version. Query the DisplayName in Uninstall in the registry to obtain the name of the installer. Finally, merge and de-duplicate the array of installer names returned to obtain an installer list containing multiple installers.

[0102] At the same time, use PowerShell's Get-Process command to obtain a list of currently running processes. The Get-Process command is used to obtain information about processes currently running in the system. It can list all running processes in the system and provide detailed information about each process, such as process ID (PID), name, memory usage, CPU usage, etc. The running programs in the server can be determined through process information, and a process list containing multiple running programs can be output.

[0103] Compare and merge the list of installed programs obtained from Windows Installer and the registry with the list of processes. You can match based on properties such as program name and executable file path. The result of the merge is a list of all installed and potentially running applications. This list more fully reflects the status of applications on the server. The merged list is the installed program list, which includes multiple installed applications.

[0104] Maintain a detected list to record applications that have undergone credential detection. The detected list includes applications that have undergone automated credential detection and manual credential detection. The detected list should also include the credential detection method and the location information of credential storage. By comparing the installed program list with the detected list, you can filter out applications that have not undergone credential detection. This can be achieved by finding entries in the installed list but not in the detected list. After comparison, filter out applications that have not undergone credential detection and output them for subsequent automatic credential detection.

[0105] S120, determining a target program type corresponding to the target application program.

[0106] In a possible implementation, determining the target program type corresponding to the target program type specifically includes: querying the first executable file, the first configuration file, and the first resource file of the target application; querying at least one of the second executable file, the second configuration file, and the second resource file of the first application, the first application is any one of a plurality of applications pre-stored in a preset database, and the first application corresponds to the target program type; if key information of the first executable file and key information of the second executable file are determined, then determining that the target application corresponds to the target program type, the key information includes the execution file name; and\or, if determining that the first configuration file contains the same key data as the second configuration file, then determining that the target application corresponds to the target program type; and\or, if determining that the first resource file contains the same resource file as the second resource file, then determining that the target application corresponds to the target program type.

[0107] Specifically, the credential information may be stored in a variety of different places, including configuration files, databases, registries, memory, etc., and different collection methods need to be adopted for different storage methods. However, the storage location of the credential information of some applications follows a certain pattern, including the credential information of some applications of the same type being stored in the same large folder. For example, for remote control applications such as ToDesk and Sunflower, the credential information of ToDesk is located in the configuration file, and the configuration path of the configuration file of ToDesk is config.ini under the installation directory, while the installation path of Todek is usually "C:\Program Files\ToDesk\". For Sunflower, the credential information of the Sunflower program with a version number less than 11.1.2.38529 is also stored in the configuration file. The local identification code and verification code of Sunflower are both in the configuration file of config.ini, and the specific path of the configuration file is "C:\Program Files\Oray\SunLogin\SunloginClient\config.ini". Therefore, the credential information of both is under the folder "C:\Program Files\".

[0108] Therefore, for a target application that has not been tested for credentials, the server does not store the credential acquisition method of the target application. In order to improve the efficiency of credential detection, it is necessary to identify the program type of the target application, and then find an application of the same type as the target application that has been tested for credential information, and then try to detect the credential information of the target application through the credential detection method corresponding to the application that has been tested for credential information.

[0109] An automated credential detection method disclosed in an embodiment of the present application preferably performs credential detection on remote control type applications. Remote control type applications refer to applications that allow users to control another computer or device from one location (usually a remote location) over a network. Remote control type programs are typically used to remotely access and manage computers or network devices, so certain key user credential information needs to be stored to ensure security and functionality. The types of these credential information may vary depending on the specific remote control software, but typically include user names and passwords, API keys or tokens, and digital certificates (including client and server certificates), etc.

[0110] For unknown applications, determining the purpose of the program based on the program's local files involves analyzing the file type, content, and structure. This analysis can reveal the program's functions, target users, and how it interacts with the operating system or other applications. The purpose can further reveal the application type of the application. For example, in Windows systems, analyze whether the program has entries in the registry, which may be related to program startup, service configuration, or system-level integration. Check whether the program has system-level integration, such as service installation, system startup items, scheduled tasks, etc., which usually come from system management, monitoring, or security-related programs.

[0111] For the target application, whether it belongs to the target program type (preferably the remote control type) can be determined by a variety of methods.

[0112] The first method can be identified through the executable file (first executable file) of the target application. The preset database stores relevant data of multiple different types of applications. The user manually classifies the applications according to the type of application. After classification, the classification information and the relevant data of the application are stored in the preset server. The relevant data includes the executable file, the configuration file, the second resource file, etc.

[0113] The server queries a plurality of pre-stored applications corresponding to the target program type in a preset database, and takes any one of the plurality of pre-stored applications in the preset database, the first application, as an example, and the first application corresponds to the target program type. The first execution file of the target application and the second execution file of the first application are queried, and by comparing the key information of the first execution file with the key information of the second execution file, if it is determined that the first execution file contains the same key information as the second execution file, then it is determined that the target application corresponds to the target program type.

[0114] For remote control type applications, the executable file refers to the main executable part of a software program that is specifically designed to allow a user to control another computer or device from one location (usually a remote location). The executable file contains all the necessary code and resources to implement remote control functions, allowing operations such as screen sharing, file transfer, command execution, etc. By looking for executable file names related to remote desktop, remote access, or network communication, such as "remote", "vnc", "rdp", "ssh" and other key information (file names containing relevant keywords), you can determine whether the application is a remote control type application.

[0115] The second method is to identify the target application through its configurable file (first configuration file). For remote control type applications, the configuration file contains the necessary settings and parameters so that the remote connection can be successfully established and run safely. Check whether the program's configuration file contains key data such as the remote server address, port number, network configuration options, etc. These key data are usually preset or user-configured by the remote control software. Query the first configuration file of the target application and the second configuration file of the first application. By comparing the key data of the first configuration file with the key data of the second configuration file, if it is determined that the first configuration file contains the same key data as the second configuration file, then determine that the target application corresponds to the target program type.

[0116] The third method can be identified through the resource file (first resource file) of the target application. For remote control type applications, it mainly includes various files that support its functions and user interface, such as graphical user interface resources such as icon files, which are usually used for buttons and toolbar icons in the application interface. For example, .ico and .png files are used to display icons for operations such as connection, disconnection, and settings. Analyze the UI resource file of the target application to see if it contains graphical interface elements (resource data) related to remote control, such as buttons or labels such as "Connect", "Disconnect", and "Remote Desktop". Query the first resource file of the target application, as well as the second resource file of the first application. By comparing the key data of the first resource file with the resource data of the second resource file, if it is determined that the first resource file contains the same key data as the second resource file, the target application is determined to correspond to the target program type.

[0117] The above three identification methods can be selectively implemented to determine whether the target application corresponds to the target program type, that is, if it is determined that the first execution file contains the same key information as the second execution file, then the target application is determined to correspond to the target program type; or if it is determined that the first configuration file contains the same key data as the second configuration file, then the target application is determined to correspond to the target program type; if it is determined that the first resource file contains the same key data as the second resource file, then the target application is determined to correspond to the target program type.

[0118] Alternatively, the three identification methods are implemented in parallel to determine whether the target application type corresponds to the target program type, that is, if it is determined that the first execution file contains the same key information as the second execution file, and it is determined that the first configuration file contains the same key data as the second configuration file, and it is determined that the first resource file contains the same key data as the second resource file, then it is determined that the target application corresponds to the target program type. When it is determined that the first execution file does not contain the same key information as the second execution file, or it is determined that the first configuration file does not contain the same key data as the second configuration file, or it is determined that the first resource file does not contain the same key data as the second resource file, then it is determined that the target application does not correspond to the target program type.

[0119] S130, determining a preset credential storage area corresponding to the target program type.

[0120] In a possible implementation, determining a preset credential storage area corresponding to a target program type specifically includes: determining a first application and a second application corresponding to the target program type, the first application and the second application being any two pre-stored applications among a plurality of pre-stored applications in a preset database; obtaining a first credential storage path for the first application, and obtaining a second credential storage path for the second application; extracting a common storage path of the first credential storage path and the second credential storage path; and setting a folder corresponding to the common storage path as a preset credential storage area.

[0121] Specifically, for applications that have undergone credential detection in the preset database, that is, applications in the detected list, their credential storage paths are stored, and they can be stored by adding a "credential storage path" item in the detected list. As mentioned earlier, for applications of the same program type, their credential storage paths may be the same. For applications that have undergone credential detection and belong to the same type, the same storage path items are extracted to determine a storage area to narrow the scope of subsequent credential detection for applications of this type, thereby improving efficiency. For example, for ToDesk and Sunflower, which are both remote control type programs, the credential storage path of ToDesk is "C:\Program Files\ToDesk\...", and the credential storage path of Sunflower is "C:\Program Files\Oray\SunLogin\...", then the two have the same common storage path of "C:\Program Files", and the Program Files folder under the C drive is the credential storage area for subsequent remote control type applications.

[0122] In addition, it is necessary to collect the installation paths of the identified programs with credentials in advance to obtain the final credential storage path, traverse the identified programs with credentials, and then use the Get-InstallLocation function to find their installation locations. After obtaining the installation location, call the Split-Install Location function to clean the data and unify the format, and finally form a key-value pair of program name + installation location. This function searches the Uninstall String item under the registry location and determines the installation location of the program by comparing keywords.

[0123] After obtaining the installation location, the path needs to be formatted in a unified format, removing single and double quotes, removing the uninstaller name, merging multiple slashes, and then returning the processed path. For example, the uninstall path of the "Sunflower" application obtained in the registry is D:\SunLogin\SunloginClient\SunloginClient.exe --mod=uninstall, which will become D:\SunLogin\SunloginClient\ after processing. Or if the ToDesk file path contains double quotes "D:\ToDesk\uninst.exe", it will become D:\ToDesk\ after processing. This function can unify the styles of various paths.

[0124] Although the credentials may be stored in a sub-file of the folder corresponding to the installation path, since only the common storage path is needed to build the credential storage area, the subsequent paths do not need to be collected. Therefore, the installation path can be directly set as the credential storage path. However, if the credentials are not stored in the folder corresponding to the installation path, the corresponding credential storage path is determined according to the actual storage location.

[0125] After determining that the target application belongs to the target program type, call multiple pre-stored applications corresponding to the target program type, and store the credential paths based on the multiple pre-stored applications. Compare the components of each path, starting from the root directory, and compare each directory step by step downward. In Windows systems, the root directory is usually specified as a drive letter, such as "C:\". As long as the directory names are the same, continue to compare downward. When it is found that there is a directory mismatch in the credential storage path, stop comparing. All matching parts are combined to form the longest path, which is the common storage path. If all paths start to differ at the root directory, the common storage path is empty; if there is a common part, that part is returned as the result.

[0126] Take any two pre-stored applications, the first application and the second application, from among the multiple pre-stored applications in the preset database for distance description, and both the first application and the second application correspond to the target program type. Get the first credential storage path of the first application, which is "C:\A\D\E\G", and get the second credential storage path of the first application, which is "C:\A\D\F\G". Start the comparison from the root directory, and since both root directories are "C:\", output the record. The second-level directories are all "A\", and output the record. The third-level directories are all "D\", and output the record. The fourth-level directory of the first credential storage path is "E\", and the fourth-level directory of the second credential storage path is "F\", which are different, stop the comparison, and output the common storage path as "C:\A\D\". In the server, the common storage path corresponds to a folder, which is the preset credential storage area.

[0127] S140: Determine a target folder to be read by a target application program according to a target read and write operation on a preset credential storage area.

[0128] In one possible implementation, detecting a target read and write operation on a preset credential storage area specifically includes: capturing multiple file read and write operations on a file system in real time; determining a first file corresponding to each file read and write operation; determining a second file among the multiple first files, and determining that the file read and write operation on the second file is a target read and write operation, and the file storage path of the second file includes a common storage path.

[0129] Specifically, after obtaining the possible credential storage area (preset credential storage area) of the target application, in order to further narrow the detection scope, find a more specific credential storage location. You can perform credential authentication operations in the target application, including account registration, account login, etc. When a user registers or logs in to his or her account in the target application and selects "Remember Account" or "Auto Login", the target application will usually store the credential information including the account and password locally. Therefore, when the user logs in subsequently, the target application will retrieve the local credential information to achieve automatic login.

[0130] Based on the above principle, by performing credential authentication operations such as logging in or registering on the target application, the read and write operations on the credential file are triggered. After monitoring this operation, the scope of credential monitoring can be further narrowed.

[0131] The purpose of obtaining the preset credential storage area is to improve the efficiency of querying the target folder. Because usually there are a large number of folders and applications in the server. If the files of all drive letters in the entire server are monitored, the monitoring amount is large. Or if all file read and write operations of the target application are monitored, the accuracy is low and all file read and write operations cannot be fully monitored. Therefore, by screening out a smaller preset credential storage area from a large number of folders on the server and only monitoring the preset credential storage area, the monitoring amount can be effectively reduced and the monitoring efficiency can be improved.

[0132] In Windows systems, you can use tools such as the File System Watcher class or Sysinternals ProcessMonitor to capture file operation events, including creation, reading, modification, and deletion. Use scripts or automated tools to parse log files and extract file information from captured events, including file name, operation type, operation time, and operator.

[0133] By monitoring the captured events, you can directly obtain detailed information of the operated file (first file), including the file name and full path. Then filter out the second file from multiple first files, specifically based on the file storage path of each first file. When the storage path of the first file contains the above-mentioned common storage path, it means that the first file is located in the preset credential storage area, and the first file may be the credential file, or the storage folder of the first file stores a credential file, then the first file is determined to be the second file. The folder where the second file is stored is the target folder, which is used for subsequent monitoring of credential information.

[0134] S150, scanning the target folder, searching for a target file that meets a preset condition, and outputting the target file as a credential file of the target application.

[0135] For the target application, since the file type of its credential file is not stored in the preset database, during the automated detection process, even if it can be determined that the credential file may be located in the target folder, if the target folder contains multiple scanned files, it is still impossible to directly determine which scanned file is the credential file of the target application.

[0136] However, for remote control applications, their credential information is stored in a fixed type of file. For example, for Sunflower, when the application version value is less than 11.1.2.38529, Sunflower's local identification code and verification code (credential information) are in the config.ini configuration file. ToDesk's credential information, including the encrypted temporary password and security password, is also located in the config.ini configuration file.

[0137] Based on the above principle, after preliminarily determining that the Pingzhen file of the target application may be located in the target folder, it is only necessary to compare the file types of the multiple scanned files contained in the scanned target folder with the file types of the credential files of each pre-stored application corresponding to the target program type. If the two are consistent, the scanned file is output as a credential file.

[0138] The distance description is performed using any two pre-stored applications, a first application and a second application, from among a plurality of pre-stored applications in a preset database, where both the first application and the second application correspond to the target program type. First, the credential files of the first application and the second application are analyzed. Since both the first application and the second application are applications that have undergone credential detection, the database stores the file types of their credential files.

[0139] The file type of each scanned file is analyzed by identifying the extension of the scanned file (such as .txt, .xml, .db, etc.) and the file content (specific format or pattern, such as JSON or XML structure). Then, for each file scanned in the target folder, its type is compared to see if it matches the file type of the first credential file or the second credential file. If the file type of the scanned file is the same as the first file type of the first credential file, or if the file type of the scanned file is the same as the second file type of the second credential file, the target file is determined to be a credential file for output.

[0140] Furthermore, in order to further determine whether the identified target file is the credential file of the target application, specific fields in the target file can be used to replace the corresponding fields in the local file of the target application to determine whether the corresponding credential authentication operation can be successfully completed, thereby determining whether the target file is the credential file of the target application.

[0141] Specifically, according to the file type of the target file (such as a text file, a database file, or a configuration file in a specific format), select a suitable tool or method to read its first data content. For example, if the file is in text format, any standard text editor or file reading function of a programming language can be used. Clearly define which data constitutes a "credential field", which can be a user name, password, token, etc., and the representation format of these data in the file (such as a specific XML tag, JSON key, or a string in a fixed position, etc.), which can be judged by the preset format commonly used for credentials of remote control type applications. According to the format of the data, use appropriate parsing tools or scripts to identify and extract these credential fields. For example, for XML or JSON files, the corresponding parsing library can be used to extract information.

[0142] Find the local configuration file or data file used by the target application, which may store encrypted credential information. Refer to the reading process of the first data content to read the encrypted field of the second data content in the local file that conforms to the preset format, which may also be the encrypted credential field.

[0143] Replace the original encrypted field with the extracted credential field in the second data content, and use the modified data to attempt credential authentication. This usually involves loading the modified file into the application, or calling the application's authentication mechanism through an API. If the application accepts the modified credential and successfully performs the intended operation (such as logging in, connecting to a database, etc.), then the file is verified to be a valid credential file for the target application.

[0144] Take ToDesk as an example. The configuration path of ToDesk is config.ini in the installation directory. In the content of config.ini, clientId is the device ID, AuthMode is the authentication mode, 0 is to use only temporary passwords, 1 is to use only secure passwords, 2 is to use both, tempAuthPassEx is the encrypted temporary password, and authPassEx is the encrypted secure password. You only need to install the latest version of ToDesk locally, exit ToDesk, and then copy the tempAuthPassEx or authPassEx field in the configuration file config.ini to the local computer for replacement. Finally, re-run ToDesk to view the password, which means that "config.ini" is the credential file of ToDesk.

[0145] By adopting the technical solution of the present application, by pre-defining and centrally managing the credential storage areas of the application, systematically monitoring the file read and write activities in these areas, and automatically scanning the target folders to find credential files that meet specific conditions, the efficiency of credential acquisition is significantly improved. First, according to the target program type of the target application, find out the possible preset credential storage area of ​​the target program type. Then monitor the preset credential storage area. If the target application performs file read and write operations on the preset credential storage area, it is further determined that the credential file may be stored in the area. Finally, it is only necessary to scan the folders in the preset credential storage area to query the credential file. This avoids the traditional carpet search of multiple uncertain locations, making credential collection more direct and efficient, while reducing errors and time consumption in manual operations, and ensuring the accuracy and security of credential management. Through an automated process, credential files can be quickly identified and verified, thereby improving the overall efficiency of security testing and application configuration.

[0146] This embodiment also discloses an automatic credential detection device, referring to Figure 2 The device includes an acquisition module 201, an identification module 202, a judgment module 203 and a scanning module 204, wherein:

[0147] The acquisition module 201 is used to acquire the target application in the installed program list.

[0148] The identification module 202 is used to determine the target program type corresponding to the target application program.

[0149] The determination module 203 is used to determine the preset credential storage area corresponding to the target program type.

[0150] The determination module 203 is used to determine a target folder to be read by the target application according to the file read and write operation on the preset credential storage area, and the target folder is in the preset credential storage area.

[0151] The scanning module 204 is used to scan the target folder, search for target files that meet preset conditions, and output the target files as credential files of the target application.

[0152] In a possible implementation, the acquisition module 201 is used to query a first execution file, a first configuration file, and a first resource file of a target application.

[0153] The identification module 202 is used to query at least one of the second executable file, the second configuration file and the second resource file of the first application, the first application is any one of the multiple pre-stored applications in the preset database, and the first application corresponds to the target program type.

[0154] The judgment module 203 is used to determine that the target application corresponds to the target program type if it is determined that the first execution file contains the same key information as the second execution file, and the key information includes the execution file name. And\or,

[0155] The judgment module 203 is used to determine the target application program type corresponding to the target application program if it is determined that the first configuration file contains the same key data as the second configuration file. And\or,

[0156] The judgment module 203 is used to determine that the target application corresponds to the target program type if it is determined that the first resource file contains the same resource data as the second resource file.

[0157] In a possible implementation, the identification module 202 is used to determine a first application and a second application corresponding to the target program type, where the first application and the second application are any two pre-stored application programs among a plurality of pre-stored application programs in a preset database.

[0158] The acquisition module 201 is used to acquire a first credential storage path of a first application and acquire a second credential storage path of a second application.

[0159] The acquisition module 201 is used to extract a common storage path of the first credential storage path and the second credential storage path.

[0160] The determination module 203 is used to set the folder corresponding to the common storage path as a preset credential storage area.

[0161] In a possible implementation, the acquisition module 201 is used to query the Windows Installer and the registry to acquire an installation program list, where the installation program list includes multiple installation programs.

[0162] The acquisition module 201 is used to acquire a process list of running programs.

[0163] The scanning module 204 is used to merge the installation program list and the process list to obtain an installed program list, where the installed program list includes multiple installed application programs.

[0164] The scanning module 204 is used to search the detected list according to the name of the installed application to determine the target application that has not been tested for credentials, and the detected list contains multiple applications that have been tested for credentials.

[0165] In a possible implementation, the acquisition module 201 is used to capture multiple file read and write operations on the file system in real time.

[0166] The judgment module 203 is used to determine the first file corresponding to each file read and write operation.

[0167] The judgment module 203 is used to determine a second file among the plurality of first files according to the file storage path of the first file, wherein the file storage path of the folder corresponding to the second file includes a common storage path.

[0168] The determination module 203 is used to determine a target folder for storing the second file according to the file storage path of the second file.

[0169] In a possible implementation, the identification module 202 is used to determine a first file type of a first credential file and a second file type of a second credential file, wherein the first credential file is a credential file of a first application and the second credential file is a credential file of a second application.

[0170] The acquisition module 201 is used to acquire multiple scanned files contained in the scanned target folder.

[0171] The judgment module 203 is used to determine that the scanned file is a target file if it is determined that the file type of the scanned file is the same as the first file type, or if it is determined that the file type of the scanned file is the same as the second file type.

[0172] In a possible implementation, the identification module 202 is configured to read the first data content of the target file.

[0173] The identification module 202 is used to extract the voucher field that meets the preset format from the first data content.

[0174] The acquisition module 201 is used to acquire the local files of the target application.

[0175] The acquisition module 201 is used to read the second data content of the local file.

[0176] The judgment module 203 is used to determine the encryption field that meets the preset format from the second data content.

[0177] The determination module 203 is used to replace the encryption field with the credential field and determine whether the target application can complete the credential authentication operation. If it is determined that the target application can complete the credential authentication operation, the target file is determined to be the credential file of the target application.

[0178] It should be noted that: when the device provided in the above embodiment realizes its function, only the division of the above functional modules is used as an example. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0179] This embodiment also discloses an electronic device, referring to Figure 3 The electronic device may include: at least one processor 301 , at least one communication bus 302 , a user interface 303 , a network interface 304 , and at least one memory 305 .

[0180] The communication bus 302 is used to realize the connection and communication between these components.

[0181] The user interface 303 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 303 may also include a standard wired interface and a wireless interface.

[0182] The network interface 304 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0183] Among them, the processor 301 may include one or more processing cores. The processor 301 uses various interfaces and lines to connect various parts in the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 305, and calling data stored in the memory 305. Optionally, the processor 301 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 301 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 301, and it can be implemented separately through a chip.

[0184] The memory 305 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory includes a non-transitory computer-readable storage medium. The memory 305 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 305 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 305 may also be at least one storage device located away from the aforementioned processor 301. The memory 305 as a computer storage medium may include an operating system, a network communication module, a user interface 303 module, and an application for an automated credential detection method.

[0185] exist Figure 3In the electronic device shown, the user interface 303 is mainly used to provide an input interface for the user and obtain data input by the user; and the processor 301 can be used to call an application program storing an automated credential detection method in the memory 305. When executed by one or more processors 301, the electronic device executes one or more methods in the above-mentioned embodiments.

[0186] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the present application.

[0187] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0188] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as 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 service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0189] 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 network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0190] In addition, each functional unit in each embodiment of the present application 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.

[0191] If the 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 memory. Based on this understanding, the technical solution of the present application, 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, which is stored in a memory 305 and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory 305 includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk.

[0192] The present application also discloses a computer-readable storage medium, wherein the computer-readable storage medium stores instructions. When executed by one or more processors 301, the electronic device executes one or more of the methods described in the above embodiments.

[0193] The above is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure cannot be limited thereto. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and the truth of practice, it will be easy for those skilled in the art to think of other embodiments of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field that are not recorded in the present disclosure. The description and examples are regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.

Claims

1. An automated credential detection method, characterized in that: The method comprises: Get the target application in the list of installed programs; Determining a target program type corresponding to the target application program; Determine a preset credential storage area corresponding to the target program type; Determining a target folder read by the target application according to a file read and write operation on the preset credential storage area, the target folder being located in the preset credential storage area; Scan the target folder, search for a target file that meets a preset condition, and output the target file as a credential file of the target application; The determining of the preset credential storage area corresponding to the target program type specifically includes: Determine a first application and a second application corresponding to the target program type, wherein the first application and the second application are any two pre-stored application programs among a plurality of pre-stored application programs in a preset database; Obtain a first credential storage path of the first application, and obtain a second credential storage path of the second application; Extracting a common storage path of the first credential storage path and the second credential storage path; Setting the folder corresponding to the common storage path as the preset credential storage area; The step of determining a target folder to be read by the target application program according to the file read and write operation on the preset credential storage area specifically includes: Capture multiple file read and write operations against the file system in real time; Determine the first file corresponding to each of the file read and write operations; Determine a second file among the plurality of first files according to the file storage path of the first file, wherein the file storage path of the folder corresponding to the second file includes the common storage path; The target folder for storing the second file is determined according to the file storage path of the second file.

2. An automated credential detection method according to claim 1, characterized in that: The determining the target program type corresponding to the target application program specifically includes: Querying a first execution file, a first configuration file, and a first resource file of the target application; querying at least one of a second executable file, a second configuration file, and a second resource file of a first application, wherein the first application is any one of a plurality of pre-stored applications in a preset database, and the first application corresponds to the target program type; If it is determined that the first execution file contains the same key information as the second execution file, then determining that the target application corresponds to the target program type, the key information including the execution file name; and\or, If it is determined that the first configuration file contains the same key data as the second configuration file, then determining that the target application corresponds to the target program type; and\or, If it is determined that the first resource file contains the same resource data as the second resource file, it is determined that the target application corresponds to the target program type.

3. An automated credential detection method according to claim 2, characterized in that: The step of obtaining the target application in the installed program list specifically includes: Query Windows Installer and registry to obtain an installer list, wherein the installer list includes multiple installers; Get the list of running programs. Merging the installation program list and the process list to obtain the installed program list, wherein the installed program list includes a plurality of installed application programs; A search is performed in a detected list according to the name of the installed application to determine a target application that has not undergone credential detection, wherein the detected list includes a plurality of applications that have undergone credential detection.

4. The automated credential detection method according to claim 1, characterized in that: The scanning of the target folder, searching for a target file that meets a preset condition, and outputting the target file as a credential file of the target application program specifically includes: Determine a first file type of a first credential file and a second file type of a second credential file, wherein the first credential file is a credential file of the first application and the second credential file is a credential file of the second application; Acquire multiple scanned files contained in the scanned target folder; If it is determined that the file type of the scanned file is the same as the first file type, or if it is determined that the file type of the scanned file is the same as the second file type, the scanned file is determined to be the target file.

5. The automated credential detection method according to claim 1, characterized in that: After scanning the target folder, searching for a target file that meets a preset condition, and outputting the target file as a credential file of the target application, the method further includes: Reading the first data content of the target file; Extracting a voucher field satisfying a preset format from the first data content; Obtaining local files of the target application; Reading the second data content of the local file; Determining an encrypted field satisfying the preset format from the second data content; The credential field is used to replace the encrypted field, and it is determined whether the target application can complete the credential authentication operation. If it is determined that the target application can complete the credential authentication operation, the target file is determined to be the credential file of the target application.

6. An automated credential detection device, characterized in that: The device includes an acquisition module, an identification module, a judgment module and a scanning module, wherein: The acquisition module is used to acquire the target application in the installed program list; The identification module is used to determine the target program type corresponding to the target application program; The determination module is used to determine a preset credential storage area corresponding to the target program type; The determination module is used to determine a target folder read by the target application according to a file read and write operation on the preset credential storage area, wherein the target folder is located in the preset credential storage area; The scanning module is used to scan the target folder, search for a target file that meets a preset condition, and output the target file as a credential file of the target application; The judgment module is also used for determining the preset credential storage area corresponding to the target program type, specifically including: determining a first application and a second application corresponding to the target program type, wherein the first application and the second application are any two pre-stored applications among a plurality of pre-stored applications in a preset database; obtaining a first credential storage path of the first application, and obtaining a second credential storage path of the second application; extracting a common storage path of the first credential storage path and the second credential storage path; and setting a folder corresponding to the common storage path as the preset credential storage area; The judgment module is also used to determine the target folder read by the target application based on the file read and write operations on the preset credential storage area, specifically including: real-time capture of multiple file read and write operations on the file system; determining the first file corresponding to each of the file read and write operations; determining the second file among the multiple first files based on the file storage path of the first file, wherein the file storage path of the folder corresponding to the second file includes the common storage path; and determining the target folder for storing the second file based on the file storage path of the second file.

7. An electronic device, characterized in that: It includes a processor, a memory, a user interface and a network interface, the memory is used to store instructions, the user interface and the network interface are both used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes the method as described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed, the method according to any one of claims 1 to 5 is performed.