A secure NPAPI plug-in browser loading method and device
Patent Information
- Application Number
- CN202610983923.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-03
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2046-07-03
AI Technical Summary
此过程极易因库冲突或接口不兼容导致主进程崩溃,严重影响浏览器整体的可靠性
本申请实施例提供的安全的NPAPI插件浏览器加载方法,通过引入一个以隔离标识参数启动的专用代理进程来读取NPAPI插件的安全文本元数据,并通过安全的进程间通信机制将其传递回浏览器主进程,使得主进程在后续解析与配置过程中完全无需接触NPAPI插件的任何二进制代码与私有库;同时,在启动实际插件进程时,复用相同的隔离机制以阻断不同插件进程间的资源互访,从而能够从根本上消除浏览器主进程因直接读取不稳定或不兼容的NPAPI插件文件而崩溃的风险,并有效防止因单一插件故障通过私有库链式传播所引发的级联崩溃,最终在保障对各类NPAPI插件广泛兼容性的前提下,显著提升了浏览器整体运行的稳定性和安全性。
Smart Images

Figure CN122508601B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of browser technology, and more specifically, to a secure NPAPI plugin browser loading method and apparatus. Background Technology
[0002] NPAPI (Netscape Plugin Application Programming Interface), as a classic browser plugin programming interface standard, has long been widely used to enable web pages to process and render rich media content and various special format files, greatly enriching the browser's functional extension capabilities and is one of the important technical components for building complex web application ecosystems.
[0003] However, in the multi-process architecture commonly used by modern browsers, the loading mechanism of NPAPI plugins exposes significant security and stability flaws. In existing solutions, the browser's main process typically reads the metadata of NPAPI plugin files directly, and these plugins often rely on proprietary dynamic link libraries of varying versions. This process is highly susceptible to main process crashes due to library conflicts or interface incompatibility, severely impacting the overall reliability of the browser. Furthermore, the lack of strict resource isolation between multiple NPAPI plugin processes means that an anomaly in one plugin can trigger a cascading crash through private library access. While improvements such as independent processes or sandboxes exist, the former still cannot resolve the exposure risks of the main process during the metadata reading phase, while the latter often comes with significant performance overhead and compatibility issues. Therefore, existing technologies struggle to provide comprehensive and efficient protection for the browser's main process and inter-process stability while ensuring the functionality of NPAPI plugins. Summary of the Invention
[0004] In view of at least one defect or improvement need in the prior art, this application provides a secure NPAPI plugin browser loading method and apparatus, which can solve at least one of the problems existing in the background art.
[0005] To achieve the above objectives, according to the first aspect of this application, a secure NPAPI plugin browser loading method is provided, the method comprising: S1. When the browser main process detects the NPAPI plugin loading requirement, it starts the proxy process in a blocking manner. The proxy process runs in proxy mode by parsing the preset isolation flag parameter. The proxy process only has the permission to read the security text metadata of the NPAPI plugin. S2. After reading the security text metadata of the NPAPI plugin, the proxy process transmits the security text metadata to the browser main process through the inter-process communication mechanism, and then exits the proxy process. S3. The browser main process receives and parses the secure text metadata, loads and configures the NPAPI plugin, and does not access the binary code of the NPAPI plugin during this process. S4. Start the plugin process corresponding to the NPAPI plugin using the same isolation mechanism as in step S1, and block private library access between different plugin processes.
[0006] Furthermore, in the aforementioned secure NPAPI plugin browser loading method, the isolation identifier parameter is used to enable the process to dynamically switch running modes at startup; When the process parses the isolation identifier parameter, it enters proxy mode and disables all functional permissions unrelated to reading the secure text metadata.
[0007] Furthermore, in the aforementioned secure NPAPI plugin browser loading method, the secure text metadata includes plugin metadata, plugin description, and plugin name.
[0008] Furthermore, in the above-mentioned secure NPAPI plugin browser loading method, in step S2, the secure text metadata is transmitted via a textualized information stream transmission method through an inter-process communication mechanism, and the transmitted secure text metadata is non-executable text data.
[0009] Furthermore, in the aforementioned secure NPAPI plugin browser loading method, step S2, the step of exiting the proxy process, includes: If all secure text metadata is successfully read, the system will exit with a normal status code. If the secure text metadata cannot be read at all, a preset error code is returned to the browser main process and the browser exits. The browser main process skips loading the current NPAPI plugin based on the error code. If some secure text metadata fails to be read, the successfully read metadata is passed to the browser's main process and the browser exits normally. The browser's main process then continues loading based on the acquired metadata.
[0010] Furthermore, in the above-mentioned secure NPAPI plugin browser loading method, in step S4, when starting the plugin process, the plugin process is run in isolation mode by carrying the isolation identifier parameter. In the isolation mode, the plugin process does not have permission to access the private library resources of other plugin processes.
[0011] Furthermore, in the above-mentioned secure NPAPI plugin browser loading method, step S1 of starting the proxy process in a blocking manner includes the browser main process waiting for the proxy process to complete the reading and transmission of secure text metadata and exit before continuing to perform subsequent operations after starting the proxy process.
[0012] According to a second aspect of this application, a secure NPAPI plugin browser loading device is also provided, comprising: The isolation process startup module is used to start a proxy process in a blocking manner when the browser main process detects the NPAPI plugin loading requirement. The proxy process runs in proxy mode by parsing the preset isolation flag parameters. The proxy process only has the permission to read the security text metadata of the NPAPI plugin. The secure data transmission module is used to transmit the secure text metadata of the NPAPI plugin to the browser main process through an inter-process communication mechanism after the proxy process reads the secure text metadata, and then exits the proxy process. The main process risk analysis module is used by the browser's main process to receive and parse the security text metadata, load and configure the NPAPI plugin, and does not touch the binary code of the NPAPI plugin during this process; The synchronization optimization module is used to start the plugin process corresponding to the NPAPI plugin using the same isolation mechanism as in step S1, thereby blocking private library access between different plugin processes.
[0013] According to a third aspect of this application, a secure NPAPI plugin browser loading device is also provided, comprising at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program that, when executed by the processing unit, causes the processing unit to perform the steps of any of the methods described above.
[0014] According to a fourth aspect of this application, a storage medium is also provided that stores a computer program executable by a secure NPAPI plugin browser loading device, which, when run on the secure NPAPI plugin browser loading device, causes the secure NPAPI plugin browser loading device to perform the steps of any of the methods described above.
[0015] In summary, compared with the prior art, the above-described technical solutions conceived in this application can achieve the following beneficial effects: The secure NPAPI plugin browser loading method provided in this application introduces a dedicated proxy process started with an isolation flag parameter to read the secure text metadata of the NPAPI plugin and transmits it back to the browser's main process through a secure inter-process communication mechanism. This ensures that the main process does not need to access any binary code or private libraries of the NPAPI plugin during subsequent parsing and configuration. At the same time, when starting the actual plugin process, the same isolation mechanism is reused to block resource access between different plugin processes. This fundamentally eliminates the risk of the browser's main process crashing due to directly reading unstable or incompatible NPAPI plugin files and effectively prevents cascading crashes caused by the chain propagation of a single plugin failure through private libraries. Ultimately, while ensuring broad compatibility with various NPAPI plugins, it significantly improves the overall stability and security of the browser. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a flowchart illustrating a secure NPAPI plugin browser loading method provided in an embodiment of this application. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. Furthermore, the technical features involved in the various embodiments described below can be combined with each other as long as they do not conflict with each other.
[0019] The terms "first," "second," "third," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0020] Figure 1 A flowchart illustrating a secure NPAPI plugin browser loading method provided in this application embodiment is shown below. Figure 1 As shown in the figure, this application provides a secure NPAPI plugin browser loading method, which includes the following steps: S1. When the browser main process detects the NPAPI plugin loading requirement, it starts the proxy process in a blocking manner. The proxy process runs in proxy mode by parsing the preset isolation flag parameter. The proxy process only has the permission to read the security text metadata of the NPAPI plugin. S2. After reading the security text metadata of the NPAPI plugin, the proxy process transmits the security text metadata to the browser main process through the inter-process communication mechanism, and then exits the proxy process. S3. The browser main process receives and parses the secure text metadata, loads and configures the NPAPI plugin, and does not access the binary code of the NPAPI plugin during this process. S4. Start the plugin process corresponding to the NPAPI plugin using the same isolation mechanism as in step S1, and block private library access between different plugin processes.
[0021] Specifically, this embodiment provides a secure browser loading method for NPAPI plugins, used to securely and stably load NPAPI plugins in a browser's multi-process architecture. This method introduces a dedicated proxy process as a security sandbox to completely isolate the browser's main process from potentially risky NPAPI plugin files. The specific steps are as follows: S1. Isolation Process Startup: When a user visits a webpage containing an NPAPI plugin, the browser's main process parses the page and detects that the NPAPI plugin needs to be loaded. At this time, the main process does not directly access the plugin file, but instead starts a proxy process in a blocking manner. The startup command includes a preset isolation flag parameter. After the proxy process starts, it parses this parameter to confirm that it is running in proxy mode. In this mode, the proxy process only activates functional modules related to reading metadata and disables all other irrelevant system permissions, strictly limiting its functionality to reading only the three types of secure text metadata specified in the target NPAPI plugin file: plugin metadata (MIME type), plugin description, and plugin name. The main process waits for the proxy process to complete its subsequent tasks and then exits.
[0022] S2. Secure Data Transfer: The proxy process locates the NPAPI plugin file based on the path and reads the three types of secure text metadata mentioned above. Then, through inter-process communication (IPC), a dedicated text transmission channel is established between the main process and the proxy process. The proxy process writes the read plain text metadata into the IPC buffer all at once. After the browser's main process reads the complete metadata from this buffer, it sends an acknowledgment signal to the proxy process. Upon receiving the acknowledgment, the proxy process immediately executes its exit logic. A fault tolerance mechanism is designed in this process: if the proxy process is completely unable to read the metadata (e.g., file corruption), it generates a preset error code, passes it to the main process, and exits, allowing the main process to skip loading the plugin; if only the plugin description or name fails to read, the proxy process transmits the successfully read MIME information and exits with a normal status code, allowing the main process to continue the subsequent processes using the existing metadata.
[0023] S3. Zero-Risk Parsing in the Main Process: After obtaining all metadata from the IPC buffer, the browser's main process only calls the plain text parsing module to process this text information to generate the configuration information required for plugin loading. Throughout the entire parsing process, the browser's main process does not call or access any binary code or private libraries of the NPAPI plugin itself, thus completely avoiding the risk of the main process crashing due to plugin binary code issues. Simultaneously, since the metadata is transmitted completely at once through the buffer, it also avoids data transmission inconsistencies or interruptions that might occur with segmented access.
[0024] S4. Plugin Process Synchronization Optimization: When an NPAPI plugin process needs to be created to run the plugin, the same isolation mechanism as in step S1 is adopted. That is, when the browser main process starts the plugin process, it also carries the isolation flag parameter. Plugin processes started in this way run in isolation mode, and their permissions are strictly restricted, preventing them from accessing the private libraries and memory spaces of other NPAPI plugin processes. This blocks the cascading crash path that may be caused by different plugin processes accessing each other's private libraries, ensuring that an anomaly in a single plugin process will not spread to the entire browser or other plugins.
[0025] In summary, this embodiment constructs a complete protection system through a collaborative design that includes a proxy process reading text metadata, secure IPC transmission, zero-contact parsing by the main process, and isolated startup of plugin processes. This system ensures the absolute security of the browser's main process and the overall stability of its operation while implementing the core loading function of the NPAPI plugin.
[0026] The secure NPAPI plugin browser loading method provided in this application introduces a dedicated proxy process started with an isolation flag parameter to read the secure text metadata of the NPAPI plugin and transmits it back to the browser's main process through a secure inter-process communication mechanism. This ensures that the main process does not need to access any binary code or private libraries of the NPAPI plugin during subsequent parsing and configuration. At the same time, when starting the actual plugin process, the same isolation mechanism is reused to block resource access between different plugin processes. This fundamentally eliminates the risk of the browser's main process crashing due to directly reading unstable or incompatible NPAPI plugin files and effectively prevents cascading crashes caused by the chain propagation of a single plugin failure through private libraries. Ultimately, while ensuring broad compatibility with various NPAPI plugins, it significantly improves the overall stability and security of the browser.
[0027] Optionally, in the secure NPAPI plugin browser loading method provided in this application embodiment, the isolation identifier parameter is used to enable the process to dynamically switch running modes at startup; When the process parses the isolation identifier parameter, it enters proxy mode and disables all functional permissions unrelated to reading the secure text metadata.
[0028] Optionally, the secure NPAPI plugin browser loading method provided in this application embodiment includes secure text metadata such as plugin metadata, plugin description, and plugin name.
[0029] Optionally, in the secure NPAPI plugin browser loading method provided in this application embodiment, in step S2, the secure text metadata is transmitted via a textualized information stream transmission method through an inter-process communication mechanism, and the transmitted secure text metadata is non-executable text data.
[0030] Optionally, in the secure NPAPI plugin browser loading method provided in this application embodiment, the step of exiting the proxy process in step S2 includes: If all secure text metadata is successfully read, the system will exit with a normal status code. If the secure text metadata cannot be read at all, a preset error code is returned to the browser main process and the browser exits. The browser main process skips loading the current NPAPI plugin based on the error code. If some secure text metadata fails to be read, the successfully read metadata is passed to the browser's main process and the browser exits normally. The browser's main process then continues loading based on the acquired metadata.
[0031] Optionally, in the secure NPAPI plugin browser loading method provided in this application embodiment, when starting the plugin process in step S4, the plugin process is run in isolation mode by carrying the isolation identifier parameter. In the isolation mode, the plugin process does not have permission to access the private library resources of other plugin processes.
[0032] Optionally, in the secure NPAPI plugin browser loading method provided in this application embodiment, the step S1 of starting the proxy process in a blocking manner includes the browser main process waiting for the proxy process to complete the reading and transmission of secure text metadata and exit before continuing to perform subsequent operations after starting the proxy process.
[0033] Specifically, this application will be further described in detail below with reference to specific embodiments.
[0034] Example 1: A secure method for loading NPAPI plugins in a browser includes the following steps: S1. Isolation Process Startup: When a user accesses a webpage containing an NPAPI plugin through a browser, the browser's main process (Browser process) detects the NPAPI plugin loading requirement after parsing the page tags. It immediately starts the proxy process (Browser') in a blocking manner. The startup command is "browser --Parameter-A", where "Parameter-A" is a preset isolation identifier parameter. After the process starts, it determines that it is in proxy process mode by parsing this parameter. It only activates the function modules related to metadata reading, and closes other irrelevant permissions to ensure that it can only read three types of secure text metadata of the NPAPI plugin: plugin metadata (MIME), plugin description (Description), and plugin name (Name).
[0035] S2. Secure Data Transfer: After locating the metadata storage path of the target NPAPI plugin, the agent process (Browser') reads the corresponding three types of secure text metadata. It establishes a dedicated text transmission channel with the main process via inter-process communication (IPC) and writes the read metadata into the IPC buffer all at once. After the main process finishes reading the metadata from the buffer, it sends a confirmation signal to the agent process. Upon receiving the confirmation signal, the agent process exits normally with status code 0. If the agent process detects corrupted or unreadable data during metadata reading, it immediately generates a preset error code (e.g., 1001) and transmits it to the main process via IPC before exiting. Upon receiving the error code, the main process terminates the current NPAPI plugin loading process. If only the plugin description or plugin name fails to read, the agent process transmits the successfully read metadata to the main process and exits normally. The main process continues with subsequent loading steps based on the acquired metadata.
[0036] S3, Zero-risk parsing of the main process: After receiving the metadata, the main process only starts the plain text parsing module to process the data and generate the configuration information required for plugin loading. During the entire process, no interface related to the NPAPI plugin binary code is called, thus avoiding code-level threats. At the same time, since the metadata is obtained all at once through the buffer, the risk of transmission interruption or data corruption that may be caused by segmented access is avoided.
[0037] S4. Plugin process synchronization optimization: When the main process starts the NPAPI plugin process based on the parsed metadata, it adopts the same isolation mechanism as in step S1. It starts an independent plugin process by carrying the isolation flag parameter. This plugin process only has the permissions required to communicate with the main process and run its own functions. It cannot access the private library resources of other plugin processes, thereby achieving isolation between plugin processes and avoiding cascading crashes.
[0038] Example 2: A secure NPAPI plugin browser loading device for implementing the above method includes a process startup module 1, a metadata reading module 2, an IPC communication module 3, a fault tolerance processing module 4, and a plugin process isolation module 5. The functions of each module are as follows: Process startup module 1: Integrated into the browser's main process, it has the functions of NPAPI plugin loading requirement detection, proxy process startup control, and parameter passing. When an NPAPI plugin loading instruction is detected in the page, a blocking startup logic is immediately triggered to generate a startup command carrying an isolation identifier parameter (Parameter-A), ensuring that the proxy process can accurately switch to the dedicated function mode after startup.
[0039] Metadata Reading Module 2: This is the core functional module of the agent process, with built-in permission control and data filtering units. The permission control unit restricts the module to access only the three types of secure text metadata storage areas of the NPAPI plugin, and the data filtering unit is used to filter invalid data to ensure that the metadata passed to the main process is in plain text format.
[0040] IPC Communication Module 3: Includes a main process communication unit and an agent process communication unit. An encrypted text transmission channel is established between the two, and a dedicated buffer is set up for temporary storage of metadata to ensure the integrity and security of data transmission and prevent data leakage or tampering.
[0041] Fault tolerance module 4: Deployed in the main process and the agent process respectively. The fault tolerance unit in the agent process monitors the metadata reading status and generates the corresponding status code or error code; after receiving the status information, the fault tolerance unit in the main process executes the corresponding loading control logic to realize flexible fault tolerance for plugin loading.
[0042] Plugin process isolation module 5: Used to control the startup and permission configuration of NPAPI plugin processes. When starting a plugin process, it carries an isolation flag parameter and configures resource access policies between processes, blocking private library access channels and enabling the independent operation of plugin processes.
[0043] Compared with existing technologies, this application can achieve zero-risk protection for the main process. By having a proxy process handle the reading of NPAPI plugin metadata, the main process does not directly access risky resources related to plugins, completely solving the crash problem caused by the main process reading NPAPI plugin metadata in existing technologies. It can prevent cascading crashes by blocking private library access between NPAPI plugin processes through a process isolation mechanism. At the same time, the proxy process, as a "sacrificial domain," bears all metadata reading risks, avoiding overall crashes caused by a single plugin anomaly. It can balance efficiency and compatibility by using text-based information stream transmission and one-time buffer reading, reducing performance loss while ensuring security. The fault-tolerance mechanism design makes the plugin loading process highly robust and adaptable to different types of NPAPI plugins. It can achieve dual-mode process reuse by dynamically switching between main / proxy modes through isolation flag parameters, simplifying architecture design and reducing system resource consumption.
[0044] This application also provides a secure NPAPI plugin browser loading device, including: The isolation process startup module is used to start a proxy process in a blocking manner when the browser main process detects the NPAPI plugin loading requirement. The proxy process runs in proxy mode by parsing the preset isolation flag parameters. The proxy process only has the permission to read the security text metadata of the NPAPI plugin. The secure data transmission module is used to transmit the secure text metadata of the NPAPI plugin to the browser main process through an inter-process communication mechanism after the proxy process reads the secure text metadata, and then exits the proxy process. The main process risk analysis module is used by the browser's main process to receive and parse the security text metadata, load and configure the NPAPI plugin, and does not touch the binary code of the NPAPI plugin during this process; The synchronization optimization module is used to start the plugin process corresponding to the NPAPI plugin using the same isolation mechanism as in step S1, thereby blocking private library access between different plugin processes.
[0045] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method. The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, as well as magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.
[0046] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0047] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0048] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between devices or units may be electrical or other forms.
[0049] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0050] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0051] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0052] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0053] The foregoing description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Those skilled in the art will readily conceive of embodiments of this disclosure upon considering the specification and practicing the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described herein. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.
[0054] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0055] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A secure method for loading NPAPI plugins in a browser, characterized in that, Includes the following steps: S1. When the browser main process detects the NPAPI plugin loading requirement, it starts the proxy process in a blocking manner. The proxy process runs in proxy mode by parsing the preset isolation flag parameter. The proxy process only has the permission to read the security text metadata of the NPAPI plugin. S2. After reading the security text metadata of the NPAPI plugin, the proxy process transmits the security text metadata to the browser main process through the inter-process communication mechanism, and then exits the proxy process. S3. The browser main process receives and parses the secure text metadata, loads and configures the NPAPI plugin, and does not access the binary code of the NPAPI plugin during this process. S4. Start the plugin process corresponding to the NPAPI plugin using the same isolation mechanism as in step S1, and block private library access between different plugin processes. The isolation flag parameter is used to enable the process to dynamically switch running modes at startup; When the process parses the isolation identifier parameter, it enters proxy mode and disables all functional permissions unrelated to reading the secure text metadata. In step S2, the security text metadata is transmitted via an inter-process communication mechanism using a textual information stream transmission method, and the transmitted security text metadata is non-executable text data. In step S4, when the plugin process is started, the plugin process is run in isolation mode by carrying the isolation flag parameter. In the isolation mode, the plugin process does not have permission to access the private library resources of other plugin processes.
2. The secure NPAPI plugin browser loading method as described in claim 1, characterized in that, The secure text metadata includes plugin metadata, plugin description, and plugin name.
3. The secure NPAPI plugin browser loading method as described in claim 1, characterized in that, The step of exiting the agent process in step S2 includes: If all secure text metadata is successfully read, the system will exit with a normal status code. If the secure text metadata cannot be read at all, a preset error code is returned to the browser main process and the browser exits. The browser main process skips loading the current NPAPI plugin based on the error code. If some secure text metadata fails to be read, the successfully read metadata is passed to the browser's main process and the browser exits normally. The browser's main process then continues loading based on the acquired metadata.
4. The secure NPAPI plugin browser loading method as described in claim 1, characterized in that, The blocking method for starting the proxy process in step S1 includes the browser main process waiting for the proxy process to complete the reading and transmission of secure text metadata and exit before continuing to perform subsequent operations.
5. A secure NPAPI plugin browser loading device, characterized in that, include: The isolation process startup module is used to start a proxy process in a blocking manner when the browser main process detects the NPAPI plugin loading requirement. The proxy process runs in proxy mode by parsing the preset isolation flag parameters. The proxy process only has the permission to read the security text metadata of the NPAPI plugin. The secure data transmission module is used to transmit the secure text metadata of the NPAPI plugin to the browser main process through an inter-process communication mechanism after the proxy process reads the secure text metadata, and then exits the proxy process. The main process risk analysis module is used by the browser's main process to receive and parse the security text metadata, load and configure the NPAPI plugin, and does not touch the binary code of the NPAPI plugin during this process; The synchronization optimization module is used to start the plugin process corresponding to the NPAPI plugin using the same isolation mechanism as step S1, and to block private library access between different plugin processes. The isolation flag parameter is used to enable the process to dynamically switch running modes at startup; When the process parses the isolation identifier parameter, it enters proxy mode and disables all functional permissions unrelated to reading the secure text metadata. The secure data transmission module transmits the secure text metadata via an inter-process communication mechanism using a text-based information stream transmission method. The transmitted secure text metadata is non-executable text data. When the synchronization optimization module starts the plugin process, it uses the isolation flag parameter to make the plugin process run in isolation mode. In isolation mode, the plugin process does not have permission to access the private library resources of other plugin processes.
6. A secure NPAPI plugin browser loading device, characterized in that, It includes at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program that, when executed by the processing unit, causes the processing unit to perform the steps of the method according to any one of claims 1 to 4.
7. A storage medium, characterized in that, It stores a computer program executable by a secure NPAPI plugin browser loading device, which, when run on the secure NPAPI plugin browser loading device, causes the secure NPAPI plugin browser loading device to perform the steps of the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Moving object execution method and system for browser and browser
CN103019733A
Inter-process communication system, inter-process communication method and computing equipment
CN114020490A