Terminal device security protection method, device, electronic device and storage medium

By performing threat detection after the terminal device enters UEFI mode, using detection instructions and audio encoding and decoding technology, the problem of firmware exploitation attacks is solved, the security protection capabilities of the terminal device are improved, and the integrity of key data before the operating system is loaded is ensured. .

CN114254331BActive Publication Date: 2024-09-24HARBIN ANTIY TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111602671.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-24
Publication Date
2024-09-24
Estimated Expiration
2041-12-24

AI Technical Summary

Technical Problem

Existing technologies are difficult to effectively protect terminal devices from firmware exploitation attacks, especially since anti-virus software runs on the operating system and cannot detect malicious code in the firmware before the operating system is started.

Method used

After the terminal device enters UEFI mode, it obtains the detection instructions triggered by the user, parses and executes threat detection for UEFI firmware, EFI boot program and key system locations, and uses data attribute information, hash values ​​and audio encoding and decoding technology to perform threat detection. Make sure to run a security scan before the operating system loads.

Benefits of technology

By performing threat detection before the operating system is loaded, we can avoid firmware exploitation attacks, improve the security protection capabilities of terminal devices, enhance the protection of critical data, and supplement the shortcomings of traditional anti-virus software.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114254331B
    Figure CN114254331B
Patent Text Reader

Abstract

Embodiments of the present invention relate to the field of computer security, and in particular to a security protection method, device, electronic device and storage medium for a terminal device. The security protection method for a terminal device comprises: after the terminal device enters UEFI mode, obtaining a detection instruction triggered by a user; wherein the detection instruction comprises at least one of a detection instruction for UEFI firmware, a detection instruction for an EFI boot program and a detection instruction for a key position of the system; parsing the detection instruction to determine an object to be detected; wherein the object to be detected comprises at least one of UEFI firmware, an EFI boot program and a key position of the system; and performing threat detection on files in the object to be detected of the current terminal device. The technical solution provided by the present invention can improve the security protection capability of the terminal device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer security, and in particular to a security protection method, device, electronic device and storage medium for a terminal device. Background Art

[0002] With the continuous development of network attack technology, methods of attacking the operating system of terminal devices by using firmware vulnerabilities, BootKit and other firmware exploitation technologies have emerged, and the attack methods are becoming more and more covert.

[0003] In the related art, the security protection of terminal devices mainly relies on various anti-virus software installed in the operating system. Since the anti-virus software runs on the operating system, it belongs to the application layer software, and the control authority of the application layer software is relatively low.

[0004] However, firmware exploitation attacks usually occur before the operating system is started. That is, when a terminal device is attacked by this type of attack, some key data (such as system files) may have been tampered with (such as injected with malicious code) before the operating system is started. Summary of the invention

[0005] In order to improve the security protection capability of a terminal device, an embodiment of the present invention provides a security protection method, an apparatus, an electronic device, and a storage medium for a terminal device.

[0006] In a first aspect, an embodiment of the present invention provides a security protection method for a terminal device, comprising:

[0007] After the terminal device enters the UEFI mode, obtaining a detection instruction triggered by a user; wherein the detection instruction includes at least one of a detection instruction for UEFI firmware, a detection instruction for an EFI boot program, and a detection instruction for a key position of the system;

[0008] Parsing the detection instruction to determine an object to be detected; wherein the object to be detected includes at least one of UEFI firmware, EFI boot program, and a key position of the system;

[0009] Perform threat detection on files in the object to be detected of the current terminal device.

[0010] In a possible design, the performing threat detection on the file in the object to be detected of the current terminal device includes:

[0011] Obtaining files in the object to be detected after the terminal device was last started;

[0012] Extracting first data attribute information for characterizing files in the object to be detected of the current terminal device and second data attribute information for characterizing files in the object to be detected after the terminal device was last started;

[0013] Based on the first data attribute information and the second data attribute information, threat detection is performed on files in the object to be detected of the current terminal device.

[0014] In a possible design, the performing threat detection on the file in the object to be detected of the current terminal device based on the first data attribute information and the second data attribute information includes:

[0015] Performing data conversion on the first data attribute information and the second data attribute information respectively to obtain first audio attribute information and second audio attribute information;

[0016] Based on the first audio attribute information and the second audio attribute information, threat detection is performed on files in the object to be detected of the current terminal device.

[0017] In one possible design, the first data attribute information and the second data attribute information both include at least one of the following:

[0018] Data type, data size, creation time, last modification time, last open time, version information, signature information;

[0019] and / or,

[0020] The first audio attribute information and the second audio attribute information each include at least one of the following:

[0021] Instrument type, cycle time, rhythm, spatial distance, frequency of directional changes, harmony, sound effects.

[0022] In a possible design, the performing threat detection on the file in the object to be detected of the current terminal device based on the first audio attribute information and the second audio attribute information includes:

[0023] Using an audio encoder to render the first audio attribute information and the second audio attribute information respectively to obtain first audio data and second audio data;

[0024] Playing the first audio data and the second audio data using an audio decoder;

