Feature hiding method and device of application software, computer equipment and storage medium
By scanning and merging or replacing target information in the application software, generating conversion information and updating it into the code, the problem of defense in the prior art is solved only when the attack is in progress, and effective defense before the attack is achieved, and information security is improved.
Patent Information
- Application Number
- CN202311101083.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-30
- Publication Date
- 2025-03-18
AI Technical Summary
The existing technology only defends when the application software is attacked, and cannot effectively defend before the attack, resulting in a threat to information security.
By scanning the target information in the global code of the application software, combining or replacing this information to generate conversion information and updating it into the application software's code, making it impossible to be identified by the asset collection system.
It realizes defense before the application software is attacked, avoiding hackers from launching attacks through feature matching assets, and improving the information security of the application software.
Smart Images

Figure CN119646767A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information security technology, and in particular to a method, device, computer equipment, storage medium and computer program product for hiding features of application software. Background Art
[0002] With the development of information security technology, the financial industry pays more and more attention to the ability of application software to defend against attacks. In the existing technology, in the process of development and operation, it is often necessary to introduce commercial products, open source products or conduct secondary development and transformation of these products. There are often certain features in the codes of these introduced external products. After hackers discover vulnerabilities in these products, they will match assets through features and then attack the application software. When attacking, hackers can use asset collection systems such as fofa (a tool for network vulnerability scanning and data collection) to collect assets first. The collection methods include identifying system icons, or identifying the application front-end JS (JavaScript, a computer programming language) code features to collect application software website assets containing a certain vulnerability.
[0003] However, the current mainstream defense methods are to defend when the attack is in progress. Therefore, it is urgent to provide a method that can defend before the application system is attacked. Summary of the invention
[0004] Based on this, it is necessary to provide a feature hiding method, device, computer equipment, computer-readable storage medium and computer program product for application software that can defend against attacks before the application system is attacked, in response to the above technical problems.
[0005] In a first aspect, the present application provides a method for hiding features of application software, the method comprising:
[0006] Scanning target information in at least a portion of the global code of the application software; the target information is information that the asset collection system matches to the application software through identification;
[0007] For each type of the target information, merge the preset file into the file corresponding to the target information, or replace the name corresponding to the target information to obtain the conversion information of the target information;
[0008] updating the conversion information to the code corresponding to the application software; wherein the conversion information is information that cannot be recognized by the asset collection system;
[0009] The application software after updating the code online.
[0010] In one of the embodiments, scanning the target information in at least a portion of the global code of the application software includes: scanning image information in at least a portion of the global code of the application software;
[0011] Wherein, merging the preset file into the file corresponding to the target information to obtain the conversion information of the target information includes:
[0012] Read a transparent picture as the preset file;
[0013] Merging the transparent image into the image file corresponding to the image information to obtain a merged image file;
[0014] The hash value of the merged picture file is used as the conversion information; wherein the hash value of the merged picture file is different from the hash value of the picture file.
[0015] In one of the embodiments, before merging the transparent image into the image file corresponding to the image information, the method further includes:
[0016] The hash value of the transparent picture is modified based on a preset tag; wherein the preset tag includes at least one tag in the image metadata of the transparent picture.
[0017] In one embodiment, modifying the hash value of the transparent image based on a preset tag includes:
[0018] Calling the API for managing image metadata;
[0019] Using the application program interface for managing image metadata to read the transparent image, and obtain image metadata of the transparent image;
[0020] Reading at least one tag in the image metadata as the preset tag;
[0021] Randomly transform the value of the preset tag to obtain a transformation value of the preset tag;
[0022] The hash value of the transparent image is modified based on the conversion value.
[0023] In one of the embodiments, reading at least one tag in the image metadata includes:
[0024] At least one of a picture creation time tag, a picture modification time tag, a picture brightness tag, and a picture contrast tag in the image metadata is read.
[0025] In one of the embodiments, scanning the target information in at least part of the global code of the application software includes: scanning the file name information of a preset file and / or the attribute feature information in the file in at least part of the global code of the application software;
[0026] Wherein, replacing the name corresponding to the target information to obtain the conversion information of the target information includes:
[0027] The file name information is replaced by a preset string, and / or the attribute characteristic information is replaced by a preset string to obtain conversion information corresponding to the file name information and / or the attribute characteristic information in the file; wherein the preset string is a random string.
[0028] In one of the embodiments, scanning the target information in at least a portion of the global code of the application software includes: scanning the image information in the image format in at least a portion of the global code of the application software based on a regular matching method.
[0029] In a second aspect, the present application further provides a feature hiding device for application software, the device comprising:
[0030] A scanning module, used to scan target information in at least part of the global code of the application software; the target information is information that the asset collection system matches to the application software through identification;
[0031] A conversion module, for merging a preset file into a file corresponding to the target information, or replacing a name corresponding to the target information, for each type of the target information, to obtain conversion information of the target information;
[0032] An updating module, which updates the conversion information to the code corresponding to the application software; wherein the conversion information is information that cannot be recognized by the asset collection system;
[0033] An application deployment module is used to update the application software after the code is updated online.
[0034] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0035] Scanning target information in at least a portion of the global code of the application software; the target information is information that the asset collection system matches to the application software through identification;
[0036] Merge the preset file into the file corresponding to the target information to obtain conversion information of the target information; or,
[0037] Replacing the name corresponding to the target information to obtain conversion information of the target information;
[0038] updating the conversion information to the code corresponding to the application software; wherein the conversion information is information that cannot be recognized by the asset collection system;
[0039] The application software after updating the code online.
[0040] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0041] Scanning target information in at least a portion of the global code of the application software; the target information is information that the asset collection system matches to the application software through identification;
[0042] Merge the preset file into the file corresponding to the target information to obtain conversion information of the target information; or,
[0043] Replacing the name corresponding to the target information to obtain conversion information of the target information;
[0044] updating the conversion information to the code corresponding to the application software; wherein the conversion information is information that cannot be recognized by the asset collection system;
[0045] The application software after updating the code online.
[0046] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0047] Scanning target information in at least a portion of the global code of the application software; the target information is information that the asset collection system matches to the application software through identification;
[0048] Merge the preset file into the file corresponding to the target information to obtain conversion information of the target information; or,
[0049] Replacing the name corresponding to the target information to obtain conversion information of the target information;
[0050] updating the conversion information to the code corresponding to the application software; wherein the conversion information is information that cannot be recognized by the asset collection system;
[0051] The application software after updating the code online.
[0052] The feature hiding method, apparatus, computer equipment, storage medium and computer program product of the above-mentioned application software scan the target information in at least part of the code in the application software, and then obtain the conversion information of the target information by merging the preset file into the file corresponding to the target information, or by replacing the name corresponding to the target information, and then update the conversion information to the code corresponding to the application software to realize the modification of the corresponding code in the application software, so that the application software launched after the code is updated can avoid the attack launched by the application attacker based on the asset matching through the feature, realize the advance defense before the application is attacked, and improve the information security of the application software. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 An application environment diagram of the feature hiding method for application software provided in an embodiment of the present application;
[0054] Figure 2 A flow chart of a first embodiment of a feature hiding method for application software provided in an embodiment of the present application;
[0055] Figure 3 A flow chart of a second embodiment of the feature hiding method for application software provided in an embodiment of the present application;
[0056] Figure 4 A flowchart of a third embodiment of the feature hiding method for application software provided in an embodiment of the present application;
[0057] Figure 5 A flowchart of a fourth embodiment of the feature hiding method for application software provided in an embodiment of the present application;
[0058] Figure 6 A flowchart of a fifth embodiment of the feature hiding method of application software provided in an embodiment of the present application;
[0059] Figure 7 A schematic diagram of a feature hiding device for application software provided in an embodiment of the present application;
[0060] Figure 8 A schematic diagram of a scanning module provided in an embodiment of the present application;
[0061] Fig. 9 A schematic diagram of a conversion module provided in an embodiment of the present application;
[0062] Fig.10 An internal structure diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0063] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0064] Figure 1 FIG. 1 is an application environment diagram of the feature hiding method of application software provided in the embodiment of the present application. The feature hiding method of application software provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 12 communicates with the server 14 through the network. The data storage system can store the data that the server 14 needs to process. The data storage system can be integrated on the server 14, or it can be placed on the cloud or other network servers. For the feature hiding method of the application software provided in this application, among them, the terminal 12 can be but not limited to various personal computers, laptops, tablet computers, Internet of Things devices, etc. The server 14 can be implemented with an independent server or a server cluster consisting of multiple servers.
[0065] Figure 2 The first embodiment of the feature hiding method of application software provided in the embodiment of the present application is a flow chart. In one embodiment, Figure 2 As shown, a feature hiding method for application software is provided, and the method is applied to Figure 1 Taking the terminal 12 in the example as an example, the present application provides a method for hiding the characteristics of application software, which may include at least the following steps 101 to 104, but the present application is not limited thereto, and the steps of the method for hiding the characteristics of application software may be added or deleted according to the requirements. The method includes the following steps:
[0066] Step 101 , scanning target information in at least a portion of the global code of the application software; the target information is information that the asset collection system matches to the application software through identification.
[0067] Specifically, in the method, step 101 is used to scan the application software to scan out the target information in the application software code. The target information here can be used by the asset collection system to identify and then match it to the corresponding application software. That is, in the prior art, the target information will be collected as a feature by an application attacker (such as a hacker) using the asset collection system and then used to attack the application software.
[0068] The present application uses step 101 to scan out the target information in the application software code, so as to facilitate the modification of the target information in subsequent steps, so as to avoid hackers from collecting the target information using the asset collection system. In the application software related to the financial industry, such a setting can avoid hackers' attacks on the corresponding financial application software and improve the information security of the financial application software.
[0069] It should also be added that what is proposed in step 101 is to scan at least part of the global code of the application software, that is, the global code of the application software can be scanned according to needs, or part of the code of the application software can be scanned according to needs. For example, you can choose to scan only the front-end code, or only the back-end code. The present application does not make any specific limitations on this.
[0070] Step 102: for each type of target information, merge the preset file into the file corresponding to the target information, or replace the name corresponding to the target information to obtain conversion information of the target information.
[0071] Specifically, after scanning the target information in at least part of the global code of the application software through step 101, the target information can be processed through step 102. Here, the present application provides two optional implementation methods for processing the target information. One is that for part of the target information, for example, for a certain type of target information, the target information can be modified by merging a preset file into a file corresponding to the target information to obtain the modified conversion information; wherein, the number of preset files merged into a file corresponding to a target information can be one or more, and the present application does not make specific restrictions on this, as long as the effect of changing the target information can be achieved, it can be changed to conversion information different from the previous one. The second is that for part of the target information, such as another type of target information, the name corresponding to the target information can be replaced to obtain the modified conversion information.
[0072] It should also be added that the present application does not specifically limit which of the above two methods is used in the process of changing the target information to the conversion information. As long as the target information can be changed to a conversion information different from the previous one, it can be used. Furthermore, for the target information in the code scanned out in step 101, it will include a variety of target information, and there are many different types of these target information. According to the needs, it can be selected to obtain the conversion information by merging the preset file to the file corresponding to the target information for all the scanned target information, or it can be selected to obtain the conversion information by replacing the name corresponding to the target information for all the target information according to the needs, or it can be selected to obtain the conversion information by merging the preset file to the file corresponding to the target information for part of the target information and obtaining the conversion information by replacing the name corresponding to the target information for part of the target information according to the needs. The present application does not specifically limit this.
[0073] The present application changes the target information in the code scanned in step 101 into conversion information through the above step 102, and changes the information in the code of the application software that can be collected by hackers using the asset collection system to avoid hackers using the asset collection system to collect this information. In the application software related to the financial industry, such a setting can avoid hackers' attacks on the corresponding financial application software and improve the information security of the financial application software.
[0074] It should also be added that the two methods of processing the target information in the form of "or" in step 102 are not used to limit the target information obtained from step 101 to only be processed by one method in step 102, but it is necessary to select, according to the different types of target information obtained in step 101, each (type) of target information to merge the preset file to the file corresponding to the target information in step 102, to obtain the conversion information of the target information, so as to realize the processing of a certain target information; or to select, for each (type) of target information, to replace the name corresponding to the target information in step 102, to obtain the conversion information of the target information, so as to realize the processing of a certain target information. That is, the two methods of processing the target information in the form of "or" in step 102 are selected for each (type) of target information, not for all the target information obtained in step 101.
[0075] Step 103, updating the conversion information to the code corresponding to the application software; wherein the conversion information is the information that the asset collection system identifies that it cannot match the application software.
[0076] Specifically, after the target information in the code scanned in step 101 is changed to conversion information through step 102, step 103 can be further executed to update the conversion information to the code corresponding to the application software, so as to achieve the update of the target information in the code of the application software by replacing it with the conversion information, so that the application software after the code is updated will not be used by hackers to collect the feature information required for their attack by using the asset collection system, thereby avoiding hackers' attacks on the application software and improving the information security of the application software.
[0077] It should be added that when hackers use the asset collection system to identify the target information, they will match it to the corresponding application software. After changing the target information into conversion information, the hackers have no way of knowing the specific content of the conversion information. Therefore, they cannot use the asset collection system to identify feature information that they are not aware of, thereby improving the security of the application software.
[0078] Step 104, launching the application software with updated code.
[0079] Specifically, after the code of the application software is updated in step 103, the updated code can be uploaded to the corresponding application software in step 104. The application software after the code update no longer includes the target information that the hacker can know, but replaces the target information with conversion information that the hacker has no way of knowing. Therefore, the asset collection system cannot identify feature information that the hacker is not aware of, thereby improving the security of the application software.
[0080] The feature hiding method of the above-mentioned application software scans the target information in at least part of the code in the application software, and then obtains the conversion information of the target information by merging the preset file into the file corresponding to the target information, or by replacing the name corresponding to the target information, and then updates the conversion information to the code corresponding to the application software to realize the modification of the corresponding code in the application software, so that the application software launched after the code is updated can avoid the attack launched by the application attacker based on the asset matching through the feature, realizes the prior defense before the application is attacked, and improves the information security of the application software; therefore, the feature hiding method of the application software provided by the present application solves the problem in the prior art that the defense means are used for defense during the attack, and the application system (software) lacks a better prevention method for the asset collection stage before the attack begins.
[0081] It should also be added that in the feature hiding method of application software provided by this application, steps 101 to 103 can be performed only once, or two or more times as required to improve the security of the corresponding code of the updated application software; this application does not specifically limit the number of executions of steps 101 to 103. In addition, for the application software after the updated code is online, when there is a need, the process of steps 101 to 104 can be executed again to realize another update of the application software code, further improving the security of the relevant application software.
[0082] Figure 3 For a flow chart of a second embodiment of the feature hiding method for application software provided in the embodiment of the present application, please refer to Figure 3 ,In one embodiment, scanning the target information in at least part of the global code of the application software in step 101 includes: scanning the picture information in at least part of the global code of the application software;
[0083] The step 102 of merging the preset file into the file corresponding to the target information to obtain the conversion information of the target information includes:
[0084] Step 121, read a transparent picture as a preset file;
[0085] Step 122, merging the transparent image into the image file corresponding to the image information to obtain a merged image file;
[0086] Step 123, using the hash value of the merged image file as conversion information; wherein the hash value of the merged image file is different from the hash value of the image file.
[0087] Specifically, the present application also provides an optional implementation method, in which the target information in at least part of the global code of the scanning application software proposed in step 101 can specifically be the image information in at least part of the global code of the scanning application software. At this time, the corresponding step 102 can choose to merge the preset file into the file corresponding to the target information to obtain the conversion information of the target information. Specifically, the execution steps of merging the preset file into the file corresponding to the target information to obtain the conversion information of the target information may at least include steps 121 to 123. Since step 101 specifically scans the image information in the code, in order not to affect the display effect of the image corresponding to the image information and affect the user's perception, the present application provides an optional implementation method, which is to read a transparent image as the preset file through step 121, and then merge the transparent image into the image file corresponding to the image information scanned in step 101 through step 122 to obtain a merged image file, that is, the merged image file is the superposition of the original image file and the transparent image. Therefore, the merged image file not only includes the image information of the original image file, but also includes the image information of the merged transparent image. Therefore, the image information of the merged image file obtained through step 123 is the conversion information obtained after the image information corresponding to the original image file is modified by merging the transparent image, and specifically, the hash value of the merged image file is used as the conversion information; in other words, the conversion information is the hash value in the image information of the merged image file, and the hash value in the conversion information is different from the hash value in the image information of the original image file.
[0088] It should be noted that the image information, for example, includes the hash value of the image file. For the original image file, the hash value included therein may be a first hash value. The transparent image has a second hash value different from the first hash value. The merged image file obtained by merging the transparent image into the original image file will have a third hash value, which is different from the first hash value and the second hash value; that is, the conversion information of the merged image file includes the hash value of the merged image file, and the hash value of the merged image file is different from the hash value of the image file.
[0089] In summary, the present application can achieve the change of image information by merging a transparent image into the image file corresponding to the image information in the scanned code to obtain the changed conversion information; by changing the information (such as image information) in the application software code that can be collected by hackers using the asset collection system, the collection of such information by hackers using the asset collection system can be avoided, thereby avoiding hackers' attacks on the corresponding application software, which is beneficial to improving the information security of the application software.
[0090] It should also be added that the above-mentioned merging of a transparent image into the image file corresponding to the image information is only an optional implementation method provided by the present application, but the present application is not limited thereto. It is also possible to merge 2, 3, 4, or other optional transparent images into the image file corresponding to the image information according to the requirements, as long as the original image information can be updated to the conversion information by merging the transparent image into the image file corresponding to the image information. Furthermore, the present application does not limit the size and shape of the transparent image. The size and shape of the transparent image can be selected to be the same as at least one of the size and shape of the image file corresponding to the merged image, or the size and shape of the transparent image can be selected to be different from the size and shape of the image file corresponding to the merged image; in addition, when merging multiple transparent images into the image file, the size and shape of the transparent images can be selected to be the same, or at least partially the same, or they can be different. The present application does not make specific limitations on this, and the size and shape of the transparent image can be selected according to the requirements.
[0091] Please continue to refer to Figure 3 In one embodiment, before executing step 122 to merge the transparent image into the image file corresponding to the image information, the method further includes:
[0092] Step 120, modifying the hash value of the transparent image based on a preset tag; wherein the preset tag includes at least one tag in the image metadata of the transparent image.
[0093] Specifically, the present application also provides an optional implementation method, before executing step 122 to merge the transparent image into the image file corresponding to the image information, it also includes step 120, step 120 modifies the hash value of the transparent image based on a preset tag, so that the second hash value originally included in the transparent image, such as the above-mentioned second hash value, can be modified to a fourth hash value, the fourth hash value is different from the second hash value, and of course, the fourth hash value is also different from the first hash value; by modifying the hash value of the transparent image before merging the transparent image into the image file corresponding to the image information, the possibility of the third hash value of the merged image file obtained after the merge being known to hackers can be further reduced, thereby further improving the information security of the application software.
[0094] Figure 4 Please refer to the flowchart of the third embodiment of the feature hiding method of application software provided in the embodiment of the present application. Figure 4 In one embodiment, modifying the hash value of the transparent image based on the preset tag in step 120 includes:
[0095] Step 201, calling an application program interface for managing image metadata;
[0096] Step 202, reading the transparent image using an application program interface for managing image metadata to obtain image metadata of the transparent image;
[0097] Step 203, reading at least one tag in the image metadata as a preset tag;
[0098] Step 204, randomly transforming the value of the preset tag to obtain a transformation value of the preset tag;
[0099] Step 205: modify the hash value of the transparent image based on the conversion value.
[0100] Specifically, the present application also provides an optional implementation method, in which the above-mentioned step 120 modifies the hash value of the transparent image based on the preset tag, which may specifically include steps 201-205, wherein step 201 is used to call the application program interface for managing image metadata, and then read the transparent image read in step 121 through step 202 using the application program interface for managing image metadata called by step 201 to obtain the image metadata of the transparent image, and then read one or more tags in the image metadata as preset tags through step 203, and then randomly transform the value of the preset tag obtained in step 203 through step 204 to obtain a conversion value corresponding to the value of the preset tag, and then modify the hash value of the transparent image based on the conversion value obtained in step 204 through step 205, so that the second hash value originally included in the transparent image, such as the above-mentioned second hash value, can be modified to a fourth hash value; by modifying the hash value of the transparent image once before merging the transparent image into the image file corresponding to the image information, the possibility of the third hash value of the merged image file obtained after the merge being known to hackers can be further reduced, thereby further improving the information security of the application software.
[0101] It should be noted that when reading at least one tag in the image metadata as a preset tag in step 203, you can choose to read 1 tag, 2 tags, 3 tags, or more tags in the image metadata according to your needs. This application does not specifically limit the number of tags in the read image metadata.
[0102] Please continue to refer to Figure 4 In one embodiment, the step of reading at least one tag in the image metadata performed in step 203 includes:
[0103] Step 231: read at least one of a picture creation time tag, a picture modification time tag, a picture brightness tag, and a picture contrast tag in the image metadata.
[0104] Specifically, the present application also provides an optional implementation method, in which the tags in the image metadata may specifically include a picture creation time tag, a picture modification time tag, a picture brightness tag, a picture contrast tag, etc. Therefore, the above-mentioned step 203 of reading at least one tag in the image metadata may specifically be as described in step 231, reading any one of the picture creation time tag, picture modification time tag, picture brightness tag, and picture contrast tag in the image metadata, or any two tags, or any three tags, or any more tags.
[0105] The present application reads one or more tags in the image metadata as preset tags, and then randomly transforms the values of the preset tags to obtain conversion values corresponding to the values of the preset tags, and then modifies the hash value of the transparent image by the conversion value to modify the original hash value of the transparent image; by modifying the hash value of the transparent image once, the possibility of the hash value of the merged image file obtained after the merge being known by hackers can be further reduced, thereby further improving the information security of the application software.
[0106] Figure 5 Please refer to the fourth embodiment of the flowchart of the feature hiding method of application software provided in the embodiment of the present application. Figure 5 , in one embodiment, scanning target information in at least part of the global code of the application software performed in step 101 includes: scanning file name information of a preset file in at least part of the global code of the application software and / or attribute feature information in the file;
[0107] The step 102 replaces the name corresponding to the target information to obtain the conversion information of the target information, including:
[0108] Step 124, using a preset string to replace the file name information, and / or, step 125, using a preset string to replace the attribute feature information, to obtain conversion information corresponding to the file name information and / or the attribute feature information in the file; wherein the preset string is a random string.
[0109] Specifically, the present application also provides an optional implementation method, in which the target information in at least part of the global code of the scanning application software proposed in step 101 can be specifically the file name information of the preset file in at least part of the global code of the scanning application software and / or the attribute characteristic information in the file; at this time, the corresponding step 102 can be correspondingly selected to replace the name corresponding to the target information to obtain the conversion information of the target information. Specifically, the step of replacing the name corresponding to the target information may include step 124 and / or step 125, because step 101 specifically scans the file name information in the code, such as the JS file name, the CSS (Cascading Style Sheets) file name, and / or scans the attribute characteristic information in the file in the code, such as the class attribute name, the id attribute name. Based on this, the present application can further replace the file name information with a preset string through step 124, and / or further replace the attribute characteristic information with a preset string through step 125, thereby realizing the change of the file name information in the global code scanned in step 101 and the attribute characteristic information in the file, so as to ensure that the service is available while hiding the system features.
[0110] By changing the information in the application software code that can be collected as features by application hackers using the asset collection system (such as file name information in the code, attribute feature information in the file), we can avoid hackers using the asset collection system to collect this information, thereby avoiding hackers' attacks on the corresponding application software, which is beneficial to improving the information security of the application software.
[0111] Please refer to Figure 3 In one embodiment, step 101 of scanning target information in at least part of the global code of the application software includes: scanning image information in a picture format in at least part of the global code of the application software based on a regular matching method.
[0112] Specifically, the present application also provides an optional implementation method, in which step 101 scans the target information in at least part of the global code of the application software, which can be specifically executed by scanning the image information in the image format in at least part of the global code of the application software based on a regular matching method, wherein the image format can be reflected in the code as ".icon" or ".ico".
[0113] The present application also provides an optional embodiment, which is to scan the image information in the ".icon" and ".ico" formats in the front-end code and extract the image content through a regular matching method; scan the JS, CSS and other files of the front-end code and the attribute feature information such as class and id in the files.
[0114] Furthermore, the website icon image is processed to change the hash value of the icon image, so that the icons of the same system are indistinguishable in the eyes of users, but hackers cannot find the assets of the same enterprise due to the different hash values when collecting information through the icon image; specifically, the extracted website icon image and the transparent image in the device can be merged into one, thereby modifying the iconhash value. In order to ensure that the hash value of each system icon image is different, the metadata of the transparent image is changed by a random conversion subunit before merging (the image metadata is a label embedded in the image), thereby modifying the hash value of the transparent image; the specific method is as follows: the transparent image is read by calling the Exiv2 API (Application Program Interface), the transparent image metadata information is obtained, the label in the transparent image metadata (such as image creation time, modification time, brightness, contrast, etc.) is randomly read, and the value of the label is converted accordingly. For example, if the createdate label is read, the value of the label is set to the current time (or random time) and executed, and the hash value of the image is modified. Exiv2 is a C++ library and command-line utility for reading, writing, deleting, and modifying image metadata on different platforms.
[0115] Furthermore, the website JS, CSS and other files and the attribute feature information such as class and id in the files are processed. By modifying the above feature values, hackers cannot find the corresponding system assets when collecting information through such features. Generate a random string, take the JS, CSS file names in the scanned front-end code and the attribute feature information such as class and id in the code, and modify the file name and attribute name in the global code while modifying the code applied to this part (for example, modifying the class parameter will modify the corresponding name in the CSS and other files) to ensure that the business is available while hiding the system features.
[0116] Figure 6 The fifth embodiment flow chart of the feature hiding method of application software provided in the embodiment of the present application, the present invention prevents hackers from collecting information through relevant features and then launching attacks on the application system by changing the icon image hash value and code feature value of the application system. In addition, since the two methods of processing the target information in the form of "or" in step 102 are selected for each target information, it is not that all the target information obtained in step 101 are selected at the same time. A workflow diagram of the method is introduced below, as shown in FIG. Figure 6 As shown, the specific steps are as follows:
[0117] Step S1: Scan the icon files and JS and CSS files of the application system (software);
[0118] Step S2: modifying the image hash value, specifically using a transparent image merging method to modify the scanned icon file hash value;
[0119] Step S3: Replace the feature information, specifically generate a random string to replace the JS, CSS file names in the system front-end code and the attribute feature information such as class and id in the file;
[0120] Step S4: deploy the online application to complete the deployment of the online application after the replacement.
[0121] It should also be added that the above-mentioned feature hiding method provided in the present application can be applied to the financial industry to improve the security of financial application software and prevent the financial application software from being attacked by hackers, thereby protecting the property safety and information security of users who use the financial application software; however, the present application is not limited to this. The above-mentioned feature hiding method can also be applied to application systems (software) in other fields as needed, so that part of the code content in the application system can be replaced to protect the application system from being attacked by hackers, thereby ensuring the safety of use of related application software and the information security and property security of related users.
[0122] It should be understood that, although in the flowcharts involved in the above-mentioned embodiments, there are various steps that are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0123] Based on the same inventive concept, the embodiment of the present application also provides a feature hiding device for application software for implementing the feature hiding method of application software involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiment of the feature hiding device for application software provided below can refer to the limitations of the feature hiding method for application software above, and will not be repeated here.
[0124] Figure 7 A schematic diagram of a feature hiding device for application software provided in an embodiment of the present application, please refer to Figure 2-Figure 6 Reference Figure 7 In one embodiment, if Figure 7 As shown, a feature hiding device 200 for application software is provided, comprising: a scanning module 91, a conversion module 92, an update module 93 and an application deployment module 94, wherein:
[0125] A scanning module 91 is used to scan target information in at least part of the global code of the application software; the target information is information that the asset collection system matches to the application software through identification;
[0126] The conversion module 92 is used to merge the preset file into the file corresponding to the target information, or replace the name corresponding to the target information, for each type of target information, to obtain conversion information of the target information;
[0127] An updating module 93 updates the conversion information to the code corresponding to the application software; wherein the conversion information is information that cannot be recognized by the asset collection system;
[0128] The application deployment module 94 is used to update the application software after the code is updated online.
[0129] Specifically, the scanning module 91 is used to scan the application software to scan out the target information in the application software code. The target information here can be used by the asset collection system to match the corresponding application software after identification, that is, the target information will be used to attack the application software after being collected by the application attacker (such as a hacker) using the asset collection system in the prior art. Scanning the target information in the application software code by the scanning module 91 facilitates the subsequent steps to change these target information to avoid hackers using the asset collection system to collect these target information. In the application software related to the financial industry, such a setting can avoid hackers from attacking the corresponding financial application software and improve the information security of the financial application software. Among them, the above-mentioned scanning of at least part of the global code of the application software can also scan the global code of the application software according to the needs, and can also scan part of the code of the application software according to the needs. For example, it can be selected to scan only the front-end code, or only the back-end code. This application does not make specific restrictions on this.
[0130] The conversion module 92 processes the target information. Here, the present application provides two optional implementation methods for processing the target information. One is that, for part of the target information, for example, for a certain type of target information, the target information can be modified by merging a preset file into a file corresponding to the target information to obtain the modified conversion information; wherein, the number of preset files merged into a file corresponding to a target information can be one or more, and the present application does not make specific restrictions on this. As long as the target information can be modified, it can be changed into conversion information different from the previous one. The second is that, for part of the target information, for example, another type of target information, the name corresponding to the target information can be replaced to obtain the modified conversion information.
[0131] It should also be added that the present application does not specifically limit which of the above two methods is used in the process of changing the target information to the conversion information. As long as the target information can be changed to a conversion information different from the previous one, it can be changed. Furthermore, for the target information in the code scanned by the scanning module 91, it will include a variety of target information, and there are many different types of these target information. According to the needs, it can be selected to obtain the conversion information by merging the preset file to the file corresponding to the target information for all the scanned target information, or it can be selected to obtain the conversion information by replacing the name corresponding to the target information for all the target information according to the needs, or it can be selected to obtain the conversion information by merging the preset file to the file corresponding to the target information for part of the target information and obtaining the conversion information by replacing the name corresponding to the target information for part of the target information according to the needs. The present application does not specifically limit this.
[0132] The present application changes the target information in the code scanned by the scanning module 91 into conversion information through the conversion module 92, and changes the information in the code of the application software that can be collected by the application hacker using the asset collection system, so as to avoid the hacker using the asset collection system to collect this information. In the application software related to the financial industry, such a setting can avoid hackers' attacks on the corresponding financial application software and improve the information security of the financial application software.
[0133] The update module 93 is used to update the conversion information into the code corresponding to the application software, so as to achieve the update of the target information in the code of the application software being replaced with the conversion information, so that the application software after the code is updated will not be used by hackers to collect the feature information required for their attack using the asset collection system, thereby avoiding hackers' attacks on the application software and improving the information security of the application software.
[0134] It should be added that when hackers use the asset collection system to identify the target information, they will match it to the corresponding application software. After changing the target information into conversion information, the hackers have no way of knowing the specific content of the conversion information. Therefore, they cannot use the asset collection system to identify feature information that they are not aware of, thereby improving the security of the application software.
[0135] The application deployment module 94 is used to upload the updated code to the corresponding application software. The updated application software no longer includes the target information that the hacker can know. Instead, the target information is replaced with conversion information that the hacker has no way of knowing. Therefore, the asset collection system cannot identify feature information that the hacker is not aware of, thereby improving the security of the application software.
[0136] The feature device of the above-mentioned application software scans the target information in at least part of the code in the application software through the scanning module 91, and then merges the preset file into the file corresponding to the target information through the conversion module 92, or replaces the name corresponding to the target information to obtain the conversion information of the target information, and then updates the conversion information to the code corresponding to the application software in the update module 93 to realize the modification of the corresponding code in the application software, so that the application software launched through the application deployment module 94 after the code is updated can avoid the attack launched by the application attacker based on the asset matching through the feature, realizes the advance defense before the application is attacked, and improves the information security of the application software; therefore, the feature hiding method of the application software provided by the present application solves the problem in the prior art that the defense means defends during the attack, and the application system lacks a better prevention method for the asset collection stage before the attack begins.
[0137] In summary, the device of the present invention realizes defense left shift through the method of hiding application software features, that is, by eliminating the characteristics of the system and preventing hackers from using the characteristics to collect assets, the system is "hidden" and the defense is advanced before the hacker launches the attack. When there are vulnerabilities in the application system, the probability of being attacked can be greatly reduced.
[0138] In one embodiment, the scanning module 91 is used to scan the target information in at least part of the global code of the application software, including: scanning the image information in at least part of the global code of the application software; the conversion module 92 is used to merge the preset file into the file corresponding to the target information to obtain the conversion information of the target information, including: reading a transparent image as the preset file; merging the transparent image into the image file corresponding to the image information to obtain a merged image file; using the hash value of the merged image file as the conversion information; wherein the hash value of the merged image file is different from the hash value of the image file. For details, please refer to Figure 3 , and the above Figure 3 Description.
[0139] In one embodiment, before the conversion module 92 is used to merge the transparent image into the image file corresponding to the image information, it also includes: modifying the hash value of the transparent image based on a preset tag; wherein the preset tag includes at least one tag in the image metadata of the transparent image. Figure 3 , and the above Figure 3 Description.
[0140] In one embodiment, the conversion module 92 is used to modify the hash value of the transparent image based on the preset tag, including: calling the application program interface for managing image metadata; using the application program interface for managing image metadata to read the transparent image and obtain the image metadata of the transparent image; reading at least one tag in the image metadata as a preset tag, randomly converting the value of the preset tag to obtain the conversion value of the preset tag; and modifying the hash value of the transparent image based on the conversion value. For details, please refer to Figure 4 , and the above Figure 4 Description.
[0141] In one embodiment, the conversion module 92 is used to read at least one tag in the image metadata, including: reading at least one of the image creation time tag, the image modification time tag, the image brightness tag, and the image contrast tag in the image metadata. Figure 4 , and the above Figure 4 Description.
[0142] In one embodiment, scanning the target information in at least part of the global code of the application software by the scanning module 91 includes: scanning the file name information of the preset file in at least part of the global code of the application software and / or the attribute characteristic information in the file; replacing the name corresponding to the target information to obtain the conversion information of the target information, including: using a preset string to replace the file name information, and / or, using a preset string to replace the attribute characteristic information, to obtain the file name information and / or the conversion information corresponding to the attribute characteristic information in the file; wherein the preset string is a random string. For details, please refer to Figure 5 , and the above Figure 5 Description.
[0143] In one embodiment, scanning the target information in at least part of the global code of the application software includes: scanning the image information in the image format in at least part of the global code of the application software based on a regular matching method. Figure 3 , and the above Figure 3 Description.
[0144] Figure 8 A schematic diagram of a scanning module provided in an embodiment of the present application, Fig. 9 A schematic diagram of the conversion module provided in the embodiment of the present application, please refer to Figure 7-Figure 9, an optional embodiment is supplemented as follows: the scanning module 91 provided in the present application may include an icon scanning submodule 911 and a code scanning submodule 912, wherein the icon scanning submodule 911 scans the image information in the ".icon" and ".ico" formats in the front-end code and extracts the image content through a regular matching method. The code scanning submodule 912 is responsible for scanning the JS, CSS and other files of the front-end code as well as the attribute feature information such as class and id in the files. The conversion module 92 may include a combination subunit 921 and a random conversion subunit 922. The combination subunit 921 modifies the icon hash value of the website icon image by merging the extracted website icon image with the transparent image in the device into one; the random conversion subunit 922 is used to change the image metadata of the transparent image (the image metadata is a label embedded in the image), thereby modifying the hash value of the transparent image. The conversion module 92 may also include a name generation subunit 923 and a code conversion subunit 924. The name generation subunit 923 is used to generate a random string to replace the JS, CSS file names in the front-end code scanned by the scanning module 91 and the attribute feature information such as class and id in the code. The code conversion subunit 924 modifies the file name and attribute name in the global code while also modifying the code applied to that part (for example, modifying the class parameter will modify the corresponding name in the CSS and other files).
[0145] Each module in the feature hiding device 200 of the above application software can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0146] Fig.10 An internal structure diagram of a computer device provided in an embodiment of the present application. In one embodiment, a computer device is provided. The computer device may be a terminal. The internal structure diagram thereof may be as follows: Fig.10As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, it implements the feature hiding method of any application software provided in this application. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0147] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0148] Based on the same inventive concept, the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the feature hiding method of the aforementioned application software is implemented. The feature hiding method of the application software is any one of the feature hiding methods of the application software mentioned in the embodiments of the present application. Relevant embodiments can be found above.
[0149] Based on the same inventive concept, the present application also provides a computer program product, including a computer program, which implements the aforementioned feature hiding method of the application software when the computer program is executed by a processor. The feature hiding method of the application software is any one of the feature hiding methods of the application software mentioned in the embodiments of the present application. Relevant embodiments can be found above.
[0150] It should be noted that the data involved in this application (including but not limited to data used for analysis, stored data, displayed data, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0151] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processors involved in each embodiment provided in this application may be general-purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, data processing logic devices based on quantum computing, etc., but are not limited thereto.
[0152] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0153] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A feature hiding method for application software, characterized in that: The method comprises: Scanning target information in at least a portion of the global code of the application software; the target information is information that the asset collection system matches to the application software through identification; For each type of the target information, merge the preset file into the file corresponding to the target information, or replace the name corresponding to the target information to obtain the conversion information of the target information; updating the conversion information to the code corresponding to the application software; wherein the conversion information is information that cannot be recognized by the asset collection system; The application software after updating the code online.
2. The feature hiding method of application software according to claim 1, characterized in that: The scanning of the target information in at least part of the global code of the application software comprises: scanning the picture information in at least part of the global code of the application software; Wherein, merging the preset file into the file corresponding to the target information to obtain the conversion information of the target information includes: Read a transparent picture as the preset file; Merging the transparent image into the image file corresponding to the image information to obtain a merged image file; The hash value of the merged picture file is used as the conversion information; wherein the hash value of the merged picture file is different from the hash value of the picture file.
3. The feature hiding method of application software according to claim 2, characterized in that: Before merging the transparent image into the image file corresponding to the image information, the method further includes: The hash value of the transparent picture is modified based on a preset tag; wherein the preset tag includes at least one tag in the image metadata of the transparent picture.
4. The feature hiding method of application software according to claim 3, characterized in that: The step of modifying the hash value of the transparent image based on the preset tag includes: Calling the API for managing image metadata; Using the application program interface for managing image metadata to read the transparent image, and obtain image metadata of the transparent image; Reading at least one tag in the image metadata as the preset tag; Randomly transform the value of the preset tag to obtain a transformation value of the preset tag; The hash value of the transparent image is modified based on the conversion value.
5. The feature hiding method of application software according to claim 4, characterized in that: The reading at least one tag in the image metadata comprises: At least one of a picture creation time tag, a picture modification time tag, a picture brightness tag, and a picture contrast tag in the image metadata is read.
6. The feature hiding method of application software according to claim 1, characterized in that: The scanning of the target information in at least part of the global code of the application software includes: scanning the file name information of a preset file and / or the attribute feature information in the file in at least part of the global code of the application software; Wherein, replacing the name corresponding to the target information to obtain the conversion information of the target information includes: The file name information is replaced by a preset string, and / or the attribute characteristic information is replaced by a preset string to obtain conversion information corresponding to the file name information and / or the attribute characteristic information in the file; wherein the preset string is a random string.
7. The feature hiding method of application software according to claim 1, characterized in that: The scanning of the target information in at least part of the global code of the application software includes: scanning the image information in the image format in at least part of the global code of the application software based on a regular matching method.
8. A feature hiding device for application software, characterized in that: The device comprises: A scanning module, used to scan target information in at least part of the global code of the application software; the target information is information that the asset collection system matches to the application software through identification; A conversion module, for merging a preset file into a file corresponding to the target information, or replacing a name corresponding to the target information, for each type of the target information, to obtain conversion information of the target information; An updating module, which updates the conversion information to the code corresponding to the application software; wherein the conversion information is information that cannot be recognized by the asset collection system; An application deployment module is used to update the application software after the code is updated online.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.