BMC management method and system integrating dynamic verification and firmware self-healing mechanism
By integrating dynamic verification and firmware self-healing mechanisms in the BMC management system, using hash algorithm to detect firmware exceptions and perform self-healing operations, the problem of poor security protection in the existing technology is solved, and more efficient firmware security management is achieved.
Patent Information
- Application Number
- CN202411896999.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-12-23
AI Technical Summary
The existing firmware protection scheme only performs static verification, and has poor security protection effect, so it is unable to effectively deal with potential exceptions and attacks of the firmware during operation.
BMC management methods that integrate dynamic verification and firmware self-healing mechanisms are adopted to dynamically verify the firmware through a hash algorithm to detect whether there is an exception in the initial firmware, and perform self-healing operations when an exception is found.
It realizes more secure and dynamic verification of the firmware, improves the security protection effect of the firmware, can promptly detect and repair abnormalities, and improves the stability and security of the system.
Smart Images

Figure CN119357980B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of firmware management, and in particular to a BMC management method and system integrating dynamic verification and firmware self-healing mechanism. Background Art
[0002] A server is a device that provides computing services. It mainly includes hardware devices such as a central processing unit (CPU), storage devices, memory, and I / O (Input / Output) devices. Firmware is a software program stored in an EEPROM (Electrically Erasable Programmable ROM) or FLASH chip in a server. Firmware is generally used as a basic underlying software program or business software program for a hardware system.
[0003] With the increase of network security risks, network attacks on firmware have become one of the major hidden dangers threatening server system security. The existing firmware protection scheme only performs static verification of firmware, which has poor security protection effect. Summary of the invention
[0004] The main purpose of the present invention is to provide a BMC management method and system integrating dynamic verification and firmware self-healing mechanism, aiming to solve the problem that the existing firmware protection scheme only performs static verification on the firmware and has poor security protection effect.
[0005] The technical solution proposed by the present invention is:
[0006] A BMC management method integrating dynamic verification and firmware self-healing mechanism is applied to a BMC management system integrating dynamic verification and firmware self-healing mechanism; the system comprises a server and a BMC chip; the server comprises a processor and a storage module communicatively connected to the processor; the BMC chip is communicatively connected to the processor; the BMC chip comprises a firmware management module; the storage module is used to store firmware; the method comprises:
[0007] When the server is started and a new or updated firmware is obtained, the processor marks the new or updated firmware as the initial firmware;
[0008] The processor divides the initial firmware according to a preset method to obtain a plurality of first sub-firmwares, wherein each first sub-firmware is provided with a unique serial number according to the sequence of the program code;
[0009] The firmware management module performs hash calculation on each first sub-firmware based on a hash algorithm to obtain a corresponding hash value, which is used as an initial hash value of the first sub-firmware;
[0010] At each verification interval, the processor divides the initial firmware according to a preset method to obtain a plurality of second sub-firmwares, wherein the number of the second sub-firmwares is the same as the number of the first sub-firmwares;
[0011] The firmware management module randomly selects a preset number of second sub-firmwares and marks them as sub-firmwares to be verified, wherein the preset number is less than or equal to the total number of second sub-firmwares;
[0012] The firmware management module performs hash calculation on the sub-firmware to be verified based on the hash algorithm to obtain a corresponding hash value, which is used as the verification hash value of the sub-firmware to be verified;
[0013] The firmware management module determines whether an abnormality occurs in the initial firmware based on the verification hash value of the sub-firmware to be verified and the initial hash value of the first sub-firmware, and performs a self-healing operation on the initial firmware that has an abnormality.
[0014] Preferably, the firmware management module determines whether the initial firmware is abnormal based on the verification hash value of the sub-firmware to be verified and the initial hash value of the first sub-firmware, and performs a self-healing operation on the initial firmware that is abnormal, including:
[0015] The firmware management module determines whether the verification hash value of the sub-firmware to be verified is consistent with the initial hash value of the first sub-firmware with the same serial number;
[0016] If they are inconsistent, the firmware management module determines that the initial firmware is abnormal, and determines the initial firmware as abnormal firmware;
[0017] The firmware management module performs self-healing operations on abnormal firmware;
[0018] When the server is started and the newly added or updated firmware is obtained, the processor marks the newly added or updated firmware as the initial firmware, and then further includes:
[0019] If the initial firmware is an updated firmware, the processor replaces the corresponding original firmware with the initial firmware;
[0020] If the initial firmware is a newly added firmware, the processor stores the initial firmware and the corresponding first sub-firmware into the backup space of the storage module, and uses the time when the initial firmware is added as the corresponding backup time;
[0021] If the initial firmware is an updated firmware, the processor stores the initial firmware and the corresponding first sub-firmware into the backup space of the storage module, and uses the update time of the initial firmware as the corresponding backup time;
[0022] At each verification interval, the processor divides the initial firmware according to a preset method to obtain a plurality of second sub-firmwares, and the method also includes:
[0023] The firmware management module determines the verification interval duration corresponding to the initial firmware.
[0024] Preferably, the firmware management module determines the verification interval duration corresponding to the initial firmware, including:
[0025] The firmware management module obtains the number of times the initial firmware has been run since it was generated;
[0026] The firmware management module obtains the number of times the initial firmware has been abnormal since it was generated;
[0027] The firmware management module generates the corresponding verification interval duration based on the number of times the initial firmware has been run and the number of exceptions since it was generated:
[0028] ,
[0029] In the formula, The verification interval duration corresponding to the initial firmware; The number of times the initial firmware has been run since it was generated; The maximum number of times all existing firmware in the server have been run. The number of exceptions that have occurred since the initial firmware was generated; is the average number of abnormalities of all existing firmware in the server. T B This is the standard verification time.
[0030] Preferably, the processor divides the initial firmware in a preset manner to obtain a plurality of first sub-firmwares, including:
[0031] The firmware management module determines the standard data size and determines whether the data size of the initial firmware is larger than the standard data size;
[0032] If so, the firmware management module divides the initial firmware into a plurality of first sub-firmwares based on the data size of the initial firmware, wherein the calculation formula for the number of first sub-firmwares divided into the initial firmware is:
[0033] ,
[0034] In the formula, The number of first sub-firmware divided into the initial firmware; is the data size of the initial firmware; is the standard data size; among the first sub-firmwares divided from the initial firmware, the data size of the last first sub-firmware is , the data size of the remaining first sub-firmware is the standard data size ;
[0035] If not, the firmware management module directly uses the initial firmware as the corresponding first sub-firmware.
[0036] Preferably, the server further includes a network interface; the external remote terminal can establish a communication connection with the server through the network interface; the firmware management module randomly selects a preset number of second sub-firmwares and marks them as sub-firmwares to be verified, including:
[0037] The firmware management module obtains the IP address of the external remote terminal that has performed network communication with the server within a first preset time period in the past, and marks it as a historical access IP address;
[0038] The firmware management module obtains the IP address whitelist;
[0039] The firmware management module marks the IP addresses in the IP address whitelist among the historical access IP addresses as safe addresses, and marks the remaining IP addresses as risky addresses;
[0040] The firmware management module calculates a preset number corresponding to the initial firmware based on the security address and the risk address.
[0041] Preferably, the firmware management module calculates the preset number corresponding to the initial firmware based on the safe address and the risky address using the following calculation formula:
[0042] ,
[0043] In the formula, The preset number corresponding to the initial firmware; is the total number of first sub-firmware corresponding to the initial firmware; is the number of risky addresses; is the number of secure addresses.
[0044] Preferably, the firmware management module performs a self-healing operation on the abnormal firmware, including:
[0045] The firmware management module marks the sub-firmware to be verified whose verification hash value is inconsistent with the initial hash value of the first sub-firmware with the same serial number as abnormal sub-firmware;
[0046] The firmware management module obtains a ratio of the total number of abnormal sub-firmware to the sub-firmware to be verified, and marks it as an abnormal ratio;
[0047] If the abnormality ratio is greater than or equal to the first preset value, the firmware management module sets the abnormality level of the abnormal firmware to a high level and deletes the abnormal sub-firmware in the abnormal firmware;
[0048] If the abnormal ratio is less than a first preset value and greater than or equal to a second preset value, the firmware management module sets the abnormal level of the abnormal firmware to a medium level and deletes the abnormal sub-firmware in the abnormal firmware, wherein the second preset value is less than the first preset value;
[0049] If the abnormality ratio is less than the second preset value, the firmware management module sets the abnormality level of the abnormal firmware to a low level, and deletes the abnormal sub-firmware in the abnormal firmware.
[0050] Preferably, the firmware management module marks the sub-firmware to be verified whose verification hash value is inconsistent with the initial hash value of the first sub-firmware with the same serial number as abnormal sub-firmware, and then further includes:
[0051] The firmware management module determines whether there are multiple initial firmwares corresponding to the abnormal firmware in the backup space of the storage module;
[0052] If so, the firmware management module marks the initial firmware in the backup space of the storage module that corresponds to the abnormal firmware and is the latest at the backup time as the first target firmware;
[0053] The firmware management module marks the first sub-firmware in the first sub-firmware of the first target firmware that has the same sequence number as the abnormal sub-firmware as a backup sub-firmware;
[0054] The firmware management module replaces the abnormal sub-firmware in the abnormal firmware with the backup sub-firmware with the same serial number to obtain the restored firmware;
[0055] The BMC chip controls the server to restart, runs the recovery firmware after the restart, and monitors the running status of the recovery firmware to determine whether the recovery firmware crashes abnormally or has a memory error within a second preset time after the server restarts;
[0056] If yes, the firmware management module marks the current first target firmware as the second target firmware, removes the first target firmware mark of the second target firmware, randomly selects an initial firmware corresponding to the abnormal firmware and with the latest backup time and not marked as the second target firmware in the backup space of the storage module, and marks it as the first target firmware;
[0057] Executing the firmware management module to mark the first sub-firmware in the first sub-firmware of the first target firmware that is consistent with the abnormal sub-firmware serial number as a backup sub-firmware;
[0058] If not, the firmware management module determines that the abnormal firmware self-healing is complete.
[0059] Preferably, the system further comprises a display screen and a mobile terminal that are communicatively connected to the BMC chip; the firmware management module marks the sub-firmware to be verified whose verification hash value is inconsistent with the initial hash value of the first sub-firmware with the same serial number as an abnormal sub-firmware, and then further comprises:
[0060] The firmware management module generates warning information, wherein the warning information includes the firmware name of the abnormal firmware, the version update date, the verification hash value of each abnormal sub-firmware and the current time;
[0061] The firmware management module sends the warning information to the display screen for display;
[0062] The firmware management module sends the warning information to the mobile terminal;
[0063] The processor records the current running status parameters of the abnormal firmware to generate an abnormal log, and prohibits external remote devices from calling the abnormal firmware, wherein the running status parameters include warning information, and the file name and file location of the file currently accessed by the abnormal firmware.
[0064] The present invention also proposes a BMC management system integrating dynamic verification and firmware self-healing mechanism, and applies a BMC management method integrating dynamic verification and firmware self-healing mechanism; the system includes a server and a BMC chip; the server includes a processor, and a storage module communicatively connected to the processor; the BMC chip is communicatively connected to the processor; the BMC chip includes a firmware management module; and the storage module is used to store firmware.
[0065] Through the above technical solution, the following beneficial effects can be achieved:
[0066] The BMC management method integrating dynamic verification and firmware self-healing mechanism proposed in the present invention can verify the firmware more safely and dynamically, thereby improving the security protection effect of the firmware; when used specifically, the newly added or updated initial firmware is first divided to obtain multiple first sub-firmwares, and the initial hash value of each first sub-firmware is obtained by a hash algorithm; then the initial firmware is divided again at each verification interval to obtain multiple second sub-firmwares, and a first preset number of second sub-firmwares are selected as verification sub-firmwares, and the verification sub-firmware is hashed by a hash algorithm to obtain a corresponding verification hash value, and by comparing the verification hash value with the initial hash value, it can be known whether the initial firmware has an abnormality (for example, it has been tampered with), and if an abnormality occurs, a self-healing operation is performed on the abnormal initial firmware, thereby improving the security protection effect of the firmware. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0068] Figure 1 This is a flowchart of a first embodiment of a BMC management method integrating dynamic verification and firmware self-healing mechanism proposed by the present invention. DETAILED DESCRIPTION
[0069] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0070] The present invention provides a BMC management method and system integrating dynamic verification and firmware self-healing mechanism.
[0071] As attached Figure 1 As shown, in a first embodiment of a BMC management method integrating dynamic verification and firmware self-healing mechanism proposed by the present invention, the method is applied to a BMC management system integrating dynamic verification and firmware self-healing mechanism; the system includes a server and a BMC chip; the server includes a processor, and a storage module communicatively connected to the processor; a BMC (Baseboard Management Controller) chip is communicatively connected to the processor; the BMC chip includes a firmware management module; the storage module is used to store firmware (the firmware here can be a startup program firmware for starting the server, or a service program firmware of the server during operation); this embodiment includes the following steps:
[0072] Step S110: When the server is started and acquires the newly added or updated firmware, the processor marks the newly added or updated firmware as the initial firmware.
[0073] Step S120: The processor divides the initial firmware according to a preset method to obtain a plurality of first sub-firmwares, wherein each first sub-firmware is provided with a unique serial number according to the sequence of the program code.
[0074] Specifically, the starting sequence number of the first sub-firmware is 1, and the increment of adjacent sequence numbers is 1.
[0075] Step S130: The firmware management module performs hash calculation on each first sub-firmware based on a hash algorithm to obtain a corresponding hash value, which is used as an initial hash value of the first sub-firmware.
[0076] Specifically, the hash algorithm here uses the SHA-256 algorithm, which has higher security.
[0077] Step S140: At each verification interval (eg, 24 hours), the processor divides the initial firmware in a preset manner to obtain a plurality of second sub-firmwares, wherein the number of the second sub-firmwares is the same as the number of the first sub-firmwares.
[0078] Specifically, the processor divides the initial firmware again according to a preset manner to obtain second sub-firmware, and the number of the second sub-firmware is consistent with the number of the first sub-firmware.
[0079] Step S150: The firmware management module randomly selects a preset number of second sub-firmwares and marks them as sub-firmwares to be verified, wherein the preset number is less than or equal to the total number of second sub-firmwares.
[0080] Specifically, the preset number here is dynamically changeable, so different preset numbers are set based on different server operating states to achieve dynamic verification; when the overall security environment of the server is better, a larger preset number can be set to improve the security verification effect; when the overall security environment of the server is poor, a smaller preset number can be set to save computing resources.
[0081] Step S160: The firmware management module performs hash calculation on the sub-firmware to be verified based on a hash algorithm to obtain a corresponding hash value, which serves as the verification hash value of the sub-firmware to be verified.
[0082] Step S170: the firmware management module determines whether the initial firmware is abnormal based on the verification hash value of the sub-firmware to be verified and the initial hash value of the first sub-firmware, and performs a self-healing operation on the initial firmware that is abnormal.
[0083] The BMC management method integrating dynamic verification and firmware self-healing mechanism proposed in the present invention can verify the firmware more safely and dynamically, thereby improving the security protection effect of the firmware; when used specifically, the newly added or updated initial firmware is first divided to obtain multiple first sub-firmwares, and the initial hash value of each first sub-firmware is obtained by a hash algorithm; then the initial firmware is divided again at each verification interval to obtain multiple second sub-firmwares, and a first preset number of second sub-firmwares are selected as verification sub-firmwares, and the verification sub-firmware is hashed by a hash algorithm to obtain a corresponding verification hash value, and by comparing the verification hash value with the initial hash value, it can be known whether the initial firmware has an abnormality (for example, it has been tampered with), and if an abnormality occurs, a self-healing operation is performed on the abnormal initial firmware, thereby improving the security protection effect of the firmware.
[0084] In a second embodiment of a BMC management method integrating dynamic verification and firmware self-healing mechanism proposed by the present invention, based on the first embodiment, step S170 includes the following steps:
[0085] Step S210: The firmware management module determines whether the verification hash value of the sub-firmware to be verified is consistent with the initial hash value of the first sub-firmware with the same serial number.
[0086] Specifically, under normal circumstances, the verification hash value of the sub-firmware to be verified with the same serial number and the initial hash value of the first sub-firmware should be consistent. If they are inconsistent, it means that the initial firmware has been tampered with during the operation of the server, so the initial firmware is determined to be abnormal firmware.
[0087] Step S220: If they are inconsistent, the firmware management module determines that the initial firmware is abnormal, and determines the initial firmware as abnormal firmware.
[0088] Step S230: The firmware management module performs a self-healing operation on the abnormal firmware.
[0089] Step S110 further includes the following steps:
[0090] Step S240: If the initial firmware is an updated firmware, the processor replaces the corresponding original firmware with the initial firmware.
[0091] Step S250: If the initial firmware is a newly added firmware, the processor stores the initial firmware and the corresponding first sub-firmware into the backup space of the storage module, and uses the time when the initial firmware is added as the corresponding backup time.
[0092] Step S260: If the initial firmware is an updated firmware, the processor stores the initial firmware and the corresponding first sub-firmware into the backup space of the storage module, and uses the update time of the initial firmware as the corresponding backup time.
[0093] Specifically, through the above steps, the initial firmware can be stored in the backup space of the storage module for backup, so as to facilitate restoration of the initial firmware in subsequent self-healing operations.
[0094] Step S1407, before that, also includes the following steps:
[0095] Step S270: The firmware management module determines the verification interval duration corresponding to the initial firmware.
[0096] Specifically, different initial firmwares correspond to different verification intervals, thereby achieving dynamic verification.
[0097] In a third embodiment of a BMC management method integrating dynamic verification and firmware self-healing mechanism proposed by the present invention, based on the second embodiment, step S270 includes the following steps:
[0098] Step S310: The firmware management module obtains the number of times the initial firmware has been run since it was generated.
[0099] Step S320: The firmware management module obtains the number of times the initial firmware has been abnormal since it was generated.
[0100] Step S330: The firmware management module generates a corresponding verification interval duration based on the number of times the initial firmware has been run and the number of times an exception has occurred since it was generated:
[0101] ,
[0102] In the formula, The verification interval duration corresponding to the initial firmware; The number of times the initial firmware has been run since it was generated; The maximum number of times all existing firmware in the server have been run. The number of exceptions that have occurred since the initial firmware was generated; The average number of abnormalities of all existing firmware in the server; T B The standard verification time, for example 12 hours.
[0103] Specifically, this embodiment provides a specific formula for calculating the verification interval duration corresponding to the initial firmware. The more times the initial firmware has been run since it was generated, the more important the initial firmware is, and hash verification needs to be performed more frequently; the more times the initial firmware has anomalies since it was generated, the higher the probability that the initial firmware is attacked, and hash verification needs to be performed more frequently.
[0104] In a fourth embodiment of a BMC management method integrating dynamic verification and firmware self-healing mechanism proposed by the present invention, step S120 includes the following steps:
[0105] Step S410: The firmware management module determines the standard data size, and determines whether the data size of the initial firmware is larger than the standard data size.
[0106] Specifically, the standard data size here is the size of a single first sub-firmware.
[0107] If yes, step S420 is executed: the firmware management module divides the initial firmware into a plurality of first sub-firmwares based on the data size of the initial firmware, wherein the calculation formula for the number of first sub-firmwares divided into the initial firmware is:
[0108] ,
[0109] In the formula, The number of first sub-firmware divided into the initial firmware; is the data size of the initial firmware; is the standard data size; among the first sub-firmwares divided from the initial firmware, the data size of the last first sub-firmware is , the data size of the remaining first sub-firmware is the standard data size .
[0110] If not, executing step S430: the firmware management module directly uses the initial firmware as the corresponding first sub-firmware.
[0111] Specifically, this embodiment determines a technical solution for dividing the initial firmware to obtain a plurality of first sub-firmwares; the subsequent division of the initial firmware again to obtain a plurality of second sub-firmwares also adopts this solution.
[0112] In a fifth embodiment of a BMC management method integrating dynamic verification and firmware self-healing mechanism proposed by the present invention, based on the fourth embodiment, the server further includes a network interface; the external remote terminal can establish a communication connection with the server through the network interface; step S150 includes the following steps:
[0113] Step S510: The firmware management module obtains the IP addresses of the external remote terminals that have performed network communications with the server within a first preset period of time (eg, 1 week) in the past, and marks them as historical access IP addresses.
[0114] Step S520: The firmware management module obtains an IP address whitelist.
[0115] Step S530: The firmware management module marks the IP addresses in the historical access IP addresses that fall into the IP address whitelist as safe addresses, and marks the remaining IP addresses as risky addresses.
[0116] Step S540: The firmware management module calculates a preset number corresponding to the initial firmware based on the safe address and the risky address.
[0117] Specifically, the purpose of this embodiment is to provide a technical solution on how to determine the preset number based on the secure address and the risky address; the more secure addresses there are, the more secure the network environment in which the server is located, and a smaller preset number can be set accordingly to reduce the number of second sub-firmware for security verification, thereby saving computing resources; the more risky addresses there are, the more insecure the network environment in which the server is located, and a larger preset number can be set accordingly to ensure the security of the firmware.
[0118] In a sixth embodiment of a BMC management method integrating dynamic verification and firmware self-healing mechanism proposed by the present invention, based on the fifth embodiment, the firmware management module calculates the preset number corresponding to the initial firmware based on the security address and the risk address as follows:
[0119] ,
[0120] In the formula, The preset number corresponding to the initial firmware; is the total number of first sub-firmware corresponding to the initial firmware; is the number of risky addresses; is the number of secure addresses.
[0121] Specifically, this embodiment provides a specific calculation formula for calculating the preset number corresponding to the initial firmware based on the safe address and the risky address.
[0122] In a seventh embodiment of a BMC management method integrating dynamic verification and firmware self-healing mechanism proposed by the present invention, based on the second embodiment, step S230 includes the following steps:
[0123] Step S710: The firmware management module marks the sub-firmware to be verified whose verification hash value is inconsistent with the initial hash value of the first sub-firmware with the same serial number as abnormal sub-firmware.
[0124] Specifically, the abnormal sub-firmware here is the tampered second sub-firmware.
[0125] Step S720: The firmware management module obtains the ratio of the total number of abnormal sub-firmware to the sub-firmware to be verified, and marks it as an abnormal ratio.
[0126] Specifically, the higher the abnormality ratio is, the higher the number of abnormal second sub-firmwares is, and the greater the corresponding security risk is.
[0127] Step S730: If the abnormality ratio is greater than or equal to a first preset value (eg, 0.8), the firmware management module sets the abnormality level of the abnormal firmware to a high level, and deletes the abnormal sub-firmware in the abnormal firmware.
[0128] Specifically, if the abnormality ratio is greater than or equal to the first preset value, it means that most of the second sub-firmware of the abnormal firmware are abnormal, and the abnormal level of the abnormal firmware needs to be set to a high level, and then the abnormal sub-firmware in the abnormal firmware is deleted to prevent the abnormal firmware from damaging the server resources.
[0129] Step S740: If the abnormality ratio is less than the first preset value and greater than or equal to the second preset value (for example, 0.1), the firmware management module sets the abnormality level of the abnormal firmware to the medium level and deletes the abnormal sub-firmware in the abnormal firmware, wherein the second preset value is less than the first preset value.
[0130] Specifically, if the abnormal ratio is less than the first preset value and greater than or equal to the second preset value, it means that most of the second sub-firmware of the abnormal firmware are abnormal; the abnormal level of the abnormal firmware is set to the medium level, and then the abnormal sub-firmware in the abnormal firmware is deleted.
[0131] Step S750: If the abnormality ratio is less than the second preset value, the firmware management module sets the abnormality level of the abnormal firmware to a low level, and deletes the abnormal sub-firmware in the abnormal firmware.
[0132] Specifically, if the abnormal ratio is less than the second preset value, it means that a small part of the second sub-firmware of the abnormal firmware has all become abnormal and needs to be processed at a low level; the abnormal level of the abnormal firmware is set to a low level, and then the abnormal sub-firmware in the abnormal firmware is deleted.
[0133] In an eighth embodiment of a BMC management method integrating dynamic verification and firmware self-healing mechanism proposed by the present invention, based on the seventh embodiment, step S710 further includes the following steps:
[0134] Step S810: The firmware management module determines whether there are multiple initial firmware corresponding to the abnormal firmware in the backup space of the storage module.
[0135] Specifically, since the firmware may be updated multiple times during use, the same initial firmware (abnormal firmware in this embodiment) in use may have multiple corresponding initial firmwares stored in the backup space, and the backup times of the corresponding different initial firmwares stored in the backup space are different.
[0136] If so, step S820 is executed: the firmware management module marks the initial firmware in the backup space of the storage module that corresponds to the abnormal firmware and is the latest at the backup time as the first target firmware.
[0137] Specifically, the first target firmware here is the firmware used to restore the abnormal firmware.
[0138] Step S830: the firmware management module marks the first sub-firmware in the first sub-firmware of the first target firmware that has the same sequence number as the abnormal sub-firmware as a backup sub-firmware.
[0139] Specifically, for example, if the serial numbers of the abnormal sub-firmware in the abnormal firmware are 3 and 4 respectively; then the first sub-firmware with serial numbers 3 and 4 in the first target firmware corresponding to the abnormal firmware is the backup sub-firmware, thereby making the abnormal sub-firmware correspond to the backup sub-firmware one-to-one.
[0140] Step S840: The firmware management module replaces the abnormal sub-firmware in the abnormal firmware with the backup sub-firmware with the same serial number to obtain the restored firmware.
[0141] Specifically, the abnormal sub-firmware No. 3 in the abnormal firmware is replaced with the backup sub-firmware No. 3, and the abnormal sub-firmware No. 4 in the abnormal firmware is replaced with the backup sub-firmware No. 4.
[0142] Step S850: The BMC chip controls the server to restart, runs the recovery firmware after the restart, and monitors the running status of the recovery firmware to determine whether the recovery firmware crashes abnormally or has a memory error within a second preset time (for example, 1 hour) after the server restarts.
[0143] If so, execute step S860: the firmware management module marks the current first target firmware as the second target firmware, and removes the first target firmware mark of the second target firmware, and randomly selects an initial firmware corresponding to the abnormal firmware and with the latest backup time and not marked as the second target firmware in the backup space of the storage module, and marks it as the first target firmware.
[0144] Specifically, if an abnormal crash or memory error occurs, it means that the abnormal firmware is still abnormal after restoration and needs further self-healing; but it is necessary to replace the initial firmware corresponding to another abnormal firmware, then the current first target firmware is marked as the second target firmware, and the first target firmware mark of the second target firmware is removed, and then an initial firmware corresponding to the abnormal firmware and with the latest backup time and not marked as the second target firmware is randomly selected from the backup space of the storage module, and marked as the first target firmware (this first target firmware is no longer the same firmware as the previous first target firmware).
[0145] Execute step S830 and subsequent steps.
[0146] If not, executing step S870: the firmware management module determines that the abnormal firmware self-healing is completed.
[0147] Specifically, if not, it means that the abnormal firmware has returned to normal after restoration, and it is determined that the self-healing of the abnormal firmware is completed.
[0148] In a ninth embodiment of a BMC management method integrating dynamic verification and firmware self-healing mechanism proposed by the present invention, based on the seventh embodiment, the system further includes a display screen and a mobile terminal that are communicatively connected to the BMC chip; step S710, and then further includes the following steps:
[0149] Step S910: The firmware management module generates warning information, wherein the warning information includes the firmware name of the abnormal firmware, the version update date, the verification hash value of each abnormal sub-firmware, and the current time.
[0150] Step S920: The firmware management module sends the warning information to the display screen for display.
[0151] Step S930: The firmware management module sends the warning information to the mobile terminal.
[0152] Step S940: The processor records the current operating status parameters of the abnormal firmware to generate an abnormal log, and prohibits external remote devices from calling the abnormal firmware, wherein the operating status parameters include warning information, and the file name and file location of the file currently accessed by the abnormal firmware.
[0153] Specifically, by generating early warning information, management personnel can know the operation status of each firmware in a timely manner; in addition, when generating early warning information, the processor records the current operation status parameters of the abnormal firmware to generate an abnormal log, so that management personnel can view the abnormal log later, thereby improving the security protection capabilities of the firmware in a targeted manner. The processor also prohibits external remote devices from calling abnormal firmware, thereby preventing the abnormal firmware from being further damaged or tampered with.
[0154] The present invention also proposes a BMC management system integrating dynamic verification and firmware self-healing mechanism, and applies a BMC management method integrating dynamic verification and firmware self-healing mechanism; the system includes a server and a BMC chip; the server includes a processor, and a storage module communicatively connected to the processor; the BMC chip is communicatively connected to the processor; the BMC chip includes a firmware management module; and the storage module is used to store firmware.
[0155] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0156] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
Claims
1. A BMC management method integrating dynamic verification and firmware self-healing mechanism, characterized in that: A BMC management system for integrating dynamic verification and firmware self-healing mechanism; the system includes a server and a BMC chip; the server includes a processor and a storage module communicatively connected to the processor; The BMC chip is communicatively connected to the processor; The BMC chip includes a firmware management module; The storage module is used to store firmware; the method comprises: When the server is started and a new or updated firmware is obtained, the processor marks the new or updated firmware as the initial firmware; The processor divides the initial firmware according to a preset method to obtain a plurality of first sub-firmwares, wherein each first sub-firmware is provided with a unique serial number according to the sequence of the program code; The firmware management module performs hash calculation on each first sub-firmware based on a hash algorithm to obtain a corresponding hash value, which is used as an initial hash value of the first sub-firmware; At each verification interval, the processor divides the initial firmware according to a preset method to obtain a plurality of second sub-firmwares, wherein the number of the second sub-firmwares is the same as the number of the first sub-firmwares; The firmware management module randomly selects a preset number of second sub-firmwares and marks them as sub-firmwares to be verified, wherein the preset number is less than or equal to the total number of second sub-firmwares; The firmware management module performs hash calculation on the sub-firmware to be verified based on the hash algorithm to obtain a corresponding hash value, which is used as the verification hash value of the sub-firmware to be verified; The firmware management module determines whether an abnormality occurs in the initial firmware based on the verification hash value of the sub-firmware to be verified and the initial hash value of the first sub-firmware, and performs a self-healing operation on the initial firmware that has an abnormality.
2. A BMC management method integrating dynamic verification and firmware self-healing mechanism according to claim 1, characterized in that: The firmware management module determines whether an abnormality occurs in the initial firmware based on the verification hash value of the sub-firmware to be verified and the initial hash value of the first sub-firmware, and performs a self-healing operation on the initial firmware that has an abnormality, including: The firmware management module determines whether the verification hash value of the sub-firmware to be verified is consistent with the initial hash value of the first sub-firmware with the same serial number; If they are inconsistent, the firmware management module determines that the initial firmware is abnormal, and determines the initial firmware as abnormal firmware; The firmware management module performs self-healing operations on abnormal firmware; When the server is started and the newly added or updated firmware is obtained, the processor marks the newly added or updated firmware as the initial firmware, and then further includes: If the initial firmware is an updated firmware, the processor replaces the corresponding original firmware with the initial firmware; If the initial firmware is a newly added firmware, the processor stores the initial firmware and the corresponding first sub-firmware into the backup space of the storage module, and uses the time when the initial firmware is added as the corresponding backup time; If the initial firmware is an updated firmware, the processor stores the initial firmware and the corresponding first sub-firmware into the backup space of the storage module, and uses the update time of the initial firmware as the corresponding backup time; At each verification interval, the processor divides the initial firmware according to a preset method to obtain a plurality of second sub-firmwares, and the method also includes: The firmware management module determines the verification interval duration corresponding to the initial firmware.
3. A BMC management method integrating dynamic verification and firmware self-healing mechanism according to claim 2, characterized in that: The firmware management module determines the verification interval duration corresponding to the initial firmware, including: The firmware management module obtains the number of times the initial firmware has been run since it was generated; The firmware management module obtains the number of times the initial firmware has been abnormal since it was generated; The firmware management module generates the corresponding verification interval length based on the number of times the initial firmware has been run and the number of exceptions since it was generated: , In the formula, The verification interval duration corresponding to the initial firmware; The number of times the initial firmware has been run since it was generated; The maximum number of times all existing firmware in the server have been run. The number of exceptions that have occurred since the initial firmware was generated; is the average number of abnormalities of all existing firmware in the server. T B This is the standard verification time.
4. The BMC management method integrating dynamic verification and firmware self-healing mechanism according to claim 1, characterized in that: The processor divides the initial firmware according to a preset manner to obtain a plurality of first sub-firmwares, including: The firmware management module determines the standard data size and determines whether the data size of the initial firmware is larger than the standard data size; If so, the firmware management module divides the initial firmware into a plurality of first sub-firmwares based on the data size of the initial firmware, wherein the calculation formula for the number of first sub-firmwares divided into the initial firmware is: , In the formula, The number of first sub-firmware divided into the initial firmware; is the data size of the initial firmware; is the standard data size; among the first sub-firmwares divided from the initial firmware, the data size of the last first sub-firmware is , the data size of the remaining first sub-firmware is the standard data size ; If not, the firmware management module directly uses the initial firmware as the corresponding first sub-firmware.
5. A BMC management method integrating dynamic verification and firmware self-healing mechanism according to claim 4, characterized in that: The server also includes a network interface; an external remote terminal can establish a communication connection with the server through the network interface; The firmware management module randomly selects a preset number of second sub-firmwares and marks them as sub-firmwares to be verified, including: The firmware management module obtains the IP address of the external remote terminal that has performed network communication with the server within a first preset time period in the past, and marks it as a historical access IP address; The firmware management module obtains the IP address whitelist; The firmware management module marks the IP addresses in the IP address whitelist among the historical access IP addresses as safe addresses, and marks the remaining IP addresses as risky addresses; The firmware management module calculates a preset number corresponding to the initial firmware based on the security address and the risk address.
6. A BMC management method integrating dynamic verification and firmware self-healing mechanism according to claim 5, characterized in that: The firmware management module calculates the preset number of initial firmware based on the security address and the risk address using the following calculation formula: , In the formula, The preset number corresponding to the initial firmware; is the total number of first sub-firmware corresponding to the initial firmware; is the number of risky addresses; is the number of secure addresses.
7. A BMC management method integrating dynamic verification and firmware self-healing mechanism according to claim 2, characterized in that: The firmware management module performs a self-healing operation on the abnormal firmware, including: The firmware management module marks the sub-firmware to be verified whose verification hash value is inconsistent with the initial hash value of the first sub-firmware with the same serial number as abnormal sub-firmware; The firmware management module obtains a ratio of the total number of abnormal sub-firmware to the sub-firmware to be verified, and marks it as an abnormal ratio; If the abnormality ratio is greater than or equal to the first preset value, the firmware management module sets the abnormality level of the abnormal firmware to a high level and deletes the abnormal sub-firmware in the abnormal firmware; If the abnormal ratio is less than a first preset value and greater than or equal to a second preset value, the firmware management module sets the abnormal level of the abnormal firmware to a medium level and deletes the abnormal sub-firmware in the abnormal firmware, wherein the second preset value is less than the first preset value; If the abnormality ratio is less than the second preset value, the firmware management module sets the abnormality level of the abnormal firmware to a low level, and deletes the abnormal sub-firmware in the abnormal firmware.
8. A BMC management method integrating dynamic verification and firmware self-healing mechanism according to claim 7, characterized in that: The firmware management module marks the sub-firmware to be verified whose verification hash value is inconsistent with the initial hash value of the first sub-firmware with the same serial number as abnormal sub-firmware, and then further includes: The firmware management module determines whether there are multiple initial firmwares corresponding to the abnormal firmware in the backup space of the storage module; If so, the firmware management module marks the initial firmware in the backup space of the storage module that corresponds to the abnormal firmware and is the latest at the backup time as the first target firmware; The firmware management module marks the first sub-firmware in the first sub-firmware of the first target firmware that has the same sequence number as the abnormal sub-firmware as a backup sub-firmware; The firmware management module replaces the abnormal sub-firmware in the abnormal firmware with the backup sub-firmware with the same serial number to obtain the restored firmware; The BMC chip controls the server to restart, runs the recovery firmware after the restart, and monitors the running status of the recovery firmware to determine whether the recovery firmware crashes abnormally or has a memory error within a second preset time after the server restarts; If yes, the firmware management module marks the current first target firmware as the second target firmware, removes the first target firmware mark of the second target firmware, randomly selects an initial firmware corresponding to the abnormal firmware and with the latest backup time and not marked as the second target firmware in the backup space of the storage module, and marks it as the first target firmware; Executing the firmware management module to mark the first sub-firmware in the first sub-firmware of the first target firmware that is consistent with the abnormal sub-firmware serial number as a backup sub-firmware; If not, the firmware management module determines that the abnormal firmware self-healing is complete.
9. A BMC management method integrating dynamic verification and firmware self-healing mechanism according to claim 7, characterized in that: The system also includes a display screen and a mobile terminal that are communicatively connected to the BMC chip; the firmware management module marks the sub-firmware to be verified whose verification hash value is inconsistent with the initial hash value of the first sub-firmware with the same serial number as an abnormal sub-firmware, and then further includes: The firmware management module generates warning information, wherein the warning information includes the firmware name of the abnormal firmware, the version update date, the verification hash value of each abnormal sub-firmware and the current time; The firmware management module sends the warning information to the display screen for display; The firmware management module sends the warning information to the mobile terminal; The processor records the current running status parameters of the abnormal firmware to generate an abnormal log, and prohibits external remote devices from calling the abnormal firmware, wherein the running status parameters include warning information, and the file name and file location of the file currently accessed by the abnormal firmware.
10. A BMC management system integrating dynamic verification and firmware self-healing mechanism, characterized in that: A BMC management method integrating dynamic verification and firmware self-healing mechanism as described in any one of claims 1 to 9 is applied; the system comprises a server and a BMC chip; the server comprises a processor and a storage module communicatively connected to the processor; the BMC chip is communicatively connected to the processor; the BMC chip comprises a firmware management module; and the storage module is used to store firmware.
Citation Information
Patent Citations
Server starting management system and method
CN115729647A
System-on-chip secure starting method and device, electronic equipment and storage medium
CN117472465A