[0025] Based on the playback result, threat detection is performed on the files in the object to be detected of the current terminal device.

[0026] In a possible design, the performing threat detection on the file in the object to be detected of the current terminal device includes:

[0027] Obtaining a first hash value carried by a file in an object to be detected of the current terminal device;

[0028] Performing hash calculation on the file in the object to be detected of the current terminal device to obtain a second hash value;

[0029] Based on the first hash value and the second hash value, threat detection is performed on the files in the object to be detected of the current terminal device.

[0030] In a possible design, the performing threat detection on the file in the object to be detected of the current terminal device includes:

[0031] Obtaining a digital signature carried by a file in the object to be detected of the current terminal device; wherein the digital signature is obtained by encrypting a hash value of the file;

[0032] Decrypting the encrypted digital signature using a preset key to obtain a first hash value;

[0033] Performing hash calculation on the file in the object to be detected of the current terminal device to obtain a second hash value;

[0034] Based on the first hash value and the second hash value, threat detection is performed on the files in the object to be detected of the current terminal device.

[0035] In a second aspect, an embodiment of the present invention further provides a security protection device for a terminal device, including:

[0036] An acquisition module, used to acquire a detection instruction triggered by a user after the terminal device enters the UEFI mode; wherein the detection instruction includes at least one of a detection instruction for UEFI firmware, a detection instruction for an EFI boot program, and a detection instruction for a key position of the system;

[0037] A parsing module, used to parse the detection instruction and determine the object to be detected; wherein the object to be detected includes at least one of UEFI firmware, EFI boot program and system key position;

[0038] The detection module is used to perform threat detection on files in the object to be detected of the current terminal device.

[0039] In a third aspect, an embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in any embodiment of this specification is implemented.

[0040] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, enables the computer to execute the method described in any embodiment of this specification.

[0041] The embodiment of the present invention provides a security protection method, device, electronic device and storage medium for a terminal device. After the terminal device enters UEFI mode, a detection instruction triggered by a user is obtained, and then the detection instruction is parsed to determine the object to be detected, so that threat detection can be performed on the files in the object to be detected of the current terminal device. Since the above security protection method is performed before loading the operating system, that is, the terminal device already has device access rights and capabilities after entering UEFI mode, threat detection can be performed on some key data, thereby avoiding attacks on the operating system by firmware exploitation attacks, so as to improve the security protection capability of the terminal device. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] 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 some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0043] Figure 1 This is a flow chart of a security protection method for a terminal device provided by an embodiment of the present invention;

[0044] Figure 2 This is a flow chart of another terminal device security protection method provided by an embodiment of the present invention;

[0045] Figure 3 This is a flow chart of another terminal device security protection method provided by an embodiment of the present invention;

[0046] Figure 4 is a hardware architecture diagram of an electronic device provided by an embodiment of the present invention;

[0047] Figure 5 It is a structural diagram of a security protection device of a terminal device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0049] As mentioned above, in the related art, the security protection of terminal devices mainly relies on various anti-virus software installed in the operating system. Since the anti-virus software runs on the operating system, it belongs to the application layer software, and the control authority of the application layer software is relatively low.

[0050] Firmware is software that runs at the bottom of the computer and runs before the operating system is started. Therefore, malicious code in firmware cannot be discovered by antivirus software and security tools. The firmware has extremely high permissions during operation and can tamper with and destroy hardware, file systems, operating systems, and specific software, and has extremely strong attack capabilities.

[0051] Firmware is an indispensable and important component in the computer. It is the bridge between the basic hardware and system software of the computer. The Basic Input Output System (BIOS) is one of the most important firmware on the computer. After the computer is powered on, the firmware will check the status of the registers, timing chips, programmable interrupts and DMA controllers in the CPU, and initialize the registers of the motherboard chipset, dynamic memory, graphics card and related peripherals. Under the premise that the above devices are running normally, the firmware will be responsible for booting the operating system.

[0052] From powering on to loading the operating system, the firmware has extremely high system permissions. Once there is a security vulnerability or a Trojan is implanted in the firmware, it will pose a serious threat to the computer. For example, by adding a backdoor program to the firmware (a firmware exploitation attack method), such as using the System Management Modal (SMM), computer data can be obtained covertly without the operating system being able to detect it.

[0053] The inventor discovered during the research and development process that firmware exploitation attacks usually occur before the operating system is started. That is, when a terminal device is attacked by this type of attack, some key data (such as system files) may have been tampered with (such as injected with malicious code) before the operating system is started. If the operating system has been tampered with before it is started, any threat detection after the operating system is started will no longer be meaningful.

[0054] In order to solve this technical problem, the inventor considered performing threat detection on some key data before the operating system is started. To achieve this goal, the inventor considered that after the terminal device enters the UEFI mode, some necessary drivers of the terminal device have been loaded, that is, the terminal device has device access rights and capabilities after entering the UEFI mode, so that some key data can be threat detected, thereby avoiding attacks on the operating system by firmware exploitation attacks, so as to improve the security protection capabilities of the terminal device.

[0055] The specific implementation of the above concept is described below.

