A device code risk early warning method, software system and operation device
By comparing the risk code with the software code of the device, the problem of vulnerability analysis and security warning for online hardware devices in the absence of source code and in offline network conditions is solved, realizing risk warning and updates under any network conditions.
Patent Information
- Application Number
- CN202611310149.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-17
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies, in the absence of source code and/or online hardware devices, cannot effectively perform vulnerability analysis and security alerts, especially when the network is offline or packets cannot be simulated, making it impossible to detect specific vulnerabilities.
By collecting device code update requests, obtaining device codes, comparing the components of risk codes with those of software codes, and issuing risk warnings, including risk warnings in offline or abnormal network conditions.
It enables risk warnings for online devices under any network conditions, ensuring the security and reliability of device code.
Smart Images

Figure CN123179409A_ABST
Abstract
Description
[0001] This application is a divisional application. The original application has the application number 202310870728.9 and the original application date is July 17, 2023. The entire contents of the original application are incorporated herein by reference. Technical Field
[0002] This invention relates to the field of code risk warning, and in particular to a device-based code risk warning method, software system, and computing device. Background Technology
[0003] When performing vulnerability detection on an online website server, existing technologies require establishing a network connection to the online server, obtaining the source code of the web page front-end system on the online server, and then comparing the obtained source code with the source code of the patch code to determine whether there are any known or newly discovered vulnerabilities. The online website server itself is also a hardware device, and its operating environment executes a large amount of binary code (e.g., Linux Kernel, Web Server, etc.).
[0004] When performing vulnerability detection on website backend systems and online hardware devices on online servers, since the intermediate code, binary code on the server, and binary code in the hardware device are all unreadable by humans, and the server and hardware device are already online, the current technology involves sending a network packet simulating an attack on the server and hardware device based on a specific vulnerability's behavioral description. After receiving the network packet, the server and hardware device monitor whether their response matches the behavioral description of the specific vulnerability. If they match, it indicates that the online server and hardware device contain the specific vulnerability, thus providing a security warning to the operators of the server and online hardware device.
[0005] When analyzing vulnerabilities and detecting and mitigating risks in online servers and / or hardware devices, the code running on these devices is primarily intermediate or binary code. Without the source code, it's impossible to compare the patched source code with the online system's source code; source code comparison is impossible without it. Furthermore, vulnerability analysis using simulated packets requires network support. In offline or network-unavailable situations, simulated packets cannot be delivered to the tested online server and / or hardware device, making vulnerability analysis and risk monitoring impossible. Additionally, if a specific vulnerability's driver cannot be triggered by simulated packets, that specific vulnerability cannot be detected using simulated packets.
[0006] In summary, in the field of information security risk prevention and control technology, how to perform vulnerability analysis and security early warning for hardware devices that lack source code and / or are not online is an important technical issue. Currently, there is no device code risk prevention and control method, software system, or computing device that can provide vulnerability analysis and security early warning for devices in the absence of source code and / or in an offline network environment. Therefore, such a method and system are urgently needed. Summary of the Invention
[0007] This invention provides a device code risk warning method, software system, and computing device, which are achieved through the following technical solutions: Option 1: A device code risk warning method includes the following steps: Collect an update request for device code, obtain the device code based on the content of the update request, and transmit the device code to a device; the device code includes at least one piece of software code. When a code analysis event corresponding to a risk code is triggered, the risk code is obtained, and the risk code and at least one of the software codes are compared in terms of their component content; When the comparison results show that the at least one piece of software code contains at least one security risk, a risk warning notification is issued.
[0008] Furthermore, issuing a risk warning notification means sending a risk warning notification to at least one of the providers of the device code, the operator of the device, and the manager through at least one network communication channel.
[0009] Furthermore, the device code is provided by a first user, and the collection of update requests is received in response to the release and / or update of the device code; the device is operated by a second user.
[0010] Furthermore, the at least one piece of software code comprises at least one piece of binary code.
[0011] Furthermore, the acquisition of the device code specifically involves acquiring the device code from a storage medium, including: The device code is specified via code version information, and the device code is obtained from the storage medium based on the code version information.
[0012] Furthermore, the code version information is directly specified in the content of the update request, or the code version information that the device needs to update is determined based on a product specification, a hardware specification, and / or a software specification included in the content of the update request.
[0013] Furthermore, the update request is an online update request transmitted over the network.
[0014] Furthermore, the update request includes the network location information of the device, and based on the network location information, the device code is transmitted to the device via the network.
[0015] Furthermore, the risk code and the at least one software code are compared in terms of their constituent content, including: Extract at least one first component feature corresponding to the risk code; Extract at least one second component feature corresponding to the at least one software code; Compare the at least one first component feature and the at least one second component feature.
[0016] Furthermore, the first component feature is obtained by analyzing the code composition content and / or code execution results corresponding to the risk code.
[0017] Furthermore, the code composition includes the risk code and / or the first intermediate code compiled from the risk code, and the code execution result includes the semantic information revealed by the risk code and / or the first intermediate code during the simulated execution process.
[0018] Furthermore, the at least one second component feature is obtained by analyzing the content of at least one code component corresponding to the at least one software code and / or the execution result of at least one code.
[0019] Furthermore, the at least one code component includes at least one binary code and / or at least one second intermediate code after the at least one binary code is decompiled, and the execution result of the at least one code includes the semantic information revealed by the at least one binary code and / or the at least one second intermediate code during the simulated execution process.
[0020] Furthermore, the programming language structure of the intermediate code is declared by an intermediate language, an intermediate representation, a structured language, and / or a structured protocol.
[0021] Furthermore, the types of risky code include patch code, malicious code, and / or any type of code used to fix or create a software vulnerability or software virus.
[0022] Furthermore, the code analysis event corresponding to the risk code is triggered when the risk code is added or updated.
[0023] Furthermore, before the code analysis event is triggered, at least one code analysis event is detected based on a list of at least one software code, and the code analysis event corresponding to the risky code is one of the at least one code analysis events.
[0024] Furthermore, the composition list is obtained by scanning and / or analyzing the composition of the device code when the device code is collected.
[0025] Furthermore, the component list includes metadata of the device code itself and / or metadata of the at least one piece of software code contained in the components of the device code.
[0026] Furthermore, the at least one piece of software code exists in the composition of the device code in the form of a system kernel, driver, application, component, and / or category library.
[0027] Furthermore, the device code is a system image file. The components contained in the system image file are scanned and / or analyzed to identify the at least one piece of software code present in the system image file, thereby obtaining the list of components of the at least one piece of software code. Alternatively, the device code may be a software code package. The components contained in the software code package are scanned and / or analyzed to identify the at least one software code present in the software code package, thereby obtaining the list of components of the at least one software code.
[0028] Furthermore, the risk warning notification includes an instruction to instruct the device and / or the user operating the device to perform the risk code update on the device; or the risk warning notification includes a prompt message to provide a warning about the at least one security risk to the provider of the device code, the operator of the device, and / or the administrator.
[0029] Option 2: A software system for early warning of device code risks includes a collection unit, a code retrieval unit, a comparison unit, and a transmission unit; The collection unit is used to receive device code update requests; The code acquisition unit is used to obtain the device code, which includes at least one piece of software code. The transmission unit is used to transmit the device code to a device and issue a risk warning notification; The comparison unit is used so that when a code analysis event corresponding to a risk code is triggered, the code retrieval unit obtains the risk code and compares the risk code with the device code.
[0030] Furthermore, the comparison unit includes a first feature extraction unit, a second feature extraction unit, and a feature comparison unit; The first feature extraction unit is used to extract at least one first component feature corresponding to the risk code; The second feature extraction unit is used to extract at least one second component feature corresponding to the at least one software code; The feature comparison unit is used to compare at least one first component feature and at least one second component feature.
[0031] Furthermore, the first feature extraction unit or the second feature extraction unit includes at least one analysis unit and at least one extraction unit; The at least one analysis unit is used to analyze the code composition content and / or code execution result corresponding to the risk code to obtain a first component feature, and / or analyze the code composition content and / or code execution result corresponding to the at least one software code to obtain a second component feature; The at least one extraction unit is used to extract the first component features and / or the second component features obtained after analysis.
[0032] Furthermore, it also includes at least one detection unit. The at least one detection unit is used to monitor the risk code login list corresponding to each software code in the at least one software code composition list, and to detect code analysis events by monitoring the anomalies in the risk code login list.
[0033] Option 3 A computing device for device code risk warning includes a collection unit, a code acquisition unit, a comparison unit, and a transmission unit; The collection unit is used to receive device code update requests; The code acquisition unit is used to obtain the device code from a storage medium, the device code including at least one piece of software code; The transmission unit is used to transmit the device code to a device and issue a risk warning notification; The comparison unit is used so that, when a code analysis event corresponding to a risk code is triggered, the code retrieval unit obtains the risk code from the storage medium and / or another storage medium, and compares the risk code with the device code.
[0034] This design has the following advantages: The present invention updates the device code containing at least one piece of software code to an online device, compares the risk code with the components of the device code, and issues a risk warning to the device, regardless of whether the device is offline or the network status is normal. Attached Figure Description
[0035] Figure 1 This is a flowchart of a device code risk warning method according to the present invention; Figure 2 This is a structural block diagram of a software system for device code risk warning according to the present invention; Figure 3 This is a flowchart comparing the risk code of this invention with the component content of at least one software code.
[0036] Figure 4 It is a flowchart of a device code risk warning method based on a list of at least one piece of software code before a code analysis event is triggered.
[0037] Figure 5 This is a structural block diagram of a computing device for device code risk warning according to the present invention; In the diagram, 1 is the software system; 2 is the collection unit; 3 is the code extraction unit; 4 is the comparison unit; 5 is the transmission unit; 6 is the first user; 7 is the second user; 8 is the device; 9 is the storage medium; 80 is the device code; 11 is the computing device; 21 is the collection unit; 31 is the code extraction unit; 41 is the comparison unit; and 51 is the transmission unit. Detailed Implementation
[0038] This invention will be more fully understood through the following description, including the following glossary of terms and concluding examples. For the sake of brevity, publications referenced in this specification, including patent disclosures, are incorporated herein by reference.
[0039] The following are detailed descriptions of embodiments. These embodiments are not limiting and merely represent various forms and features of the invention. They are used only as illustrative examples and do not limit the scope of protection intended by the invention. Furthermore, the drawings in the embodiments omit unnecessary components or components that can be accomplished with ordinary techniques to clearly demonstrate the technical features of the invention.
[0040] In its most limited technical sense, the term "software code" as used herein comprises any binary code, intermediate code, and / or any computer program code written in a computer programming language for loading and execution. The term "device code" as used herein refers to code used to run on a device and provide logical operations and services to that device. This device code consists of binary code, intermediate code, and / or any computer program code written in a computer programming language; that is, the device code contains at least one piece of software code, which exists in the component form of the device code as a component including a system kernel, driver, application program, component, and / or class library. The term "binary code" as used herein can include any code represented in binary format. The term "intermediate code" as used herein can include any code represented by a structure declared by an intermediate language, intermediate representation, structured language, and / or structured protocol; for example, Java Bytecode represented according to a format defined by an intermediate representation, and LLVM bitcode derived from binary code, are both types of intermediate code and can be considered as intermediate code. The "risk code" described herein comprises any type of binary code, intermediate code, and / or any type of computer program code written in a computer programming language for loading and execution. The types of risk code include patch code, malicious code, and / or any code used to correct or create a software vulnerability or software virus. The "metadata" described herein, also known as interpretive data, intermediate data, or metadata, is data describing an object or related information about that object. The "risk code registry" described herein may include any list registered, recorded, and / or represented according to a structure declared by a structured language and / or structured protocol. This list may be stored and published in the form of a file, database, and / or webpage. The content of the list includes registry information for the risk codes described herein, including the content of the risk code itself, the metadata of the risk code, and the software vulnerability or software virus information corresponding to the risk code. The CVE (Common Vulnerabilities and Exposures) repository is one implementation of the risk code registry described herein, but is not limited thereto. The "semantic information" mentioned in this article may include, during the execution of a code in a simulated manner, the values retrieved from memory and / or intermediate variables, the execution history of each instruction during the execution process, the output / input values of functions, and / or any kind of numerical information that can be extracted.All or part of the semantic information of two codes can be used as component features for comparison. The similarity between the two codes is determined by the degree of agreement between the comparisons.
[0041] Furthermore, the "collection unit," "code extraction unit," "transmission unit," "comparison unit," "first feature extraction unit," "second feature extraction unit," "feature comparison unit," "analysis unit," "extraction unit," and "detection unit" described herein are processing units that provide logical operations or services. The implementation of the processing unit may include a category library, software component, software agent program, application program, any program block that can be built into, installed, introduced, or extended into the "software system or computing device that provides device code risk warning" described herein, or any integrated circuit unit designed in a hardware description language that can be embedded in the "computing device that provides device code risk warning" described herein.
[0042] The "software system providing device code risk warning" described herein may include a system firmware, application program, software engine, operating system, or any software platform that can be extended by the program. In a preferred embodiment, the "software system providing device code risk warning" described herein can be deployed and run on the same machine, that is, all the collection unit, code extraction unit, transmission unit, comparison unit, first feature extraction unit, second feature extraction unit, feature comparison unit, analysis unit, extraction unit, and detection unit described herein are integrated into the same software system, and the software system is deployed and run on a single machine. In another preferred embodiment, the "software system for providing device code risk warning" described herein can be implemented through the collaboration of multiple machines. That is, the processing units described herein, such as the collection unit, code extraction unit, transmission unit, comparison unit, first feature extraction unit, second feature extraction unit, feature comparison unit, analysis unit, extraction unit, and detection unit, are provided to different machines. The processing units in different machines interact with each other through connection methods including the Internet, WiFi, and Bluetooth, and are thus integrated into a software system for providing device code risk warning through multiple machines.
[0043] The "computing device for providing device code risk warnings" described herein may be implemented as a network communication device, a server, or any information and communication device with networking, data processing, or control capabilities. In a preferred embodiment, the "computing device for providing device code risk warnings" described herein may be implemented in a single machine, that is, all the collection unit, code extraction unit, transmission unit, comparison unit, first feature extraction unit, second feature extraction unit, feature comparison unit, analysis unit, extraction unit, and detection unit described herein may be integrated into the same machine as the computing device for providing device code risk warnings. In another preferred embodiment, the "computing device for providing device code risk warning" described herein can be implemented through the collaboration of multiple machines. That is, the processing units described herein, such as the collection unit, code extraction unit, transmission unit, comparison unit, first feature extraction unit, second feature extraction unit, feature comparison unit, analysis unit, extraction unit, and detection unit, are provided to different machines. The processing units in different machines can interact and collaborate with each other through connection methods including the Internet, WiFi, and Bluetooth, thereby integrating multiple machines into a computing device for providing device code risk warning.
[0044] Continuing from the above, in a preferred embodiment, the "collection unit," "code extraction unit," "transmission unit," "comparison unit," "first feature extraction unit," "second feature extraction unit," "feature comparison unit," "analysis unit," "extraction unit," and "detection unit" described herein may be implemented individually in different processing units. In another preferred embodiment, at least two of the "collection unit," "code extraction unit," "transmission unit," "comparison unit," "first feature extraction unit," "second feature extraction unit," "feature comparison unit," "analysis unit," "extraction unit," and "detection unit" described herein may also be implemented within the same processing unit.
[0045] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0046] like Figure 1 The diagram shown is a preferred flowchart of a device code risk warning calculation according to the present invention. The method for device code 80 risk warning includes: S1. Collect an update request for a device code 80, obtain the device code 80 from a storage medium 9 according to the content of the update request, and transmit the device code 80 to a device; the device code 80 contains at least one piece of software code. S2. When a code analysis event corresponding to a risk code is triggered, the software system 1 obtains the risk code from the storage medium 9 and / or another storage medium 9, and compares the risk code with the content of the at least one software code. S3. When the comparison results show that at least one piece of software code contains at least one security risk, a risk warning notification is issued.
[0047] like Figure 2 The diagram shows a structural block diagram of a software system 1 for risk warning of device code 80 according to the present invention. A preferred embodiment of the device code risk warning operation is provided. In this system, the first user 6 is a user of the software system 1, and the second user 7 is the operator or manager of the device 8; the collection unit 2, the code retrieval unit 3, the comparison unit 4, and the transmission unit 5 are processing units integrated into the software system 1; the storage medium 9 is memory, an external storage device, a database, or any storage device capable of storing device code 80 or risk code; the device code 80 is code used to run on the device 8 and provide logical operations and services to the device 8.
[0048] In one preferred embodiment, the second user 7 is a user of the software system 1, and manages the device 8 by registering the device 8's metadata with the software system 1. The device 8's metadata includes its network location information, product specifications, hardware specifications, and / or software / firmware specifications. In another preferred embodiment, the second user 7 is merely the operator of the device 8, and the device 8's metadata is registered with the software system 1 by its system administrator, who then acts as the manager of the device 8.
[0049] In a preferred embodiment, the first user 6 is the developer of the device 8. The first user 6 provides the device code 80 to the software system 1 through a human-machine interface. When the first user 6 provides the device code 80 to the software system 1, the first user 6 can input relevant information about the device code 80 on the human-machine interface and provide this relevant information, along with the device code 80, to the software system 1 through the human-machine interface. The relevant data includes the code version information of the device code 80, as well as the product specifications, hardware specifications, and / or firmware specifications of the device 8 that the device code 80 supports for updating.
[0050] In a preferred embodiment, the software system 1 stores the device code 80 and its related data (including the code version information of the device code 80, and the product specifications, hardware specifications, and / or software and firmware specifications of the device 8 that the device code 80 supports updating) in the storage medium 9, thereby completing the registration of the device code 80 in the software system 1.
[0051] In a preferred embodiment, the collection unit 2, the code extraction unit 3, the comparison unit 4, and the transmission unit 5 are processing units integrated into the software system 1. Each processing unit can provide at least one function to realize interaction with other processing units. When a processing unit needs to send a request to another processing unit, it can use the content of the request as a parameter and input the content of the request to the other processing unit in the form of a function call. After receiving the content of the request, the other processing unit can provide services for the request based on the content of the request. In another preferred embodiment, each processing unit can also interact with other processing units via network connection or inter-process communication. When a processing unit needs to send a request to another processing unit, it can establish a TCP / UDP socket connection with the other processing unit and transmit the request content to the other processing unit through a pre-agreed communication protocol. Alternatively, it can send the request content to the other processing unit through an inter-process communication mechanism implemented with partial memory sharing, so that the other processing unit can receive the request content and provide services for the request based on the request content. The implementation of how a request is provided to a processing unit and how the processing unit receives the request is not limited thereto. Those skilled in the art can make any equivalent design changes according to actual application needs.
[0052] After the software system 1 completes the registration of device code 80, in a preferred embodiment, the software system 1 can search for devices 8 registered in the software system 1 based on the product specifications, hardware specifications, and / or firmware specifications supported by device code 80. If the product specifications, hardware specifications, and / or firmware specifications of device 8 match the specifications supported by device code 80, the software system 1 can generate an update request for device 8. This update request is for updating device code 80 and is provided to the collection unit 2. In another preferred embodiment, when the first user 6 provides device code 80 to the software system 1 through the human-machine interface, the update request for device 8 can be directly input into the human-machine interface and provided directly to the software system 1. After receiving the update request, the software system 1 can provide the update request to the collection unit 2. In another preferred embodiment, the collection unit 2 can receive requests via a network connection. In this case, the first user 6 can establish a TCP / UDP socket connection to the collection unit 2 through any other software system 1, and transmit and provide the update request for device 8 to the collection unit 2 via the network connection in the form of an online update request. In another preferred embodiment, the software system 1 sends a notification to device 8 via a network connection, notifying device 8 that a new device code 80 has been registered to the software system 1, and includes the code version information of device code 80 in the notification content. After receiving the notification, device 8 can generate an update request containing the code version information according to the content of the notification, establish a network connection to the collection unit 2 in the form of an online update request, and provide the online update request to the collection unit 2 via network transmission. In another preferred embodiment, the software system 1 does not need to include the code version information in the notification to the device 8. After receiving the notification, the device 8 can generate an update request. The update request includes the product specifications, hardware specifications, and / or software specifications of the device 8. The update request is then transmitted to the software system 1 via a network connection. After receiving the update request, the software system 1 can determine the code version information of the device code 80 that matches the product specifications, hardware specifications, and / or software specifications based on the content of the update request. After adding the code version information to the content of the update request, the update request is provided to the collection unit 2.
[0053] In a preferred embodiment, after completing the login of device code 80, software system 1 does not need to issue any notification to device 8. Device 8, operated by the second user 7, periodically sends online update requests to software system 1 via network connection. The content of the update request includes the product specifications, hardware specifications, and / or software specifications of device 8. The request is transmitted to software system 1 via network connection. After receiving the update request, software system 1 can determine the code version information of device code 80 that matches the product specifications, hardware specifications, and / or software specifications by comparing the content of the update request. When device code 80 is the device code 80 that needs to be updated, software system 1 can add the code version information to the content of the update request and provide the update request to collection unit 2. In another preferred embodiment, the second user 7, as the operator of the device 8, can also generate an update request for the device 8 through another software system 1. The update request includes the product specifications, hardware specifications, and / or software and firmware specifications of the device 8, and transmits the update request to the software system 1 through a network connection.
[0054] In summary, the generation and transmission of update request content, as well as the method of collection of update requests by collection unit 2, are not limited thereto. Those skilled in the art can make any equivalent changes based on actual application needs.
[0055] Furthermore, the device code 80 is provided by the first user 6. The device code 80 is logged into the software system 1. It can be a device code 80 issued for a new device 8, a device code 80 updated for an old device 8, or a device code 80 updated and issued for an existing device 8 that has just been registered in the software system 1. The device code 80 includes at least one piece of software code, including at least one piece of binary code.
[0056] In a preferred embodiment, the device 8 is operated by a second user 7. The device 8 is an embedded system device, a server device, an IoT sensing device, a network communication device, or any network-enabled computer device.
[0057] In a preferred embodiment, the update request includes the network location information of device 8. This network location information is entered into the update request by software system 1 based on the metadata of device 8 registered in software system 1; or the update request is generated by device 8, and device 8 enters its own network location information when generating the update request.
[0058] In a preferred embodiment, after the collection unit 2 collects an update request for device code 80, it can send a request to the code retrieval unit 3, requesting the code retrieval unit 3 to retrieve the device code 80 that matches the code version information from the storage medium 9, i.e., the device code 80 specified by the code version information, based on the code version information in the update request content. After obtaining the device code 80, it can send a request to the transmission unit 5, requesting the transmission unit 5 to establish a TCP / UDP Socket connection to the device 8 based on the network location information of the device 8 contained in the update request content. Through the Socket connection and the agreed communication protocol, the device code 80 is transmitted to the device 8, and the update of the device code 80 is completed on the device 8, making the device code 80 the code executed when the device 8 is running online.
[0059] The aforementioned device code risk warning calculation enables the first user 6 to update the device code 80 of the device 8 operated by the second user 7 through the software system 1, making the device code 80 the code executed when the device 8 is online. When the device 8 is offline, the software system 1, which performs the device code risk warning calculation, can provide a risk warning for the device code 80. Under this method, even when the device 8 is online, the software system 1 can still provide a risk warning for the device code 80; that is, both online and offline scenarios are included in the device code risk warning calculation.
[0060] The software system 1 in S1 obtains the device code 80 from the storage medium 9 based on the code version information corresponding to the device code 80. Furthermore, the code version information is directly specified in the content of the update request, or the software system 1 determines the code version information that the device 8 needs to update based on a product specification, a hardware specification, and / or a software and firmware specification contained in the content of the update request.
[0061] like Figure 2 If the update request is issued by the first user 6, the first user 6 can obviously directly fill in the version information of the device code 80 in the update request. After receiving the update request, the software system 1 can directly obtain the device code 80 from the storage medium 9 based on the version information in the update request content. However, if the update request is issued by the second user 7 or the device 8, then the second user 7 and the device 8 will not know what the latest version information of the device code 80 provided by the first user 6 is. The second user 7 only knows the device 8 it operates, as well as the product specifications, hardware specifications, and / or software and firmware specifications of the device 8 itself.
[0062] Therefore, when the update request issued by the second user 7 and device 8 includes the product specifications, hardware specifications, and / or firmware specifications of device 8 itself, but does not include the latest version information of device code 80, when the update request from the second user 7 and device 8 is delivered to software system 1, software system 1 can determine which version of device code 80 is used by device 8 based on the product specifications, hardware specifications, and / or firmware specifications transmitted by the second user 7 and device 8. If the product specifications, hardware specifications, and / or firmware specifications supported by device code 80 match the product specifications, hardware specifications, and / or firmware specifications in the update request, it can be determined that device code 80 is the device code 80 required by the second user 7 and device 8.
[0063] In a preferred embodiment, to enable the software system 1 to compare different versions of device code 80 and determine which one to use, the product specifications, hardware specifications, and / or software / firmware specifications supported by different versions of device code 80 can be recorded in the storage medium 9 or other databases or media accessible by the software system 1 when logging into device code 80. This allows the software system 1 to compare different versions of device code 80, determine the version information suitable for the second user 7 device 8, and then retrieve the device code 80 specified by the version information.
[0064] In S1, update requests are online update requests transmitted over the network.
[0065] In a preferred embodiment, the online update request transmitted via the network, also known in the traditional sense as OTA online code update, basically involves device 8 connecting to a server, obtaining the latest code from the server, and then performing the update. The server and the software system 1 running on the server do not need to know the network location information of device 8. That is, device 8 establishes a network connection to the software system 1, which provides network access, based on the network location information of software system 1, and sends an update request to software system 1. Subsequently, it directly obtains device code 80 from software system 1 via the same network connection. Alternatively, device 8 establishes a network connection to the collection unit 2, which provides network access, based on the network location information of software system 1, sends an update request to collection unit 2, and then establishes another network connection to transmission unit 5, obtaining device code 80 from transmission unit 5 via the other network connection. The method of using the network connection established by device 8 to implement the OTA online code update and code retrieval is not limited to this; those skilled in the art can make any equivalent modifications according to actual application requirements.
[0066] For the OTA online update method of the aforementioned code, device 8 must know the server's URL location information. Therefore, the software system 1 of this case also provides the following improved methods for the OTA update of the code via online update requests transmitted over the network: The update request contains the network location information of the device 8 operated by the second user 7. The software system 1 transmits the device code 80 to the device 8 operated by the second user 7 via the network based on the network location information.
[0067] This improved method can be used in the following scenarios: Device 8 does not need to know the network location information of software system 1 and its server. Software system 1 updates device code 80 for device 8 via push. In a preferred embodiment, the network location information of device 8 is generated by software system 1 after receiving an update request from the first user 6 or the second user 7, or after the new device code 80 is logged in. In either case, software system 1 can write the network location information of device 8 into the update request based on the metadata of device 8 registered in software system 1. The transmission unit 5 establishes a network connection to device 8 based on the network location information in the update request and transmits device code 80 to device 8 for update. In this asynchronous method of updating device code 80, the sending of the update request and the receiving of device code 80 are accomplished through two connections with different connection objects, which is different from the traditional method where device 8 establishes a connection to software system 1 and then downloads through the connection between device 8 and software system 1.
[0068] In fact, the above scenario eliminates the need for device 8 itself to download the device code 80 update. First user 6, second user 7, or other users, with permitted permissions, can all send an update request to software system 1 using the improved method described above. Subsequently, software system 1 establishes a connection to device 8 based on its network location information and then actively transmits device code 80 to it to complete the update. In a preferred embodiment, the update request does not necessarily need to include device 8's network location information. Software system 1 queries a database to retrieve the metadata of device 8 registered in software system 1. After obtaining the network location information of device 8 from the metadata, it sends a request to transmission unit 5, requesting transmission unit 5 to transmit device code 80 to device 8 based on the network location information obtained from device 8's metadata.
[0069] The network location information can be simply an IP address. The software system 1 and device 8 share a default communication protocol (the port supported by default by device 8) for transmitting device code 80. In this case, software system 1 only needs to know the IP address of device 8 to actively connect and transmit the updated device code 80. Alternatively, the network location information can be an IP address plus a port, meaning it includes the specified network communication protocol. In this case, software system 1 and device 8 do not need any default network communication protocol. Software system 1 can also establish a connection between devices and transmit the updated device code 80 based on the IP address (location) plus the port (communication protocol). The method of asynchronously updating device code 80 is not limited to this; those skilled in the art can make any equivalent design changes based on actual application requirements.
[0070] In one preferred embodiment, the device code 80 provided by the first user 6 is provided to the software system 1 in the form of software code wrapped in a package; the software code wrapped in a package may include a compressed file containing all the software code contained in the device code 80. In another preferred embodiment, the device code 80 provided by the first user 6 is provided to the software system 1 in the form of a system image file, the system image file containing all the software code contained in the device code 80.
[0071] In a preferred embodiment, regardless of whether it is in the form of a system image file or a software code package, when the software system 1 receives the device code 80, it can scan all the software code contained in the device code 80. First, the system image file containing the device code 80 is mounted to memory or a sector partitioned from the hard disk memory (if it is a zImage, its contents can be decompressed to a folder), or the software code package containing the device code 80 is decompressed to a designated folder in the hard disk memory. Then, the file and directory of the mounted sector or the folder can be traversed using the file system, that is, the components contained in the system image file and the software code package are scanned. Based on the traversal results, after understanding the file and directory structure of the device code 80, it can be compared with the file and directory structures of known operating system kernels, drivers, applications, common software components and / or category libraries to identify the operating system kernels, drivers, applications, common software components and / or category libraries whose file and directory structures match. Following the above procedure, after collecting device code 80, software system 1 can scan and analyze a list of software codes contained in device code 80. The list may consist of metadata (data describing information related to the software code, such as the name of each software code) of each software code existing in the form of operating system kernel, driver, application, common software components and / or category library, etc. The content of the list may also include metadata of device code 80 itself (data describing information related to device code 80).
[0072] In a preferred embodiment, based on the list of at least one software code included in the device code 80, the software system 1 can monitor the CVE list corresponding to each software code in the list (e.g., for the Linux Kernel, monitoring the CVE list corresponding to the Linux Kernel), and detect code analysis events by monitoring changes in the CVE list. A code analysis event is triggered when a vulnerability is added to the list, a patch for that vulnerability is provided and added to the vulnerability record, or the patch for that vulnerability is updated, causing changes in the list's contents. The patch is one type of risky code, but not limited to it. For any type of malicious software code within a risky code, those skilled in the art can make any equivalent design changes based on actual application requirements. The code analysis event corresponding to the risky code is triggered when the risky code is added or updated, and the triggered event is received by the comparison unit 4. The CVE list is one implementation of the risk code login list described in this article, and is not limited thereto. Those skilled in the art can provide any equivalent design changes to different forms of risk code login lists according to actual application needs.
[0073] In a preferred embodiment, after device 8 completes the update of device code 80, when a patch code is added or updated, a code analysis event corresponding to the patch code is triggered. Software system 1 transmits the code analysis event to comparison unit 4. When comparison unit 4 receives the code analysis event, it requests code retrieval unit 3 to retrieve the patch code from storage medium 9 storing the patch code. The storage medium 9 may be the same storage medium 9 as the storage medium 9 storing device code 80, or it may be a different storage medium 9. In another preferred embodiment, when software system 1 detects that a patch code has been added or updated, it can first retrieve the source code of the patch code stored in another storage medium 9 and compile it. The compiled result (binary code or intermediate code) is then stored in storage medium 9. In this case, the pre-compiled result can be considered part of the overall patch code. Comparison unit 4 then retrieves the entire patch code (including source code, binary code, and / or intermediate code) from storage medium 9 and the other storage medium 9. The methods described above for monitoring and retrieving risk codes from the login list are not limited to these methods. Those skilled in this art can make any equivalent modifications based on actual application needs.
[0074] In a preferred embodiment, after the comparison unit 4 retrieves the patch code, it can compare the content of the patch code and at least one corresponding software code in the device code 80. When the comparison result shows that the at least one software code contains at least one security risk, it can request the transmission unit 5 to issue a risk warning notification regarding the security risk.
[0075] In a preferred embodiment, the issuance of the risk warning notification means sending a risk warning notification to at least one of the following: the provider of the device code 80 (first user 6), the operator of the device 8 (second user 7), and the administrator (second user 7 or the administrator of the software system 1) through at least one network communication channel, such as email, mobile push notification, or mobile SMS notification. The risk warning function is based on the fact that patch code is one type of risk code. The existence of patch code indicates that there is a corresponding known or newly discovered vulnerability in the software code contained in device code 80. The patch code is the code that corrects the vulnerability. If the comparison between the patch code and the software code shows that the software code does not contain the patch code, it means that the vulnerability still exists in device code 80. Unscrupulous individuals can use the vulnerability to attack device 8, which is executing device code 80 and is running online. In other words, the existence of the vulnerability poses a risk to the first user 6, the second user 7, or any other third party. The risk warning notification is a pre-warning notification to relevant individuals regarding this risk, thereby achieving risk control of device code 80.
[0076] In a preferred embodiment, when the risk code is malicious code, the malicious code represents code with a known vulnerability. That is, if the comparison result between the malicious code and the software code shows that the software code still contains the malicious code, it means that the vulnerability still exists in the device code 80, and a risk warning notification needs to be issued.
[0077] Regarding the "components of software code" and "components of risky code" mentioned herein, the "components" refer to "program instructions contained in the code's code components," "the storage structure of the code in memory," and "the environment settings and configuration data required to execute the code." The code's code components include any type of binary code, intermediate code, and / or any type of computer program code written in a computer programming language for loading and execution. Furthermore, the "security risks" mentioned herein include the risk of the code containing vulnerabilities, viruses, and / or malware, and / or any risk that causes the code to perform unpredictable logical operations. The method of scanning for security risks by comparing risky code and software code described above is not limited to this; those skilled in the art can make any equivalent modifications based on actual application needs.
[0078] like Figure 3 As shown, the comparison of the risk code and the at least one software code in S2 includes the following steps: S21. Extract at least one first component feature corresponding to the risk code; S22. Extract at least one second component feature corresponding to the at least one software code; S23. Compare at least one first component feature and at least one second component feature.
[0079] Furthermore, the first component feature in S21 is obtained by analyzing the code composition content and / or code execution result corresponding to the risk code; wherein, the code composition content includes the risk code and / or the first intermediate code compiled from the risk code, and the code execution result includes the semantic information revealed by the risk code and / or the first intermediate code during the simulated execution process.
[0080] Furthermore, the at least one second component feature mentioned in S22 is obtained by analyzing the at least one code component content and / or the at least one code execution result corresponding to the at least one software code; wherein, the at least one code component content includes at least one binary code and / or at least one second intermediate code after the at least one binary code is decompiled, and the at least one code execution result includes the semantic information revealed by the at least one binary code and / or the at least one second intermediate code during the simulated execution process when the at least one binary code and / or the at least one second intermediate code is simulated.
[0081] Furthermore, the programming language structure of the first intermediate code and / or the at least one second intermediate code is declared by an intermediate language, an intermediate representation, a structured language, and / or a structured protocol.
[0082] The types of risky code mentioned in S2 include a patch code, malicious code, and / or any type of code used to fix or create a software vulnerability or software virus associated with the at least one software code.
[0083] The code analysis event for the risk code in S2 is triggered when the risk code is added or updated to a risk code login list.
[0084] like Figure 4 As shown, before the code analysis event in S2 is triggered, the process further includes: the software system 1 detecting at least one code analysis event based on a list of components of the at least one software code. In S2, the code analysis event corresponding to the risk code is one of the at least one code analysis events.
[0085] like Figure 2 The device code 80 of device 8 can be composed of software code of different types, including system kernel, drivers, applications, components, and / or class libraries. The content of each software code may include scripts, binary code, and / or intermediate code. Therefore, at least one piece of software code can be understood as a part of device code 80. And the content of at least one code component can be understood as a part of said at least one piece of software code.
[0086] The software code contained in a device 8 is generally comprised of a manifest, which may include components such as the Linux Kernel, OpenSSL, and SQLite. As these components are continuously tested, vulnerabilities are discovered and corresponding patches are released, which are then added to or updated to the CVE repository and Git Hub.
[0087] When these vulnerabilities and patch codes are added or updated to the CVE list and GitHub by the relevant unit or organization, the software system 1 described herein will not be notified. Therefore, for code analysis events to be triggered, it means that before triggering, software system 1 should monitor the CVE lists such as Linux Kernel, OpenSSL, and sqlite, as well as GitHub, according to the component list of device code 80, in order to detect these code analysis events.
[0088] The resulting technical effect is that the software system 1 can immediately perform code security detection of device code 80 when a vulnerability and patch code are added or updated to a list of risky codes on the network (e.g., a CVE list).
[0089] Furthermore, the composition list is obtained by the software system 1 scanning and / or analyzing the composition of the device code 80 when the device code 80 is provided to the software system 1.
[0090] Device code 80 can be a single .o file (object file), .img file (system image file), .so file (library file), or a .zip or .gz compressed file (containing the .o and .so files required for the entire device, and also containing the path structure of these files in the compressed file).
[0091] Taking the overall device code 80 of a device 8 as an example, it contains many software code files. These software code files are combined within the device code 80 in the form of different components (e.g., Linux Kernel, OpenSSL, SQLite, etc.). Each software code file exists in a different path location. There are different ways to obtain the component list of the software code contained in the device code 80. One method is to scan the entire device code 80 based on file path information. As different components, their related files will be placed in different locations, thus basically determining which components are contained in the device code 80. Another method is to read the contents of each software code file and compare them to see if there are any characteristics of specific components to determine the component list. For example, when reading the code component content of a software code file, it can be compared with known code segments of known software such as Linux Kernel, OpenSSL, and SQLite. Based on the comparison results, the components contained in the device code 80 can be determined. The method of scanning and / or analyzing the components of device code 80 to obtain a list of the components of each software code in device code 80 is not limited thereto, and those skilled in the art can make any equivalent design changes according to actual application requirements.
[0092] In a preferred embodiment, the patch code comprises a file written in JavaScript containing JavaScript code. The patch code corrects a vulnerability in software code contained in device code 80. The comparison unit in software system 1 first locates the position of the JavaScript file corresponding to its name within the software code's content using the filename. After reading the contents of both the patch code's JavaScript file and the corresponding JavaScript file of the software code, the two files are compared to see if they contain the corrected code fragment. The corrected code fragment is used as the comparison feature. A matching comparison indicates that the software code does not contain the vulnerability; a mismatch indicates that the software code contains the vulnerability.
[0093] In a preferred embodiment, the component features used for comparison, besides using segments contained in the code as features, can also be the storage structure of the patch code and software code in memory, and / or the environment settings and configuration information of the patch code and software code. For example, if a patch code adds a new file whose filename does not exist in the corresponding software code, and / or the patch code adds a new parameter in the environment settings and configuration that does not exist in the corresponding software code, then the software code does not contain the patch code, and therefore the software code still contains the vulnerability corresponding to the patch code.
[0094] Following the example above, the code snippets, filename structures, and / or configuration content of the patch code used for comparison constitute the first component feature in the component content comparison. The code snippets, filename structures, and / or configuration content of the software code used for comparison constitute the second component feature in the component content comparison. The method of comparison based on component features derived from analyzing the code components is not limited to this, and those skilled in the art can make any equivalent modifications according to actual application needs.
[0095] In a preferred embodiment, the code components of a software code include a first file containing binary code, and the filename of the first file and its relative position in the storage structure correspond to a second file containing C / C++ source code within a patch code. The second file contains code for fixing a vulnerability. In this case, the first file is first disassembled into first intermediate code (code represented using LLVM's IR as the intermediate code representation), and the second file is also compiled and then disassembled into second intermediate code (code represented using LLVM's IR as the intermediate code representation). Then, simulation execution can be performed on the first and second intermediate codes; that is, by reading the program instructions from the first and second intermediate codes, feeding in simulation parameters, and performing logical operations according to the read program instructions. After all program instructions have been executed, the semantic information revealed during the simulated execution can be obtained based on the execution history of each instruction, the output and input of function calls, and / or the execution order. Here, "semantic information" as described herein includes the values of memory and / or intermediate variables during program execution, and / or the instructions, functions, and their output and input values called during the simulated execution. A similarity score is obtained by comparing the semantic information of the first intermediate code and the semantic information of the second intermediate code. Based on this similarity score, it can be determined whether the code segments of the first and second intermediate codes match, and further, whether the first file contains the code in the second file used to correct the vulnerability. Specifically, if the component features constituted by all the content of the semantic information of the first and second intermediate codes are completely contained within each other's semantic information, the similarity can be considered 100%. If only a portion of the component features are contained within each other's semantic information, the proportion of that portion to the total content is considered its similarity. Based on this, similarity results from 0% to 100% can be obtained. A similarity score exceeding a set threshold indicates that the first file contains code from the second file. The threshold is a reference value used to determine whether the code of the second file is contained in the code of the first file. For example, if the threshold is set to 90%, it means that if the similarity is higher than 90%, the first file contains the code of the second file, and vice versa.
[0096] In a preferred embodiment, the code components of a software code include a first file containing intermediate code (Java bytecode), and the filename of the first file and its relative position in the storage structure can correspond to a second file containing Java source code included in a patch code. The second file contains code for fixing a vulnerability. In this case, after the second file is compiled into intermediate code (Java bytecode), its semantic information is obtained through simulated execution. Then, by comparing the values retrieved from memory and / or intermediate variables contained in the semantic information, and / or the characteristics of the instructions, functions, and their output and input values called during simulated execution, it can be determined whether the first file contains the code in the second file used to fix the vulnerability.
[0097] The method described above for comparing the component features of semantic information obtained by simulation is not limited to this, and those skilled in the art can make any equivalent changes according to actual application needs.
[0098] S3 describes issuing a risk warning along with an instruction, which instructs the device 8 and / or a user operating the device 8 to perform the risk code update on the device 8; or the risk warning notification includes a prompt message, which provides the first user 6, the second user 7, and / or the system administrator with a warning about the at least one security risk.
[0099] The advantage of this technology lies in the fact that the risk warning notification can include an instruction that, when a security risk occurs in device 8, directly instructs device 8 to immediately update the risk code and patch the vulnerability. The reason our technical solution can achieve this benefit is that it targets the component analysis of binary code. That is, when we detect a vulnerability in device code 80, we already have the binary code (risk code) to patch that vulnerability, so we can notify device 8 to update the risk code immediately.
[0100] like Figure 5 As shown, this embodiment also provides a device code risk warning calculation device 11, including a collection unit 21, a code acquisition unit 31, a comparison unit 41, and a transmission unit 51; The collection unit 21 is used to receive update requests from device code 80; The code acquisition unit 31 is used to obtain the device code 80 from a storage medium 9, the device code 80 including at least one piece of software code; The transmission unit 51 is used to transmit the device code 80 to a device 8 and issue a risk warning notification.
[0101] The comparison unit 41 is used to, when a code analysis event corresponding to a risk code is triggered, retrieve the risk code from the storage medium 9 and / or another storage medium 9, and compare the risk code with the device code 80.
[0102] If the comparison results show that the at least one piece of software code contains at least one security risk, the transmission unit 51 is also used to issue a warning notification. The transmission unit 51 issues a risk warning notification to at least one of the providers of the device code 80, the operators of the device 8, and the managers through at least one network communication channel.
[0103] In a preferred embodiment, the computing device 11 is an embedded device. The collection unit 21, the code acquisition unit 31, the comparison unit 41, and / or the transmission unit 51 are integrated into the embedded system of the computing device 11 as integrated circuit units designed in a hardware description language or as software code. The collection unit 21, the code acquisition unit 31, the comparison unit 41, and the transmission unit 51 are driven by the embedded system running in the computing device 11.
[0104] In another preferred embodiment, the computing device 11 is a server, and the collection unit 21, the code acquisition unit 31, the comparison unit 41 and / or the transmission unit 51 are integrated into a software system 1 in the form of software code. The software system 1 is provided to the computing device 11 for operation by means of built-in or installation, and the collection unit 21, the code acquisition unit 31, the comparison unit 41 and the transmission unit 51 are driven by the software system 1 running in the computing device 11.
[0105] In another preferred embodiment, the computing device 11 is composed of distributed servers. The collection unit 21, the code acquisition unit 31, the comparison unit 41, and / or the transmission unit 51 are integrated into a distributed software system 1 in the form of software code. The distributed software system 1 is deployed and runs on the distributed servers to form a computing device 11. The collection unit 21, the code acquisition unit 31, the comparison unit 41, and the transmission unit 51 are driven by the distributed software system 1 running in the computing device 11.
[0106] The above-described methods of combining different forms of hardware and software to form the computing device 11 are not limited thereto, and those skilled in the art can make any equivalent design changes according to actual application needs.
[0107] Furthermore, in combination Figure 3 The comparison unit 41 includes a first feature extraction unit, a second feature extraction unit, and a feature comparison unit; The first feature extraction unit is used to extract at least one first component feature corresponding to the risk code; The second feature extraction unit is used to extract at least one second component feature corresponding to the at least one software code; The feature comparison unit is used to compare at least one first component feature and at least one second component feature.
[0108] Furthermore, the first feature extraction unit or the second feature extraction unit includes at least one analysis unit and at least one extraction unit; At least one analysis unit is used to analyze the code composition content and / or code execution result corresponding to the risk code to obtain a first component feature, and / or analyze the code composition content and / or code execution result corresponding to the at least one software code to obtain a second component feature; At least one extraction unit is used to extract the first component feature or the second component feature obtained after analysis.
[0109] Combination Figure 4 The device code risk warning computing device further includes at least one detection unit; The at least one detection unit is configured to monitor the risk code registry list (e.g., CVE list) corresponding to each software code in the component list included in the device code 80, based on the component list of the at least one software code included in the component list, and detect code analysis events by monitoring the anomalies of the risk code registry list.
[0110] In summary, this invention discloses a device code risk warning method, a software system 1, and a computing device 11. By updating a device code 80 containing at least one piece of software code on an online running device 8, comparing the risk code with the components of the device code 80, and issuing a risk warning for the device 8, risk warnings can be issued for the device 8 regardless of whether the device 8 is offline or the network status is normal, thereby achieving risk prevention and control of the device code 80.
[0111] The above detailed description is a specific description of feasible embodiments of the present invention. The embodiments are not intended to limit the scope of protection of the present invention. All equivalent implementations or modifications that do not depart from the present invention should be included in the scope of protection of the present invention.
Claims
1. A device code risk early warning method, characterized in that: Includes the following steps: In a software system, at least one piece of software code is collected from a human-computer interface; When a code analysis event is triggered, a comparison of the component content is performed between a risk code and the at least one software code; When the comparison results show that the at least one piece of software code contains at least one security risk, a risk warning notification is issued to the provider of the at least one piece of software code, the at least one device containing the at least one piece of software code, the operator of the at least one device, and / or the administrator of the software system; wherein, the risk warning notification includes an instruction to instruct the at least one device and / or the operator of the at least one device to perform the update work of the risk code on the at least one device; or the risk warning notification includes a prompt message to provide a warning about the at least one security risk to the provider of the at least one piece of software code, the operator of the at least one device, and / or the administrator of the software system. The risk code and the at least one software code are compared in terms of their constituent content, including: The system compares at least one first component feature corresponding to the risk code with at least one second component feature corresponding to the at least one software code; wherein the first component feature is defined by the code composition content and / or semantic information of the risk code, and the second component feature is defined by at least one code composition content and / or at least one semantic information of the at least one software code.
2. The device code risk warning method according to claim 1, characterized in that: The at least one piece of software code is provided to the software system by a first user through the human-machine interface; the at least one device is operated by a second user.
3. The device code risk warning method according to claim 1, characterized in that: The at least one piece of software code contains at least one piece of binary code.
4. The device code risk warning method according to claim 1, characterized in that: The collection of the at least one piece of software code includes obtaining code version information, which determines the at least one device that corresponds to the at least one piece of software code.
5. The device code risk warning method according to claim 4, characterized in that: The code version information is either directly specified in an update request for the at least one piece of software code, or determined based on a product specification, a hardware specification, and / or a firmware specification included in the update request.
6. The device code risk warning method according to claim 5, characterized in that: The update request is an online update request transmitted over the network.
7. The device code risk warning method according to claim 5, characterized in that: The update request includes the network location information of the at least one device, and the software system transmits the at least one software code to the at least one device via the network based on the network location information.
8. The device code risk warning method according to claim 1, characterized in that: The comparison of the risk code and the at least one software code involves: extracting at least one first component feature corresponding to the risk code; and extracting at least one second component feature corresponding to the at least one software code. Compare the at least one first component feature and the at least one second component feature.
9. The device code risk warning method according to claim 1, characterized in that: The risk code's code composition includes the risk code and / or the first intermediate code compiled from the risk code, and / or the risk code's semantic information includes the semantic information revealed during the simulated execution of the risk code and / or the first intermediate code; the at least one first component feature is obtained by analyzing the risk code's code composition and / or semantic information.
10. The device code risk warning method according to claim 1, characterized in that: The at least one code component of the at least one software code includes at least one binary code and / or at least one second intermediate code after the at least one binary code is decompiled, and / or the at least one semantic information of the at least one software code includes semantic information revealed during the simulated execution of the at least one binary code and / or the at least one second intermediate code; the at least one second component feature is obtained by analyzing the at least one code component and / or the at least one semantic information of the at least one software code.
11. The device code risk warning method according to claim 9, characterized in that: The programming language structure of the first intermediate code is declared by an intermediate language, an intermediate representation, a structured language, and / or a structured protocol.
12. The device code risk warning method according to claim 10, characterized in that: The programming language structure of the second intermediate code is declared by an intermediate language, an intermediate representation, a structured language, and / or a structured protocol.
13. The device code risk warning method according to claim 1, characterized in that: The types of risky code include patch code, malicious code, and / or any type of code used to detect, fix, or generate a software vulnerability or software virus.
14. The device code risk warning method according to claim 1, characterized in that: The code analysis event corresponding to the risk code is triggered when the risk code is added or updated.
15. The device code risk warning method according to claim 1, characterized in that: Before the code analysis event is triggered, at least one code analysis event is detected based on a list of at least one piece of software code.
16. The device code risk warning method according to claim 15, characterized in that: The component list is obtained by scanning and / or analyzing the component composition of the at least one software code when the at least one software code is collected.
17. The device code risk warning method according to claim 16, characterized in that: The component list includes metadata for the at least one piece of software code.
18. The device code risk warning method according to claim 17, characterized in that: The components of the at least one piece of software code include a system kernel, drivers, applications, components, and / or class libraries.
19. The device code risk warning method according to claim 18, characterized in that: The at least one piece of software code is contained in a software code package, and the composition list is obtained by scanning and / or analyzing the components contained in the software code package to identify the at least one piece of software code present in the software code package, thereby obtaining the composition list of the at least one piece of software code.
20. A software system for early warning of device code risks, characterized in that, It includes a collection unit, a code acquisition unit, a comparison unit, and a transmission unit; The collection unit is used to collect at least one piece of software code from a human-machine interface; The code-retrieval unit is used to obtain a risk code; The comparison unit is used to compare the component content of the risk code and the at least one software code when a code analysis event is triggered, including comparing at least one first component feature corresponding to the risk code and at least one second component feature corresponding to the at least one software code; wherein, the first component feature is defined by the code composition content and / or semantic information of the risk code, and the second component feature is defined by at least one code composition content and / or at least one semantic information of the at least one software code; The transmission unit is configured to issue a risk warning notification to the provider of the at least one software code, the at least one device containing the at least one software code, the operator of the at least one device, and / or the administrator of the software system when the comparison result shows that the at least one software code contains at least one security risk; wherein the risk warning notification includes an instruction to instruct the at least one device and / or the operator of the at least one device to perform the update work of the risk code on the at least one device; or the risk warning notification includes a prompt message to provide a warning about the at least one security risk to the provider of the at least one software code, the operator of the at least one device, and / or the administrator of the software system.
21. The software system for device code risk warning according to claim 20, characterized in that, The comparison unit includes a first feature extraction unit, a second feature extraction unit, and a feature comparison unit; The first feature extraction unit is used to extract at least one first component feature corresponding to the risk code; The second feature extraction unit is used to extract at least one second component feature corresponding to the at least one software code; The feature comparison unit is used to compare the at least one first component feature and the at least one second component feature.
22. The software system for device code risk warning according to claim 21, characterized in that, The first feature extraction unit or the second feature extraction unit includes at least one analysis unit and at least one extraction unit; The at least one analysis unit is used to analyze the code composition content and / or semantic information of the risk code to obtain the first component feature, and / or to analyze at least one code composition content and / or at least one semantic information of the at least one software code to obtain the second component feature. The at least one extraction unit is used to extract the first component feature and / or the second component feature obtained after analysis.
23. The software system for device code risk warning according to claim 20, characterized in that, It also includes at least one detection unit; The at least one detection unit is used to monitor the risk code login list corresponding to each software code in the at least one software code composition list, and to detect the code analysis event by monitoring the anomalies in the risk code login list. The component list is obtained by scanning and / or analyzing the component composition of the at least one software code when the at least one software code is collected.
24. A computing device for device code risk warning, characterized in that, It includes a collection unit, a code extraction unit, a comparison unit, and a transmission unit, wherein the collection unit, the code extraction unit, the comparison unit, and the transmission unit are driven by a software system running in the computing device; The collection unit is used to collect at least one piece of software code from a human-machine interface; The code-retrieval unit is used to obtain a risk code; The comparison unit is used to compare the component content of the risk code and the at least one software code when a code analysis event is triggered, including comparing at least one first component feature corresponding to the risk code and at least one second component feature corresponding to the at least one software code; wherein, the first component feature is defined by the code composition content and / or semantic information of the risk code, and the second component feature is defined by at least one code composition content and / or at least one semantic information of the at least one software code; The transmission unit is configured to issue a risk warning notification to the provider of the at least one software code, the at least one device containing the at least one software code, the operator of the at least one device, and / or the administrator of the software system when the comparison result shows that the at least one software code contains at least one security risk; wherein the risk warning notification includes an instruction to instruct the at least one device and / or the operator of the at least one device to perform the update work of the risk code on the at least one device; or the risk warning notification includes a prompt message to provide a warning about the at least one security risk to the provider of the at least one software code, the operator of the at least one device, and / or the administrator of the software system.
