BIOS boot icon replacement method and device
By encrypting and integrity verification of the replacement BIOS boot icon, ensuring that its source is trustworthy and then replacing it, solving the security threat and stability problems of replacing the BIOS boot icon in the existing technology, and achieving a safer and more stable icon replacement process.
Patent Information
- Application Number
- CN202411119479.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2025-01-07
AI Technical Summary
In the prior art, replacing the BIOS boot icon poses a security threat, which may contain malware, and the operation is complicated, which can easily lead to the server being unable to start and affect stable operation.
By obtaining the encryption results of the icon to be replaced, using the preset encryption algorithm for encryption and integrity verification, ensuring that the icon source is trustworthy and replaced, avoiding the icon being damaged or tampered with, and improving the security and stability of the replacement.
Improves the security of BIOS boot icon replacement, simplifies the replacement process, ensures the stable operation and reliability of the server, and avoids security threats caused by malware.
Smart Images

Figure CN119271089A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to a method and device for replacing a BIOS startup icon. Background Art
[0002] The Basic Input / Output System (BIOS) is a firmware located on the server motherboard. It is the first thing loaded when the server is powered on. It is responsible for initializing hardware devices, starting the operating system, and providing some basic system management functions. The BIOS startup icon, also known as the boot screen or boot logo, is the image displayed when the server is booted. The BIOS boot icon is usually the logo or brand name of the server manufacturer, and the BIOS boot icon is embedded in the BIOS chip and is only displayed during the power-on self-test (POST). Different server manufacturers may use different BIOS boot icons, some may be simple text, and some may be complex images.
[0003] At present, many companies that own their own servers need to display their company logo when booting in order to enhance brand recognition. Or some companies need to customize servers for specific projects or customers to replace the BIOS boot icon in order to enhance the professionalism of the server and make it more in line with customer needs. In addition, when the server hardware or software is upgraded, the BIOS boot icon needs to be updated to reflect these changes. Therefore, replacing the BIOS boot icon has become a problem that needs to be overcome and solved urgently.
[0004] However, replacing the BIOS boot icon requires certain technical knowledge, and if it is not done properly, it may cause the server to fail to boot. Therefore, unless there is a clear need and sufficient technical support, it is generally not recommended to replace the server's BIOS boot icon at will; in addition, when replacing the BIOS boot icon, special attention should be paid to information security. If the BIOS boot icon is downloaded from an untrusted source, files containing malware may be downloaded, posing a security threat to the server; if the BIOS boot icon contains sensitive information (such as a company logo or other important information), and the server is accessed by unauthorized personnel, this information may be leaked. Summary of the invention
[0005] The purpose of this application is to provide a BIOS boot icon replacement method and device, which is used to solve the technical problem in the prior art that the boot icon contains malware files, which poses a security threat to the server after the icon is replaced, improve the security of icon replacement, and ensure the stable operation of the server.
[0006] The present application provides a BIOS boot icon replacement method, comprising: obtaining an encryption result of an icon to be replaced, wherein the encryption result of the icon to be replaced is obtained by encrypting the original icon based on a preset encryption algorithm; based on the encryption result of the icon to be replaced, performing an integrity check on the icon to be replaced; based on passing the integrity check, replacing the BIOS boot icon with the icon to be replaced.
[0007] Optionally, obtaining the encryption result of the icon to be replaced includes: obtaining the icon to be replaced; encrypting the icon to be replaced using a preset encryption algorithm to obtain an encrypted value; and adding the encrypted value to a preset position of the icon to be replaced to obtain an encryption result.
[0008] Optionally, based on the encryption result of the icon to be replaced, an integrity check is performed on the icon to be replaced, including: based on a preset verification algorithm, verifying the encryption result of the icon to be replaced to obtain a verification value; using the encryption result, verifying the accuracy of the verification value, and determining that the integrity verification has passed based on the accuracy verification.
[0009] Optionally, based on a preset verification algorithm, the encryption result of the icon to be replaced is verified to obtain a verification value, including: obtaining icon data according to the encryption result of the icon to be replaced; and verifying the icon data using a preset verification algorithm to obtain a verification value.
[0010] Optionally, the encryption result is used to verify the accuracy of the verification value, including: obtaining encrypted data based on the encryption result of the icon to be replaced; comparing the encrypted data with the verification value, if they are consistent, the accuracy verification is passed; otherwise, the verification fails.
[0011] Optionally, before replacing the BIOS boot icon with the icon to be replaced, the method includes: parsing the icon to be replaced to obtain icon header information based on passing the integrity check; and verifying whether the icon to be replaced has security risks based on the icon header information.
[0012] Optionally, based on the icon header information, verify whether the icon to be replaced has a security risk, including: obtaining image attributes based on the icon header information, the image attributes including at least one of image format, size, width and height; checking whether there is malicious data in the image attributes, and comparing the image attributes with the image attributes of the icon to be replaced obtained previously. If they are consistent, it is determined that there is no security risk, and the BIOS boot icon is replaced with the icon to be replaced.
[0013] The present application also provides a BIOS boot icon replacement device, including: a data acquisition module, which obtains the encryption result of the icon to be replaced, and the encryption result of the icon to be replaced is obtained by encrypting the original icon based on a preset encryption algorithm; a verification module, which performs integrity verification on the icon to be replaced based on the encryption result of the icon to be replaced; and an icon replacement module, which replaces the BIOS boot icon with the icon to be replaced based on passing the integrity verification.
[0014] The present application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of any of the above-mentioned BIOS boot icon replacement methods.
[0015] The present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-mentioned BIOS boot icon replacement methods are implemented.
[0016] The present application also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any of the above-mentioned BIOS startup icon replacement methods are implemented.
[0017] The BIOS boot icon replacement method and device provided in the present application use the encryption result of the icon to be replaced to perform integrity verification on the icon to be replaced, so as to replace the BIOS boot icon with the icon to be replaced while ensuring that the source of the icon to be replaced is credible, thereby preventing the icon to be replaced from being damaged or tampered with, improving the security of icon replacement, simplifying the icon replacement method, and ensuring the stability and reliability of server operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1 This is one of the flowcharts of the BIOS boot icon replacement method provided by this application; Figure 2 This is the second flow chart of the BIOS boot icon replacement method provided by this application; Figure 3 It is a structural schematic diagram of the BIOS boot icon replacement device provided by the present application; Figure 4 It is a structural schematic diagram of the electronic device provided by this application. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0021] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0022] The following is a detailed description of the BIOS boot icon replacement method provided by the embodiment of the present application through specific embodiments and application scenarios in conjunction with the accompanying drawings.
[0023] like Figure 1 As shown, a BIOS boot icon replacement method provided in an embodiment of the present application may include: S11, obtaining an encryption result of the icon to be replaced, where the encryption result of the icon to be replaced is obtained by encrypting the original icon based on a preset encryption algorithm; S12, performing integrity check on the icon to be replaced based on the encryption result of the icon to be replaced; S13, based on the integrity check passing, replacing the BIOS startup icon with the icon to be replaced.
[0024] It should be noted that the step numbers "S1N" in this manual do not represent the order of the BIOS boot icon replacement method. Figure 2 The present invention describes a BIOS startup icon replacement method.
[0025] Step S11, obtaining the encryption result of the icon to be replaced, where the encryption result of the icon to be replaced is obtained by encrypting the original icon based on a preset encryption algorithm.
[0026] In this embodiment, obtaining the encryption result of the icon to be replaced includes: obtaining the icon to be replaced; encrypting the icon to be replaced using a preset encryption algorithm to obtain an encrypted value; and adding the encrypted value to a preset position of the icon to be replaced to obtain an encryption result.
[0027] Furthermore, the icon to be replaced is encrypted using a preset encryption algorithm to obtain an encrypted value, including: generating an encryption key based on the preset encryption algorithm; reading the binary data of the icon to be replaced, and encrypting the read binary data using the preset encryption algorithm and the encryption key to obtain an encrypted value, and adding the encrypted value to the preset position of the icon to be replaced.
[0028] It should be noted that the preset encryption algorithm needs to use a certain and consistent encryption algorithm and key to ensure that the parameter settings in the encryption process are fixed and will not change due to different execution environments or conditions. By adding the encrypted value to the preset position of the icon to be replaced, even if the encryption or verification rules change, it can ensure that the icon to be replaced can be effectively identified and processed.
[0029] In addition, the preset encryption algorithm is used to encrypt the icon to be replaced so that its content is difficult to decipher without authorization, so as to facilitate the subsequent use of the preset verification algorithm to verify the integrity and consistency of the icon to be replaced, and to determine whether the icon to be replaced is damaged or tampered with. Therefore, the setting of the preset encryption algorithm needs to consider not destroying the icon features that the preset verification algorithm relies on during the encryption process. For example, if the preset verification algorithm relies on certain fixed bytes or data structures of the icon, these parts cannot be destroyed during the encryption process.
[0030] In addition, if the preset encryption algorithm is very powerful, but the preset verification algorithm is easily cracked, the security of the entire system will be affected. Therefore, the security strength of the preset encryption algorithm and the preset verification algorithm should match each other; if the encryption process is very time-consuming and the verification process is very fast, it may cause the system to be inefficient in some cases. Therefore, the preset encryption algorithm and the preset verification algorithm need to ensure a certain balance in performance.
[0031] It can be seen that the selection and matching of the preset encryption algorithm and the preset verification algorithm need to comprehensively consider multiple factors such as application scenarios, security requirements, performance requirements and data processing characteristics to ensure that the encryption value and the verification value can be effectively compared and ensure the security and integrity of the icon. No further limitations are made here.
[0032] It should be added that the preset position can be set according to actual design requirements, such as the tail, the middle position, the position of a specific character, etc., and no further limitation is made here.
[0033] Step S12: verifying the replacement icon based on the encryption result of the icon to be replaced.
[0034] In this embodiment, based on the encryption result of the icon to be replaced, an integrity check is performed on the icon to be replaced, including: based on a preset verification algorithm, the encryption result of the icon to be replaced is verified to obtain a verification value; using the encryption result, the verification value is verified for accuracy, and based on the accuracy verification passing, it is determined that the integrity verification has passed.
[0035] Specifically, based on a preset verification algorithm, the encryption result of the icon to be replaced is verified to obtain a verification value, including: obtaining icon data according to the encryption result of the icon to be replaced; and verifying the icon data using a preset verification algorithm to obtain a verification value.
[0036] Specifically, the icon data is obtained according to the encryption result of the icon to be replaced, including: reading the encryption result of the icon to be replaced; and separating the read encryption result of the separated icon to be replaced according to a preset format or position to obtain the icon data.
[0037] In addition, the encryption result is used to verify the accuracy of the verification value, including: obtaining encrypted data based on the encryption result of the icon to be replaced; comparing the encrypted data with the verification value, if they are consistent, the accuracy verification is passed; otherwise, the verification fails.
[0038] It is worth noting that when the icon data is obtained according to the encryption result of the icon to be replaced, the icon data and the encrypted data can be obtained by separating the encryption result of the separated icon to be replaced according to the preset format or position. In addition, the encrypted data corresponds to the encrypted value obtained during the encryption process.
[0039] Step S13, based on the integrity check passing, the BIOS startup icon is replaced with the icon to be replaced.
[0040] In an optional embodiment, before replacing the BIOS boot icon with the icon to be replaced, the following steps are included: based on passing the integrity check, parsing the icon to be replaced to obtain icon header information; and verifying whether the icon to be replaced has security risks based on the icon header information.
[0041] It should be noted that since the header information of the icon's image file format usually contains important descriptions and parameters of the icon, the header information of the icon to be replaced can be parsed and verified, thereby verifying whether the icon to be replaced contains malicious data through the parsed header information, and then determining whether the icon has security risks.
[0042] In an optional embodiment, based on the icon header information, verifying whether there is a security risk in the icon to be replaced includes: obtaining image attributes based on the icon header information, the image attributes including at least one of image format, size, width and height; checking whether there is malicious data in the image attributes, and comparing the image attributes with the image attributes of the icon to be replaced obtained previously. If they are consistent, it is determined that there is no security risk, and the BIOS boot icon is replaced with the icon to be replaced.
[0043] It should be noted that for security reasons, to prevent the icon size from exceeding the FV space size, the image attributes obtained in the icon header information are checked to see if they are consistent with the image attributes of the icon to be replaced previously obtained, so as to ensure that the icon to be replaced after the integrity check is the same size as the original icon to be replaced previously obtained.
[0044] In an optional embodiment, the BIOS boot icon replacement method provided in the embodiment of the present application is applicable to Windows operating system and free and open source Unix-like operating system (Linux) system, etc.
[0045] In an optional embodiment, replacing the BIOS boot icon in a Windows system includes: obtaining the BIOS icon and storing it in a specified location; opening the selected BIOS icon by clicking a "File Open" button to obtain the icon to be replaced; starting to encrypt the icon to be replaced using a preset encryption algorithm by clicking a "Replace Icon" button to obtain an encrypted value, and a dialog box displays "Icon encryption successful"; determining the verification value of the icon to be replaced based on a preset verification algorithm, and a dialog box displays "Start calculating verification value"; checking whether the verification value is consistent with the encryption value, and if they are consistent, the dialog box displays "Verification value and encryption value consistency check passed"; checking whether the icon has any security risks, and if there are no security risks, the dialog box displays "Icon security check passed"; starting to replace the icon, and the dialog box displays that the icon replacement is successful, and the end; if the verification value is inconsistent with the encryption value, the dialog box displays "Verification value and encryption value consistency check failed", and then the dialog box continues to display "Icon replacement failed, end".
[0046] In an optional embodiment, replacing the BIOS boot icon in a Linux system includes: obtaining the BIOS icon and storing it in a Replace icon folder under the root directory of the corresponding tool; running a tool that has been granted execution permission in advance; starting to encrypt the icon to be replaced using a preset encryption algorithm, obtaining an encrypted value, and printing "Icon data encryption successful"; determining the verification value of the icon to be replaced based on a preset verification algorithm, and printing "Start calculating verification value"; checking "whether the verification value is consistent with the encryption value", and if they are consistent, printing "Verification value and encryption value consistency check passed"; starting to check whether the icon has security risks, and if there are no security risks, printing "Icon security check passed"; starting to replace the icon, printing "Icon replacement successful, end"; if the verification value and encryption value consistency check fail, printing "Verification value and encryption value consistency check fail", and then printing "Icon replacement failed, end"; if the icon has security risks, printing "Image security check failed", S29: then printing "Icon replacement failed, end".
[0047] To sum up, the embodiment of the present invention uses the encryption result of the icon to be replaced to perform integrity verification on the icon to be replaced, so as to replace the BIOS boot icon with the icon to be replaced while ensuring that the source of the icon to be replaced is credible, thereby preventing the icon to be replaced from being damaged or tampered with, improving the security of icon replacement, simplifying the icon replacement method, and ensuring the stability and reliability of server operation.
[0048] It should be noted that the BIOS startup icon replacement method provided in the embodiment of the present application can be executed by a BIOS startup icon replacement device, or a control module in the BIOS startup icon replacement device for executing the BIOS startup icon replacement method. In the embodiment of the present application, the BIOS startup icon replacement device executing the BIOS startup icon replacement method is taken as an example to illustrate the BIOS startup icon replacement device provided in the embodiment of the present application.
[0049] In addition, in the embodiments of the present application, the BIOS boot icon replacement methods shown in the above-mentioned method drawings are all illustrated by combining one of the drawings in the embodiments of the present application as an example. In specific implementation, the BIOS boot icon replacement methods shown in the above-mentioned method drawings can also be implemented in combination with any other drawings that can be combined as shown in the above-mentioned embodiments, which will not be repeated here.
[0050] The BIOS boot icon replacement device provided in the present application is described below, and the BIOS boot icon replacement method described below and described above can be referenced to each other.
[0051] Figure 3 A schematic diagram of the structure of the BIOS boot icon replacement device provided in an embodiment of the present application, such as Figure 4 As shown, specifically including: The data acquisition module 31 acquires the encryption result of the icon to be replaced, where the encryption result of the icon to be replaced is obtained by encrypting the original icon based on a preset encryption algorithm; A verification module 32, which performs integrity verification on the icon to be replaced based on the encryption result of the icon to be replaced; The icon replacement module 33 replaces the BIOS startup icon with the icon to be replaced based on the integrity check passing.
[0052] In this embodiment, the data acquisition module 31 includes: an icon acquisition unit, which acquires the icon to be replaced; an encryption unit, which uses a preset encryption algorithm to encrypt the icon to be replaced to obtain an encrypted value; and an interpolation unit, which adds the encrypted value to the preset position of the icon to be replaced to obtain an encryption result.
[0053] Furthermore, the encryption unit includes: a key generation subunit, which generates an encryption key based on a preset encryption algorithm; an encryption subunit, which reads the binary data of the icon to be replaced, and encrypts the read binary data using a preset encryption algorithm and the encryption key to obtain an encrypted value, so that the encrypted value can be added to the preset position of the icon to be replaced using a difference unit.
[0054] It should be noted that the preset encryption algorithm needs to use a certain and consistent encryption algorithm and key to ensure that the parameter settings in the encryption process are fixed and will not change due to different execution environments or conditions. By adding the encrypted value to the preset position of the icon to be replaced, even if the encryption or verification rules change, it can ensure that the icon to be replaced can be effectively identified and processed.
[0055] In addition, the preset encryption algorithm is used to encrypt the icon to be replaced so that its content is difficult to decipher without authorization, so as to facilitate the subsequent use of the preset verification algorithm to verify the integrity and consistency of the icon to be replaced, and to determine whether the icon to be replaced is damaged or tampered with. Therefore, the setting of the preset encryption algorithm needs to consider not destroying the icon features that the preset verification algorithm relies on during the encryption process. For example, if the preset verification algorithm relies on certain fixed bytes or data structures of the icon, these parts cannot be destroyed during the encryption process.
[0056] In addition, if the preset encryption algorithm is very powerful, but the preset verification algorithm is easily cracked, the security of the entire system will be affected. Therefore, the security strength of the preset encryption algorithm and the preset verification algorithm should match each other; if the encryption process is very time-consuming and the verification process is very fast, it may cause the system to be inefficient in some cases. Therefore, the preset encryption algorithm and the preset verification algorithm need to ensure a certain balance in performance.
[0057] It can be seen that the selection and matching of the preset encryption algorithm and the preset verification algorithm need to comprehensively consider multiple factors such as application scenarios, security requirements, performance requirements and data processing characteristics to ensure that the encryption value and the verification value can be effectively compared and ensure the security and integrity of the icon. No further limitations are made here.
[0058] It should be added that the preset position can be set according to actual design requirements, such as the tail, the middle position, the position of a specific character, etc., and no further limitation is made here.
[0059] The verification module 32 includes: a first verification unit, which verifies the encryption result of the icon to be replaced based on a preset verification algorithm to obtain a verification value; a second verification unit, which uses the encryption result to verify the accuracy of the verification value, and determines that the integrity verification has passed based on the accuracy verification.
[0060] Specifically, the first verification unit includes: a data acquisition subunit, which obtains icon data according to the encryption result of the icon to be replaced; and a verification subunit, which verifies the icon data using a preset verification algorithm to obtain a verification value.
[0061] Furthermore, the data acquisition subunit includes: a data reading subunit, which reads the encryption result of the icon to be replaced; and a data separation subunit, which separates the encryption result of the separated icon to be replaced according to a preset format or position to obtain icon data.
[0062] In addition, the second verification unit includes: using a data acquisition subunit to obtain encrypted data according to the encryption result of the icon to be replaced; a comparison subunit to compare the encrypted data with the verification value, if they are consistent, the accurate verification is passed; otherwise, the verification fails.
[0063] It is worth noting that when the icon data is obtained according to the encryption result of the icon to be replaced, the icon data and the encrypted data can be obtained by separating the encryption result of the separated icon to be replaced according to the preset format or position. In addition, the encrypted data corresponds to the encrypted value obtained during the encryption process.
[0064] In an optional embodiment, the device also includes: an icon parsing module, which, before replacing the BIOS boot icon with the icon to be replaced, parses the icon to be replaced based on the integrity check to obtain icon header information; and a hidden danger confirmation module, which verifies whether the icon to be replaced has security risks based on the icon header information.
[0065] It should be noted that since the header information of the icon's image file format usually contains important descriptions and parameters of the icon, the header information of the icon to be replaced can be parsed and verified, thereby verifying whether the icon to be replaced contains malicious data through the parsed header information, and then determining whether the icon has security risks.
[0066] In an optional embodiment, the hidden danger confirmation module includes: an attribute acquisition unit, which obtains image attributes based on icon header information, and the image attributes include at least one of image format, size, width and height; a malicious data inspection unit, which checks whether there is malicious data in the image attributes; an attribute comparison unit, which compares the image attributes with the image attributes of the icon to be replaced obtained previously. If they are consistent, it is determined that there is no security risk, and the BIOS boot icon is replaced with the icon to be replaced through the icon replacement module 33.
[0067] It should be noted that for security reasons, to prevent the icon size from exceeding the FV space size, the image attributes obtained in the icon header information are checked to see if they are consistent with the image attributes of the icon to be replaced previously obtained, so as to ensure that the icon to be replaced after the integrity check is the same size as the original icon to be replaced previously obtained.
[0068] In an optional embodiment, the BIOS boot icon replacement device provided in the embodiment of the present application is suitable for replacing the BIOS boot icon in a Windows operating system and a free and open source Unix-like operating system (Linux) system.
[0069] In an optional embodiment, the device replaces the BIOS boot icon in the Windows system, specifically as follows: obtain the BIOS icon and store it to a specified location; open the selected BIOS icon by clicking the "File Open" button to obtain the icon to be replaced; start to encrypt the icon to be replaced using a preset encryption algorithm by clicking the "Replace Icon" button to obtain an encrypted value, and a dialog box displays "Icon encryption successful"; based on a preset verification algorithm, determine the verification value of the icon to be replaced, and a dialog box displays "Start calculating verification value"; check whether the verification value is consistent with the encryption value, and if they are consistent, the dialog box displays "Verification value and encryption value consistency check passed"; check whether the icon has any security risks, and if there are no security risks, the dialog box displays "Icon security check passed"; start replacing the icon, and the dialog box displays that the icon replacement is successful, and the end; if the verification value is inconsistent with the encryption value, the dialog box displays "Verification value and encryption value consistency check failed", and then the dialog box continues to display "Icon replacement failed, end".
[0070] In an optional embodiment, the device replaces the BIOS boot icon in the Linux system, specifically as follows: obtain the BIOS icon and store it in the Replace icon folder under the root directory of the corresponding tool; run the tool that has been granted execution permission in advance; start to use a preset encryption algorithm to encrypt the icon to be replaced, obtain the encrypted value, and print "Icon data encryption successful"; based on the preset verification algorithm, determine the verification value of the icon to be replaced, and print "Start calculating the verification value"; check "whether the verification value is consistent with the encryption value", and if they are consistent, print "Verification value and encryption value consistency check passed"; start to check whether the icon has security risks, and if there are no security risks, print "Icon security check passed"; start to replace the icon, print "Icon replacement successful, end"; if the verification value and encryption value consistency check fail, print "Verification value and encryption value consistency check failed", and then print "Replacement of icon failed, end"; if the icon has security risks, print "Image security check failed", S29: then print "Replacement of icon failed, end".
[0071] To sum up, the embodiment of the present invention uses the encryption result of the icon to be replaced obtained by the data acquisition module through the verification module to perform integrity verification on the icon to be replaced, so that the icon replacement module uses the icon to be replaced to replace the BIOS boot icon while ensuring that the source of the icon to be replaced is credible, thereby avoiding the icon to be replaced from being damaged or tampered with, improving the security of icon replacement, simplifying the icon replacement method, and ensuring the stability and reliability of server operation.
[0072] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the BIOS startup icon replacement method, the method comprising: obtaining the encryption result of the icon to be replaced, the encryption result of the icon to be replaced is obtained by encrypting the original icon based on a preset encryption algorithm; based on the encryption result of the icon to be replaced, performing integrity check on the icon to be replaced; based on passing the integrity check, replacing the BIOS startup icon with the icon to be replaced.
[0073] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0074] On the other hand, the present application also provides a computer program product, which includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the BIOS boot icon replacement method provided by the above methods, and the method includes: obtaining an encryption result of the icon to be replaced, and the encryption result of the icon to be replaced is obtained by encrypting the original icon based on a preset encryption algorithm; based on the encryption result of the icon to be replaced, performing an integrity check on the icon to be replaced; based on passing the integrity check, replacing the BIOS boot icon with the icon to be replaced.
[0075] On the other hand, the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the above-mentioned BIOS boot icon replacement methods, the methods comprising: obtaining an encryption result of the icon to be replaced, the encryption result of the icon to be replaced being obtained by encrypting the original icon based on a preset encryption algorithm; based on the encryption result of the icon to be replaced, performing an integrity check on the icon to be replaced; based on passing the integrity check, replacing the BIOS boot icon with the icon to be replaced.
[0076] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0077] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0078] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for replacing a BIOS startup icon, characterized in that: include: Obtaining an encryption result of the icon to be replaced, where the encryption result of the icon to be replaced is obtained by encrypting the original icon based on a preset encryption algorithm; Based on the encryption result of the icon to be replaced, performing integrity check on the icon to be replaced; Based on the integrity check passing, the BIOS startup icon is replaced with the icon to be replaced.
2. The method according to claim 1, characterized in that The step of obtaining the encryption result of the icon to be replaced includes: Get the icon to be replaced; Using a preset encryption algorithm, encrypting the icon to be replaced to obtain an encrypted value; The encrypted value is added to the preset position of the icon to be replaced to obtain an encrypted result.
3. The method according to claim 1, characterized in that Based on the encryption result of the icon to be replaced, performing integrity check on the icon to be replaced, including: Based on a preset verification algorithm, verify the encryption result of the icon to be replaced to obtain a verification value; The encryption result is used to verify the accuracy of the verification value, and based on the accuracy verification passing, it is determined that the integrity verification has passed.
4. The method according to claim 3, characterized in that Based on a preset verification algorithm, the encryption result of the icon to be replaced is verified to obtain a verification value, including: Obtaining icon data according to the encryption result of the icon to be replaced; The icon data is verified using a preset verification algorithm to obtain a verification value.
5. The method according to claim 3, characterized in that: Using the encryption result, the accuracy of the check value is checked, including: Obtaining encrypted data according to the encryption result of the icon to be replaced; The encrypted data is compared with the verification value. If they are consistent, the verification passes the accurate verification; otherwise, the verification fails.
6. The method according to claim 1, characterized in that Before replacing the BIOS startup icon with the icon to be replaced, the method includes: Based on the integrity check being passed, the icon to be replaced is parsed to obtain icon header information; According to the icon header information, it is verified whether the icon to be replaced has a security risk.
7. The method according to claim 6, characterized in that Verifying whether the icon to be replaced has a security risk according to the icon header information includes: Obtaining picture attributes according to the icon header information, wherein the picture attributes include at least one of picture format, size, width and height; Check whether there is malicious data in the image attributes, and compare the image attributes with the image attributes of the icon to be replaced obtained previously. If they are consistent, it is determined that there is no security risk, and the BIOS boot icon is replaced with the icon to be replaced.
8. A BIOS boot icon replacement device, characterized in that: The device comprises: A data acquisition module, which acquires an encryption result of the icon to be replaced, wherein the encryption result of the icon to be replaced is obtained by encrypting the original icon based on a preset encryption algorithm; A verification module, performing integrity verification on the icon to be replaced based on the encryption result of the icon to be replaced; The icon replacement module replaces the BIOS startup icon with the icon to be replaced based on the integrity check passing.
9. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the BIOS startup icon replacement method as claimed in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the steps of the BIOS startup icon replacement method as described in any one of claims 1 to 7 are implemented.