[0056] Please refer to Figure 1 The embodiment of the present invention provides a terminal device security protection method, the method comprising:

[0057] Step 100: After the terminal device enters the UEFI mode, a detection instruction triggered by a user is obtained; wherein the detection instruction includes at least one of a detection instruction for UEFI firmware, a detection instruction for an EFI boot program, and a detection instruction for a key position of the system;

[0058] Step 102: Parse the detection instruction to determine an object to be detected; wherein the object to be detected includes at least one of UEFI firmware, EFI boot program, and a key position of the system;

[0059] Step 104: Perform threat detection on files in the object to be detected of the current terminal device.

[0060] In the embodiment of the present invention, after the terminal device enters the UEFI mode, a detection instruction triggered by the user is obtained, and then the detection instruction is parsed to determine the object to be detected, so that threat detection can be performed on the files in the object to be detected of the current terminal device. Since the above security protection method is performed before loading the operating system, that is, the terminal device already has device access rights and capabilities after entering the UEFI mode, threat detection can be performed on some key data, thereby avoiding attacks on the operating system by firmware exploitation attacks, so as to improve the security protection capability of the terminal device.

[0061] It should be noted that the firmware operation process is divided into four stages, including the hardware initialization stage, the driver service execution stage, the boot device selection stage and the operating system operation stage, among which:

[0062] (1) Hardware initialization phase:

[0063] Executes firmware components implemented by assembly language code, mainly to implement security verification of the hardware platform and firmware initial startup code, initialize the system cache, and prepare necessary storage space for subsequent hardware initialization work; at the same time, initializes the processor, memory, chipset and other chips and devices.

[0064] The hardware initialization phase is the first phase in which the firmware runs, and it is the cornerstone for ensuring the integrity and reliability of computer hardware and firmware. If the firmware runs malicious code during this phase, it will be able to destroy the security check of the hardware and firmware at this stage, and destroy the safe operating environment of the entire computer.

[0065] (2) Driving service execution phase

[0066] Execute device drivers, install and initialize protocols related to devices, buses, services, etc. The driver service execution phase provides protocol / service interfaces for subsequent operations, which are provided to the firmware itself, the operating system, and application software for calling.

[0067] The driver service execution phase is the core phase of the firmware operation. The firmware will load hardware drivers and applications. If the computer host is connected to hardware containing a firmware Trojan module, the Trojan module will be loaded at the firmware layer at this phase. In this phase, the firmware can load and execute the file system driver, identify and analyze the hard disk partition and file system, and can implant the Trojan in the operating system into the operating system and realize automatic startup with the operating system.

[0068] (3) Start the equipment selection phase

[0069] According to the configuration rules pre-set in the system or the user's choice this time, find the device that carries the operating system (such as USB device, hard disk, CD-ROM, network, etc.) and load the operating system.

[0070] The boot device selection phase provides the UEFI SHELL operating environment, UEFI driver, and operating system loading functions. Therefore, there is also an attack vulnerability that the operating system loading process can be hijacked.

[0071] (4) Operating system running stage

[0072] The firmware officially hands over control of the machine to the operating system. At this point, some firmware services / protocols are still available.

[0073] During this phase, if there is executable malicious code in the firmware, the antivirus software in the operating system will not be able to detect it.

[0074] Through the analysis of the firmware running process above, it can be seen that firmware security must first ensure the integrity of the firmware during the hardware initialization phase; secondly, it is necessary to verify the loaded hardware and firmware drivers during the driver service execution phase, and prohibit the loading of unconfirmed firmware drivers. These two security measures can prevent the loading and execution of firmware Trojans to a certain extent.

[0075] The embodiment of the present invention focuses on describing the security protection method in the boot device selection stage. As mentioned above, after the terminal device enters the UEFI mode, some necessary drivers of the terminal device have been loaded, so threat detection can be performed on some key data after the terminal device enters the UEFI mode. In order to realize the threat detection of the above key data, the software code for executing the security protection method can be integrated into the motherboard ROM, so that it does not rely on the operating system.

[0076] Described below Figure 1 How the various steps are performed.

[0077] For step 100:

[0078] After the terminal device enters UEFI mode, the user can click the relevant interface button with the mouse to trigger the detection instruction for some key data. For example, after clicking the relevant interface button, the terminal device will pop up a user interaction interface, which includes an interface button for UEFI firmware detection, an interface button for EFI boot program detection, and an interface button for system key position detection. At this time, the user can continue to click at least one of the above interface buttons according to actual needs to implement the threat detection operation of the corresponding object to be detected.

[0079] Regarding step 102:

[0080] After obtaining the detection instruction triggered by the user, the obtained detection instruction is further parsed to obtain the object to be detected, that is, the object to be detected includes at least one of UEFI firmware, EFI boot program and system key position.

[0081] Regarding step 104:

[0082] It is understandable that the files of UEFI firmware include UEFI applications and UEFI drivers, the files of EFI boot program may be, for example, the loader provided by the operating system, and the key locations of the system may be, for example, the files of the operating system kernel, the system directory in the C drive, the user directory, etc. In some implementations, step 104 may utilize a local virus library, a virus detection model, or other detection tools stored in the terminal device to perform threat detection on the files of the detected object, and the detection mechanism used may be, for example, based on file hash values, malicious code features, etc., and such detection methods will not be described in detail herein.

[0083] Among them, the detection schemes based on file hash values ​​include the following two:

[0084] The first technical solution is:

[0085] Obtain a first hash value carried by a file in an object to be detected on the current terminal device;

[0086] Using a preset hash algorithm to perform hash calculation on the file in the object to be detected of the current terminal device to obtain a second hash value;

[0087] Based on the first Hash value and the second Hash value, threat detection is performed on the files in the object to be detected of the current terminal device.

[0088] The second technical solution is:

[0089] Obtaining a digital signature carried by a file in the object to be detected of the current terminal device; wherein the digital signature is obtained by encrypting a hash value of the file;

[0090] Decrypting the encrypted digital signature using a preset key to obtain a first hash value;

[0091] Using a preset hash algorithm to perform hash calculation on the file in the object to be detected of the current terminal device to obtain a second hash value;

[0092] Based on the first Hash value and the second Hash value, threat detection is performed on the files in the object to be detected of the current terminal device.

[0093] Specifically, if the first hash value and the second hash value are the same, it proves that the file in the object to be detected of the current terminal device has not been tampered with, otherwise it has been tampered with.

[0094] Compared with the first technical solution, the second technical solution obtains a digital signature by encrypting the hash value of the file, so the second technical solution has a higher degree of confidentiality, that is, it can more accurately determine whether the file has been tampered with. In some implementations, step 104 can also use the following methods to perform threat detection:

[0095] Step S1, obtaining files in the object to be detected after the terminal device was last started;

[0096] Step S2, extracting first data attribute information for characterizing files in the object to be detected of the current terminal device and second data attribute information for characterizing files in the object to be detected after the terminal device was last started;

[0097] Step S3: Based on the first data attribute information and the second data attribute information, threat detection is performed on the files in the object to be detected of the current terminal device.

[0098] Compared with the method in the related art that requires obtaining the complete content of the data, the method provided by the embodiment of the present invention only needs to obtain the above-mentioned data attribute information to complete the preparation work of the security protection of the terminal device, thereby improving the efficiency of the security protection of the terminal device.

[0099] It should be noted that the method of extracting data attribute information may be, for example, a method of using regular expressions or other methods of analyzing static vectors. The extraction method is not limited here, as long as the data attribute information can be extracted.

[0100] In some embodiments, the first data attribute information and the second data attribute information each include at least one of the following:

[0101] Data type, data size, creation time, last modification time, last open time, version information, signature information.

[0102] For example, the data type may be ".exe", ".docx", ".dat", etc., and the signature information indicates whether there is a digital signature in the original data.

[0103] In other implementations, step 104 may perform threat detection by converting the file of the object to be detected into audio data.

[0104] The following focuses on describing a threat detection method that converts the file of the object to be detected into audio data.

[0105] In some implementations, step S3 may include:

[0106] Step S31, performing data conversion on the first data attribute information and the second data attribute information respectively to obtain first audio attribute information and second audio attribute information;

[0107] Step S32: Based on the first audio attribute information and the second audio attribute information, threat detection is performed on the files in the object to be detected of the current terminal device.

[0108] In this implementation, there is no need to use a special detection tool to perform threat detection. Instead, the files in the object to be detected of the current terminal device and the files in the object to be detected after the terminal device was last started are converted into audio, so that the data can be indirectly verified by verifying the audio, thereby improving the convenience of threat detection. Among them, the files in the object to be detected after the terminal device was last started are considered to be untampered files.

[0109] Among them, data conversion can be understood as pre-set data mapping rules. For example, the data mapping rules can be to map data attribute information into audio attribute information, so that the further obtained audio data can be played with the help of the audio decoder of the mobile terminal, thereby facilitating the verification of the files of the two objects to be detected.

[0110] In some embodiments, the first audio attribute information and the second audio attribute information each include at least one of the following:

[0111] Instrument type, cycle time, rhythm, spatial distance, frequency of directional changes, harmony, sound effects.

[0112] For example, data type can be mapped to instrument type, data size can be mapped to cycle time, creation time can be mapped to rhythm, last modification time can be mapped to spatial distance, last open time can be mapped to direction change frequency, version information can be mapped to harmony, and signature information can be mapped to sound effect. The specific rules for data conversion are not limited here, as long as the data conversion can be completed.

[0113] It should be noted that, generally speaking, in the startup device selection stage, the main drivers loaded are USB devices, hard disks, optical disks, networks, etc. However, the threat detection method provided by the embodiment of the present invention requires the use of a sound card driver, so the relevant add-in items in the motherboard ROM can be modified in advance so that the sound card driver can also be loaded in the startup device selection stage.

[0114] In some implementations, step S32 may include:

[0115] Using an audio encoder to render the first audio attribute information and the second audio attribute information respectively to obtain first audio data and second audio data;

[0116] Playing the first audio data and the second audio data using an audio decoder;

[0117] Based on the playback result, threat detection is performed on the files in the object to be detected of the current terminal device.

[0118] In this implementation, the relevant technology requires the use of a special detection tool, and the terminal device has an audio encoder. Therefore, it can use its own hardware (i.e., the audio encoder) to complete the rendering of the audio data (i.e., obtain the audio data), so as to facilitate the subsequent use of the audio decoder of the terminal device to play the audio data (i.e., decode). The user can perform threat detection on the files in the object to be detected of the current terminal device based on the playback results, which can help improve the convenience of security protection of the terminal device.

[0119] The following introduces the relevant solutions provided by the embodiments of the present invention when two audio data are relatively similar.

[0120] Generally speaking, the data tampering by criminals affects two types of data attribute information, namely data size and last modification time, while other data attribute information is usually not affected. Even if it is affected, the audio attribute information obtained after mapping these other data attribute information can be distinguished. For example, if the instrument types of two audio data are different, then when the audio data are played, the human ear can easily hear the difference between the two audio data, thereby easily completing the verification of the files of the two objects to be detected.

[0121] However, when the data sizes of the files of the two objects to be detected are slightly different, and other data attribute information is the same, the cycle times of the two corresponding audio data are also slightly different. At this time, when playing with an audio decoder, it is difficult for the human ear to distinguish the difference between the two audio data, and thus it is difficult to complete the verification of the two files of the objects to be detected.

[0122] In order to solve this technical problem, an audio decoder can be used to determine whether there is a difference in the frequency spectrum of two audio data, thereby quickly completing the verification of the files of the two objects to be detected.

[0123] In some implementations, step S32 may include:

[0124] Using an audio encoder to render the first audio attribute information and the second audio attribute information respectively to obtain first audio data and second audio data;

[0125] Determine, using an audio decoder, whether there is a difference between frequency spectra of the first audio data and the second audio data;

[0126] If not, the audio decoder is used to output the result that the file in the object to be detected of the current terminal device has not been tampered with;

[0127] If so, the audio decoder is used to output the result that the file in the object to be detected of the current terminal device has been tampered with.

[0128] In this embodiment, by using the audio decoder of the terminal device itself to parse the frequency spectra of the two audio data, it is possible to quickly determine whether there is a difference in the frequency spectra of the two audio data, and further use the audio decoder to output the result of whether the file in the object to be detected of the current terminal device has been tampered with.

[0129] However, humans have a natural distrust of machines, and people prefer to trust their own feelings and judgments. In order to improve the user experience, it is possible to consider further playing audio data to assist the user's judgment when outputting the result that the file in the object to be detected of the current terminal device has been tampered with, thereby improving the user's experience. However, if the rendered audio data is still played according to the above scheme, then when the difference is small, the human ear obviously cannot distinguish the difference between the two. To this end, it is possible to further consider amplifying the difference in audio attribute information, so that users can more easily distinguish the difference between the two, thereby improving the user's experience.

[0130] In some implementations, after the audio decoder is used to output the result that the file in the object to be detected of the current terminal device has been tampered with, the method further includes:

[0131] Determine, using an audio decoder, audio attribute information that differs between frequency spectra of the first audio data and the second audio data;

[0132] Determine whether the audio attribute information with differences is target audio attribute information; wherein the target audio attribute information includes period time and spatial distance;

[0133] If not, executing: using an audio decoder to play the first audio data and the second audio data; based on the result of the playback, further performing threat detection on the files in the object to be detected of the current terminal device;

[0134] If so, execute: amplify the target audio attribute information in the first audio data and the target audio attribute information in the second audio data respectively to obtain third audio data and fourth audio data; use the audio decoder to play the third audio data and the fourth audio data; based on the playback results, further perform threat detection on the files in the object to be detected of the current terminal device.

[0135] In this embodiment, the third audio data and the fourth audio data are obtained by amplifying the audio attribute information that has been determined to be different and is the target audio attribute information. In this way, the user can assist in the verification of the files of the two objects to be detected based on the playback results of the third audio data and the fourth audio data, thereby improving the user experience.

[0136] For example, take the data attribute information as data size, and its corresponding audio attribute information is cycle time. Assume that the cycle time of the two audio data is slightly different through audio decoder analysis, and assume that the total duration of the original two audio data is 10s, and the cycle time of the two audio data is different between 5s and 5.1s, at this time it is difficult for the human ear to distinguish through hearing. For this reason, the total duration of the two audio data is amplified (that is, the cycle time is also amplified), and the total duration is amplified to 100s (that is, amplified 10 times). In this way, the difference will be reflected in 50s-51s, and at this time, the human ear can hear the difference between the two. In summary, by taking advantage of the fact that UEFI firmware starts before the operating system, the file is detected before the operating system starts, so as to avoid the problem of firmware vulnerability exploitation and BootKit-type virus files bypassing traditional antivirus software, and can effectively supplement the security protection capabilities of the operating system before loading, which is an effective supplement to traditional protection solutions.

[0137] Figure 2 A flow chart showing a method for protecting terminal equipment security according to another embodiment is shown. Figure 2 , the method comprising:

[0138] Step 200: After the terminal device enters the UEFI mode, obtain a detection instruction triggered by the user;

[0139] Step 202: Parse the detection instruction to determine the object to be detected;

[0140] Step 204: Obtain files in the object to be detected after the terminal device was last started;

[0141] Step 206: extracting first data attribute information for characterizing files in the object to be detected of the current terminal device and second data attribute information for characterizing files in the object to be detected after the terminal device was last started;

[0142] Step 208: performing data conversion on the first data attribute information and the second data attribute information respectively to obtain first audio attribute information and second audio attribute information;

[0143] Step 210: Render the first audio attribute information and the second audio attribute information respectively using an audio encoder to obtain first audio data and second audio data;

[0144] Step 212: Play the first audio data and the second audio data using an audio decoder;

[0145] Step 214: Based on the playback result, threat detection is performed on the files in the object to be detected of the current terminal device.

[0146] Figure 3A flow chart showing a method for protecting terminal equipment security according to another embodiment is shown. Figure 3 , the method comprising:

[0147] Step 300: After the terminal device enters the UEFI mode, obtain a detection instruction triggered by the user;

[0148] Step 302: Parse the detection instruction to determine the object to be detected;

[0149] Step 304: Obtain files in the object to be detected after the terminal device was last started;

[0150] Step 306: extracting first data attribute information of a file used to characterize a first object to be detected and second data attribute information of a file used to characterize a second object to be detected;

[0151] Step 308: performing data conversion on the first data attribute information and the second data attribute information respectively to obtain first audio attribute information and second audio attribute information;

[0152] Step 310: Render the first audio attribute information and the second audio attribute information respectively using an audio encoder to obtain first audio data and second audio data;

[0153] Step 312: using an audio decoder to determine whether there is a difference between the frequency spectra of the first audio data and the second audio data; if not, executing step 314; if yes, executing step 316;

[0154] Step 314: using an audio decoder to output a verification result that the file of the first object to be detected is the same as the file of the second object to be detected;

[0155] Step 316: using an audio decoder to output a verification result that the file of the first object to be detected is different from the file of the second object to be detected;

[0156] Step 318: using an audio decoder to determine audio attribute information having differences between the frequency spectra of the first audio data and the frequency spectra of the second audio data;

[0157] Step 320: Determine whether the audio attribute information with differences is the target audio attribute information; if not, execute step 322; if yes, execute step 324;

[0158] Step 322: Play the first audio data and the second audio data using an audio decoder; based on the playback result, further verify the file of the first object to be detected and the file of the second object to be detected;

[0159] Step 324: Amplify the target audio attribute information in the first audio data and the target audio attribute information in the second audio data respectively to obtain third audio data and fourth audio data; use an audio decoder to play the third audio data and the fourth audio data; based on the playback results, further verify the files of the first object to be detected and the files of the second object to be detected.

[0160] like Figure 4 , Figure 5 As shown, an embodiment of the present invention provides a security protection device for a terminal device. The device embodiment can be implemented by software, or by hardware or a combination of software and hardware. From the hardware level, Figure 4 As shown, it is a hardware architecture diagram of an electronic device where a security protection device of a terminal device provided by an embodiment of the present invention is located, except Figure 4 In addition to the processor, memory, network interface, and non-volatile memory shown, the electronic device in the embodiment may also include other hardware, such as a forwarding chip responsible for processing messages, etc. Taking software implementation as an example, Figure 5 As shown, as a device in a logical sense, the CPU of the electronic device in which it is located reads the corresponding computer program in the non-volatile memory into the internal memory and runs it.

[0161] like Figure 5 As shown, this embodiment provides a security protection device for a terminal device, including:

[0162] The acquisition module 500 is used to acquire a detection instruction triggered by a user after the terminal device enters the UEFI mode; wherein the detection instruction includes at least one of a detection instruction for UEFI firmware, a detection instruction for an EFI boot program, and a detection instruction for a key position of the system;

[0163] The parsing module 502 is used to parse the detection instruction and determine the object to be detected; wherein the object to be detected includes at least one of UEFI firmware, EFI boot program and system key position;

[0164] The detection module 504 is used to perform threat detection on files in the object to be detected of the current terminal device.

[0165] In the embodiment of the present invention, the acquisition module 500 may be used to execute step 100 in the above method embodiment, the analysis module 502 may be used to execute step 102 in the above method embodiment, and the detection module 504 may be used to execute step 104 in the above method embodiment.

[0166] In one embodiment of the present invention, the detection module 504 is used to perform the following operations:

[0167] Obtain the files in the object to be detected after the terminal device was last started;

[0168] Extracting first data attribute information for characterizing files in the object to be detected of the current terminal device and second data attribute information for characterizing files in the object to be detected after the terminal device was last started;

[0169] Based on the first data attribute information and the second data attribute information, threat detection is performed on the files in the object to be detected of the current terminal device.

[0170] In one embodiment of the present invention, when performing threat detection on a file in an object to be detected of the current terminal device based on the first data attribute information and the second data attribute information, the detection module 504 is configured to perform the following operations:

[0171] Performing data conversion on the first data attribute information and the second data attribute information respectively to obtain first audio attribute information and second audio attribute information;

[0172] Based on the first audio attribute information and the second audio attribute information, threat detection is performed on files in the object to be detected of the current terminal device.

[0173] In one embodiment of the present invention, the first data attribute information and the second data attribute information each include at least one of the following:

[0174] Data type, data size, creation time, last modification time, last open time, version information, signature information;

[0175] and / or,

[0176] The first audio attribute information and the second audio attribute information each include at least one of the following:

[0177] Instrument type, cycle time, rhythm, spatial distance, frequency of directional changes, harmony, sound effects.

[0178] In one embodiment of the present invention, when performing threat detection on a file in the object to be detected of the current terminal device based on the first audio attribute information and the second audio attribute information, the detection module 504 is used to perform the following operations:

[0179] Using an audio encoder to render the first audio attribute information and the second audio attribute information respectively to obtain first audio data and second audio data;

[0180] Playing the first audio data and the second audio data using an audio decoder;

[0181] Based on the playback result, threat detection is performed on the files in the object to be detected of the current terminal device.

[0182] In one embodiment of the present invention, when performing threat detection on a file in the object to be detected of the current terminal device based on the first audio attribute information and the second audio attribute information, the detection module 504 is used to perform the following operations:

[0183] Using an audio encoder to render the first audio attribute information and the second audio attribute information respectively to obtain first audio data and second audio data;

[0184] Determine, using an audio decoder, whether there is a difference between frequency spectra of the first audio data and the second audio data;

[0185] If not, the audio decoder is used to output the result that the file in the object to be detected of the current terminal device has not been tampered with;

[0186] If so, the audio decoder is used to output the result that the file in the object to be detected of the current terminal device has been tampered with.

[0187] In one embodiment of the present invention, when performing threat detection on a file in the object to be detected of the current terminal device based on the first audio attribute information and the second audio attribute information, the detection module 504 is further configured to perform the following operations:

[0188] Determine, using an audio decoder, audio attribute information that differs between frequency spectra of the first audio data and the second audio data;

[0189] Determine whether the audio attribute information with differences is target audio attribute information; wherein the target audio attribute information includes period time and spatial distance;

[0190] If not, executing: using an audio decoder to play the first audio data and the second audio data; based on the result of the playback, further performing threat detection on the files in the object to be detected of the current terminal device;

[0191] If so, execute: amplify the target audio attribute information in the first audio data and the target audio attribute information in the second audio data respectively to obtain third audio data and fourth audio data; use the audio decoder to play the third audio data and the fourth audio data; based on the playback results, further perform threat detection on the files in the object to be detected of the current terminal device.

[0192] In one embodiment of the present invention, the detection module 504 is used to perform the following operations:

[0193] Obtain a first hash value carried by a file in an object to be detected on the current terminal device;

[0194] Performing hash calculation on the file in the object to be detected of the current terminal device to obtain a second hash value;

[0195] Based on the first Hash value and the second Hash value, threat detection is performed on the files in the object to be detected of the current terminal device.

[0196] In one embodiment of the present invention, the detection module 504 is used to perform the following operations:

[0197] Obtain a first hash value carried by a file in an object to be detected on the current terminal device;

[0198] Performing hash calculation on the file in the object to be detected of the current terminal device to obtain a second hash value;

[0199] Based on the first Hash value and the second Hash value, threat detection is performed on the files in the object to be detected of the current terminal device.

[0200] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the security protection device of a terminal device. In other embodiments of the present invention, a security protection device of a terminal device may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0201] The information interaction, execution process and other contents between the modules in the above-mentioned device are based on the same concept as the embodiment of the method of the present invention. For the specific contents, please refer to the description in the embodiment of the method of the present invention, and no further description is given here.

[0202] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, a security protection method for a terminal device in any embodiment of the present invention is implemented.

[0203] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the processor executes a terminal device security protection method in any embodiment of the present invention.

[0204] Specifically, a system or device equipped with a storage medium can be provided, on which software program code that implements the functions of any of the above-mentioned embodiments is stored, and a computer (or CPU or MPU) of the system or device can read and execute the program code stored in the storage medium.

[0205] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.

[0206] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.

[0207] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.

[0208] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or expansion module is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.

[0209] In summary, the present invention provides a terminal device security protection method, device, electronic device and storage medium, and the present invention has at least the following beneficial effects:

[0210] 1. In one embodiment of the present invention, after the terminal device enters the UEFI mode, a detection instruction triggered by the user is obtained, and then the detection instruction is parsed to determine the object to be detected, so that threat detection can be performed on the files in the object to be detected of the current terminal device. Since the above security protection method is performed before loading the operating system, that is, the terminal device already has device access rights and capabilities after entering the UEFI mode, threat detection can be performed on some key data, thereby avoiding attacks on the operating system by firmware exploitation attacks, so as to improve the security protection capability of the terminal device.

[0211] 2. In one embodiment of the present invention, there is no need to use a special detection tool to perform threat detection. It is only necessary to convert the files in the object to be detected of the current terminal device and the files in the object to be detected after the terminal device was last started into audio, so that the data can be indirectly verified by verifying the audio, thereby improving the convenience of threat detection. Among them, the files in the object to be detected after the terminal device was last started are considered to be untampered files.

[0212] 3. The relevant technology requires the use of special detection tools, and the terminal device has an audio encoder. Therefore, it can use its own hardware (i.e., audio encoder) to complete the rendering of audio data (i.e., obtain audio data), so as to facilitate the subsequent use of the audio decoder of the terminal device to play the audio data (i.e., decode). The user can perform threat detection on the files in the object to be detected of the current terminal device based on the playback results, which can help improve the convenience of security protection of the terminal device.

[0213] 4. In one embodiment of the present invention, by utilizing the audio decoder of the terminal device itself to parse the frequency spectra of two audio data, it is possible to quickly determine whether there is a difference in the frequency spectra of the two audio data, and further output the result of whether the file in the object to be detected of the current terminal device has been tampered with with the help of the audio decoder.

[0214] 5. In one embodiment of the present invention, the third audio data and the fourth audio data are obtained by amplifying the audio attribute information that is determined to be different and is the target audio attribute information. In this way, the user can assist in the verification of the files of the two objects to be detected based on the playback results of the third audio data and the fourth audio data, thereby improving the user experience.

[0215] It should be noted that, in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical factors in the process, method, article or device including the elements.

[0216] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, etc., various media that can store program codes.

[0217] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention 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 invention.

Claims

1. A security protection method for terminal equipment, It is characterized in that include: After the terminal device enters the UEFI mode, obtaining a detection instruction triggered by a user; wherein the detection instruction includes at least one of a detection instruction for UEFI firmware, a detection instruction for an EFI boot program, and a detection instruction for a key position of the system; Parsing the detection instruction to determine an object to be detected; wherein the object to be detected includes at least one of UEFI firmware, EFI boot program, and a key position of the system; Performing threat detection on files in the object to be detected of the current terminal device; The performing threat detection on the file in the object to be detected of the current terminal device includes: Obtaining files in the object to be detected after the terminal device was last started; Extracting first data attribute information for characterizing files in the object to be detected of the current terminal device and second data attribute information for characterizing files in the object to be detected after the terminal device was last started; Based on the first data attribute information and the second data attribute information, performing threat detection on files in the object to be detected of the current terminal device; The performing threat detection on the file in the object to be detected of the current terminal device based on the first data attribute information and the second data attribute information includes: Performing data conversion on the first data attribute information and the second data attribute information respectively to obtain first audio attribute information and second audio attribute information; Based on the first audio attribute information and the second audio attribute information, threat detection is performed on files in the object to be detected of the current terminal device.

2. The method according to claim 1, It is characterized in that The first data attribute information and the second data attribute information each include at least one of the following: Data type, data size, creation time, last modification time, last open time, version information, signature information; and / or, The first audio attribute information and the second audio attribute information each include at least one of the following: Instrument type, cycle time, rhythm, spatial distance, frequency of directional changes, harmony, sound effects.

3. The method according to claim 1 or 2, It is characterized in that The performing threat detection on the file in the object to be detected of the current terminal device based on the first audio attribute information and the second audio attribute information includes: Using an audio encoder to render the first audio attribute information and the second audio attribute information respectively to obtain first audio data and second audio data; Playing the first audio data and the second audio data using an audio decoder; Based on the playback result, threat detection is performed on the files in the object to be detected of the current terminal device.

4. The method according to claim 1, It is characterized in that The performing threat detection on the file in the object to be detected of the current terminal device includes: Obtaining a first hash value carried by a file in an object to be detected of the current terminal device; Performing hash calculation on the file in the object to be detected of the current terminal device to obtain a second hash value; Based on the first hash value and the second hash value, threat detection is performed on files in the object to be detected of the current terminal device.

5. The method according to claim 1, It is characterized in that The performing threat detection on the file in the object to be detected of the current terminal device includes: Obtaining a digital signature carried by a file in the object to be detected of the current terminal device; wherein the digital signature is obtained by encrypting a hash value of the file; Decrypting the digital signature using a preset key to obtain a first hash value; Performing hash calculation on the file in the object to be detected of the current terminal device to obtain a second hash value; Based on the first hash value and the second hash value, threat detection is performed on the files in the object to be detected of the current terminal device.

6. A security protection device for terminal equipment, It is characterized in that Based on the method according to any one of claims 1 to 5, comprising: An acquisition module, used to acquire a detection instruction triggered by a user after the terminal device enters the UEFI mode; wherein the detection instruction includes at least one of a detection instruction for UEFI firmware, a detection instruction for an EFI boot program, and a detection instruction for a key position of the system; A parsing module, used to parse the detection instruction and determine an object to be detected; wherein the object to be detected includes at least one of UEFI firmware, EFI boot program and system key position; The detection module is used to perform threat detection on files in the object to be detected of the current terminal device.

7. An electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 5.