Methods for detecting and issuing warnings about over-authorization of Chrome extensions
By constructing a mapping table between permissions and APIs and conducting static analysis, combined with multi-dimensional risk assessment, the Permission Guard extension was developed. This addresses the issues of insufficient granularity and blind spots in the Chrome browser's permission management system, enabling over-authorization detection and real-time alerts for Chrome extensions, thereby improving browser extension security and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANKAI UNIV
- Filing Date
- 2025-04-14
- Publication Date
- 2026-06-30
Smart Images

Figure CN120316774B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of browser extension security technology, specifically relating to a browser extension over-authorization detection method and risk classification and early warning system based on the analysis of differences between permission declarations and API call mappings. Background Technology
[0002] Modern web browsers generally support enhancing their functionality through extensions, thereby improving the user experience. For example, the Chrome Web Store offers a rich set of extensions covering various functionalities such as ad blocking, news feeds, and interface customization. These extensions primarily achieve their functionality by requesting specific permissions and calling corresponding APIs. However, there is a significant asymmetry risk between the API access capabilities obtained through permission granting mechanisms and the declared functional requirements of these extensions.
[0003] In the technical architecture of browser extensions, permission declaration mechanisms and API access control are significantly coupled. According to the Chrome extension development specification, extensions must explicitly declare a set of permissions through the `permissions` field in the `manifest.json` configuration file to activate the corresponding API calls. For example, accessing cookies and history data requires declaring cookies and history permissions separately and calling the `chrome.cookies` and `chrome.history` APIs. While this permission mechanism provides necessary access control for extension functionality, it can also allow extension developers to obtain access to sensitive data beyond what is necessary for the functionality, including but not limited to: obtaining sensitive user browsing history, payment data, and login credentials, posing a serious threat to user privacy and security.
[0004] Existing browser extension security architectures are built upon the classic three principles of network security: segregation of privileges, least privilege, and mandatory isolation. These mechanisms have formed a relatively complete protection system at the process-level resource management level. However, Chrome's permission management system still has significant shortcomings in fine-grained access control. Specifically, the current permission model uses a coarse-grained authorization mechanism based on extension granularity, which cannot achieve fine-grained control over extension permissions. Taking a subscription service website as an example, to implement user login status verification, developers need to declare the "cookies" permission in the manifest.json file to call the chrome.cookies API, and simultaneously apply for...<all_urls> "Cross-domain permissions allow the extension to send requests to other websites. This design allows the extension to indiscriminately access all domain cookie data stored by the browser, including highly sensitive sites such as banks and social media, once authorized by the user."
[0005] Secondly, the permission change detection mechanism has flaws. During the extension release phase, the Chrome Web Store's review mechanism has a significant blind spot for permissions that do not trigger warnings: the system only verifies the syntax of the manifest.json file (such as the manifest_version field), update_url, and basic metadata, ignoring the integrity checks of other files within the extension package. This selective review mechanism provides attackers with an opportunity to bypass detection by injecting malicious code into unreviewed files. After the extension is installed, the system uses a silent update mechanism, periodically requesting the XML update manifest pointed to by update_url to update the version. When a new version is detected, the system automatically downloads and installs the update package, a process that requires no user intervention or secondary review. This design allows attackers to exploit the update mechanism to bypass review and distribute malicious extensions through the Chrome Web Store. For example, a malicious extension disguised as Adblock Plus has successfully passed review and been listed. Summary of the Invention
[0006] Based on the above objectives, this invention provides a method for detecting excessive permissions granted by Chrome extensions, proposes a new permission warning mechanism, and develops a Chrome extension called "Permission Guard" that integrates both functions. This addresses the security vulnerabilities of the current Chrome browser's permission management system (lacking in granularity) and the Google Play Store's detection mechanism. To achieve this objective, the specific technical solution designed by this invention is as follows:
[0007] The method for detecting and issuing warnings about excessive permissions granted by Chrome extensions includes the following steps:
[0008] The first step is to collect a dataset to create input samples for the developed extension. Specifically, this requires obtaining all Chrome extension sample data from the Google Play Store, including but not limited to extension CRX archive files, extension IDs, extension names, and extension version numbers, as input samples.
[0009] Furthermore, the collected information includes all Chrome extension sample data and its metadata obtained from the Google Play Store;
[0010] The second step is to extract information, including two types of information: one is the indicator feature information related to over-authorization detection, and the other is the information related to the uniqueness of the extension itself. The feature indicator system for Chrome extension over-authorization detection includes extension API and extension Permission. The information related to the uniqueness of the extension itself includes, but is not limited to, extension ID, extension version number, extension name, and Manifest version number. Using the extracted information, we design a feature indicator extraction and data storage method based on static analysis.
[0011] The third step is to build a mapping between extended APIs and extended permissions. A mapping table of all permissions and APIs is compiled from the official documentation to facilitate subsequent detection.
[0012] The fourth step involves combining the extracted extended API, extended Permission, Manifest version number, extended ID, and extended permission-API mapping table to design a detection method called "Permission OverprivilegedDetector" based on difference analysis. This method detects Chrome extensions that have requested permissions but have not used the corresponding APIs by comparing the extended permission-API mapping table and based on the differences between the extended permissions and APIs. In other words, it detects information about extensions that have been over-privileged.
[0013] Furthermore, the "Permission Overprivileged Detector" detection method based on differential analysis includes four stages: (1) establishing a permission-API mapping baseline based on official documentation; (2) identifying the permissions declared in the manifest file and the APIs actually called in the code through static analysis; (3) performing differential analysis to detect inconsistencies between permission declarations and API usage; and (4) persistently storing over-privileged cases and their metadata (extended ID, version, unmatched permissions) in dual formats (SQLite database and JSON file) to support diverse application scenarios; wherein the dual formats are SQLite database and JSON file formats.
[0014] The fifth step involves designing and establishing a reasonable data storage method to store the information on over-authorized Chrome extensions. To effectively manage and store this information, the invention designs and implements two data storage methods: relational database format and JSON format. Each method has its advantages and can adapt to different application scenarios and needs. The invention uses a relational database format to store this information. Relational databases store data in a table format, which is clear in structure and easy to query and manage. This method enables efficient data querying, updating, and deletion operations, and allows for complex analysis and statistics using SQL statements. JSON (JavaScript Object Notation) is a lightweight data exchange format that is easy to read and write, and also easy for machines to parse and generate. The invention stores the information for each Chrome extension as a JSON object, which includes basic extension information and whether it is over-authorized.
[0015] The sixth step involves designing a new indicator system for the permission warning mechanism to assess the warning levels of all permissions for Chrome extensions. Based on all permissions explicitly listed in the official documentation that Chrome extensions can request, the risk level of these permissions is assessed. This invention reconstructs the permission management system for Chrome extensions through three evaluation dimensions: permission versatility, risk warning mechanism, and authorization harm. The new mechanism divides functional access rights into four risk levels: Critical (highest risk), High (highest risk), Medium (medium risk), and Low (lowest risk). When a functional access right presents risks across all evaluation dimensions, it is classified as the highest risk level. If security flaws are involved in two dimensions, it is assessed as high risk. A potential threat exists only in a single dimension, classifying it as medium risk. When all review indicators comply with security specifications, it is marked as the low risk level. This grading system, through comprehensive consideration of multiple dimensions, compensates for the shortcomings of single-dimensional assessments, thereby improving the accuracy and reliability of the assessment results.
[0016] Furthermore, the aforementioned general applicability of permissions focuses on permissions that could excessively expose user privacy data; the aforementioned risk warning mechanism focuses on permissions involving sensitive or high-risk operations, and such permissions will issue clear prompts to users when granted to ensure that users are aware of potential risks; the aforementioned authorization hazards focus on permissions that may be granted without the user's knowledge or automatically acquired at inappropriate times, posing a high security risk to the user.
[0017] Finally, based on in-depth research and analysis of the Chrome extension permission mechanism, this invention has developed an extension program capable of effectively detecting Chrome extension over-authorization issues and providing real-time permission warnings. This extension, named "Permission Guard," aims to provide users with a comprehensive extension permission management solution. By integrating the extension permission database and risk assessment model established in the early stages of this invention, Permission Guard can intelligently analyze the extensions installed by the user and comprehensively evaluate their permission usage. Specifically, Permission Guard will have the following core functions: First, it can scan all Chrome extensions installed by the user in real time and compare them with the over-authorization detection standard built in this invention to accurately identify extensions with over-authorization issues. Second, based on the permission risk level assessment system established in this invention, this extension can rate the risk of each detected extension, classifying them into four levels: Critical, High, Medium, and Low. In terms of user interface design, this invention will use an intuitive visualization method to display the detection results, effectively improving Chrome users' understanding and management capabilities regarding extension permissions.
[0018] This invention offers the following advantages: First, through an innovative over-authorization detection method and a multi-dimensional risk assessment system, it significantly improves the granularity and accuracy of Chrome extension permission management. Second, the designed Permission Guard extension program implements intelligent early warning functionality for user-installed extensions, effectively addressing the insufficient granularity of existing permission management systems. Third, the dual data storage scheme employing relational databases and JSON format ensures both efficient data management and system flexibility and scalability. Furthermore, the permission risk level assessment mechanism proposed in this invention, through comprehensive consideration of multiple dimensions, can more accurately assess the potential security threats of extensions, providing users with more reliable security protection. Finally, the entire system design prioritizes user experience, employing an intuitive visual interface and intelligent suggestion functions, greatly lowering the barrier for ordinary users to use permission management tools, and possessing broad application prospects and practical value. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the overall structure of the present invention;
[0020] Figure 2 This is a schematic diagram of the over-licensing detection function structure;
[0021] Figure 3A permission risk level warning chart provided by Permission Guard for the user-installed extension "papers.labml.ai";
[0022] Figure 4 The Permission Guard extension installed by the user displays an over-granted permissions graph in the form of notifications and warnings. Detailed Implementation
[0023] This invention relates to an innovative solution for browser extension permission management, aiming to address security vulnerabilities in existing permission management technologies. Through in-depth analysis of the relationship between Chrome extension permission declarations and actual API calls, this invention designs a detection method called "Permission Overprivileged Detection." This method automatically identifies and assesses the risk of permission abuse by constructing a mapping table between permissions and API calls, and combines this with a novel permission review mechanism to propose an innovative browser extension permission management system. Furthermore, this invention also develops an extension program called "Permission Guard," which can monitor extension permission usage in real time and issue warnings to users based on the risk level of permissions, thereby effectively avoiding security risks caused by over-authorization. The overall structure diagram of "Permission Guard" is shown below. Figure 1 As shown in the diagram, the functional structure of the "Permission Overprivileged Detection" detection method is as follows: Figure 2 As shown in the figure. The technical solution of the present invention will be described in detail below with reference to specific embodiments and accompanying drawings.
[0024] Step 1: Collect Dataset
[0025] To effectively identify whether extensions are over-privileged, constructing a comprehensive and detailed dataset is crucial. In the "Permission Overprivileged Detector" framework proposed in this study, a dedicated data collection module is designed. This module scrapes relevant extension information from the Google Play Store and utilizes three functionally independent but collaborative working units—Collector Worker, Database Worker, and Progress Worker—to automate data collection and processing. Specifically, the Collector Worker downloads the original extension files and their metadata from the Chrome Web Store based on the extension's unique identifier (ID). Subsequently, the Database Worker stores the collected data in a pre-defined structured format in a designated database for subsequent analysis and processing. Meanwhile, the Progress Worker runs continuously throughout the data collection and storage process. Its core function is to monitor the system status in real time and dynamically display information such as current progress and task execution status on the console interface, ensuring the transparency and controllability of the entire process. Through this modular design, this invention not only efficiently completes data collection tasks but also lays a solid foundation for subsequent permission analysis and risk assessment.
[0026] During the data acquisition and storage phase, the extracted browser extension-related information is systematically saved to a database. This data mainly covers two categories: one is the extension's source code archive files, and the other is metadata information related to the extension. The source code files are stored in CRX format and organized and managed through a hierarchical directory structure. Specifically, the first-level directory is named after the extension's unique identifier (ID), and the second-level directory is named according to the extension's version number, thus forming a clear and easily searchable storage path. This structured storage method not only effectively avoids data clutter but also significantly improves the efficiency of subsequent data processing.
[0027] Meanwhile, extended metadata information, including key information such as extension ID, version number, developer name, and release date, is stored uniformly in the SQLite database. SQLite, as a lightweight relational database, is efficient and flexible, making it ideal for managing this type of structured data. By storing metadata separately from source code files, data integrity is ensured while facilitating subsequent querying and analysis.
[0028] Furthermore, to enhance the systematic nature and scalability of data management, the collected extension files (including their source code archives) are organized using a hierarchical directory structure. This structure, based on the extension's unique identifier and version information, ensures efficient and consistent data storage and retrieval through logical naming rules. For example, each extension's source code file is stored according to the path "Extension ID / Version Number / CRX File," thus achieving standardized data management. This design not only supports the storage needs of large-scale data but also provides a reliable data foundation for subsequent functions such as access control analysis and risk assessment.
[0029] Step 2: Extract extended information
[0030] To ensure a comprehensive assessment of the security of Chrome extensions, a systematic analytical framework must be built to delve into the relationship between permission declarations and actual functional requirements. While extension APIs are the key means to implement their core functionality, the permission model, as the foundation for API calls, directly determines the extension's security through its rationality and necessity. The detection method of this invention focuses on the differences between the permission declaration set and the actual API call patterns. Specifically, when the scope of permissions requested by an extension significantly exceeds the API calls required for its functionality, over-authorization behavior can be identified. This detection mechanism relies on two-dimensional data extraction: on the one hand, the complete set of declared permissions is extracted from the extension's manifest file; on the other hand, a systematic static code analysis technique is used to accurately identify the actual API call patterns. This method specifically performs static analysis on the extension's source code to simultaneously capture explicitly declared permissions and actual API call characteristics, thereby constructing a mapping relationship between permissions and APIs.
[0031] During the extraction of extended APIs, this framework employs the Esprima library for lexical analysis of the code to accurately extract identifier information. Subsequently, the system compares and matches these extracted identifiers with a predefined list of extended APIs to generate the API call sequence and calculate the call frequency of each API. Finally, the extracted API call sequence, call count, unique identifier (ID) of the extension, and version number are stored in a dedicated API database. To ensure the uniqueness of each extension, the system uses a combination of extension ID and version number as the unique identifier. During excessive privilege detection, the system queries the corresponding API call records and declared permissions using the combination of extension ID and version number, enabling precise analysis of privilege abuse and risk assessment. This design not only improves data accuracy but also provides a reliable foundation for subsequent permission audits and risk warnings.
[0032] To address the coexistence of Manifest V2 and V3 versions of extensions in the Chrome Web Store, this framework designs and implements a version-differentiated permission extraction protocol to handle the structural differences in permission declarations between different versions of extensions. For extensions based on the Manifest V2 specification, the system deeply parses the manifest.json file to synchronously extract API permissions and host permissions from a unified "permissions" field, ensuring full compatibility with traditional extensions. For extensions using the Manifest V3 specification, the system employs a dual-field extraction strategy, obtaining API permissions from the "permissions" field and host permissions from the "host_permissions" field, thus accurately adapting to the design philosophy of the new security model. All extracted metadata, including manifest version, extension unique identifier, name, version number, and permission set, is persistently stored in a structured database system using a unified schema. This data schema not only achieves isolated storage of permission logic but also ensures the interpretability and consistency of cross-version data through a version context annotation mechanism, providing a reliable data foundation for subsequent permission analysis and risk assessment.
[0033] In designing this detection framework, this invention focuses its analysis on essential permissions and core API calls, a decision based on multiple considerations. First, the core research objective of this invention is to identify systemic over-authorization behaviors related to core functionality in Chrome extensions. Essential permissions, as security requirements that extensions must declare when performing basic operations, are key indicators for assessing the risk of permission abuse and can effectively reflect whether unnecessary permission declarations exist during the extension's functionality implementation. Second, optional permissions (such as `optional_permissions` and `optional_host_permissions`) are typically dynamically requested at runtime based on user interaction; their uncertainty makes accurate evaluation difficult through static code analysis. Furthermore, content script permissions (`content_scripts.matches`) primarily operate in an independent security context, mainly used to control the interaction between the extension and the webpage, rather than the extension's core functional logic; therefore, they are not within the scope of this invention's analysis.
[0034] By limiting the scope of analysis to essential permissions, this invention not only maintains consistent analysis across different manifest versions (such as V2 and V3) but also ensures the comparability of research results throughout the entire extension ecosystem. This focused strategy helps to more accurately identify potential over-authorization patterns in the core functionality of extensions, avoiding biases caused by an overly broad analysis scope. Furthermore, this targeted analysis method aligns perfectly with the research objectives of this invention: to develop a lightweight yet efficient systematic over-authorization detection mechanism, rather than relying on a comprehensive permission analysis scheme that depends on dynamic runtime monitoring. This design not only improves detection efficiency but also provides a reliable theoretical foundation and technical support for subsequent permission optimization and risk warning.
[0035] Step 3: Establish the mapping between extended permissions and APIs
[0036] In the Chrome browser's security architecture, extensions must adhere to a strict access control mechanism. Specifically, extensions need to explicitly declare the permissions required for their functionality and can only call the corresponding API interfaces after the user actively authorizes them. This design aims to ensure that extensions only run within the scope of user permission, thereby maintaining system security. However, in practice, many extensions exhibit inconsistencies between their permission declarations and actual usage. They often request permissions beyond their functional requirements, or even permissions they have never used, clearly violating the Principle of Least Privilege. This discrepancy between permission declarations and actual calls not only wastes permission resources but also introduces potential security risks. For example, over-authorized extensions may be maliciously exploited to access sensitive user data or perform unauthorized operations. Therefore, effectively identifying and resolving permission abuse issues has become a key challenge in improving browser extension security. This invention, based on this background, proposes an innovative permission management scheme that aims to address the shortcomings of existing technologies through precise permission analysis and monitoring mechanisms, thereby providing users with a safer and more reliable browser extension usage environment.
[0037] Specifically, this solution first loads the association information between extension APIs and permissions from a predefined extension API-permission mapping table. Considering that Chrome extensions have two main versions, Manifest V2 and Manifest V3, this invention comprehensively analyzes the permission-API correspondence under different versions and establishes corresponding mapping models for each. In the Manifest V2 environment, the association between extension permissions and APIs is shown in Table 1, covering all core permissions and their corresponding API call rules under this version. In Manifest V3, due to updates to the architecture and permission model, this invention re-organizes the permission-API mapping logic, as shown in Table 2. Through in-depth comparative research on the two versions, this invention not only ensures compatibility with different versions of extensions but also more accurately identifies the differences between permission declarations and actual API calls. Furthermore, this invention optimizes and supplements the mapping table based on Chrome official documentation and practical development experience, ensuring it covers most common scenarios, thus providing a reliable data foundation for subsequent permission abuse detection.
[0038] Table 1: Permissions and corresponding extended APIs in Manifest V2
[0039]
[0040]
[0041] Table 2: Permissions and corresponding extended APIs in Manifest V3
[0042]
[0043]
[0044]
[0045] Step 4: Over-licensing detection
[0046] Tables 1 and 2 illustrate the canonical mapping between permissions defined in Chrome extension documentation and their corresponding APIs. To detect over-privileged extensions, this invention proposes a "PermissionOverprivileged Detector" method based on discrepancy analysis. This method systematically compares the permissions declared in the extension manifest file with API call patterns identified through static source code analysis. The detection workflow includes four stages: (1) establishing a permission-API mapping baseline based on official documentation; (2) identifying the permissions declared in the manifest file and the APIs actually called in the code through static analysis; (3) performing discrepancy analysis to detect inconsistencies between permission declarations and API usage; and (4) persistently storing over-privileged cases and their metadata (extension ID, version, unmatched permissions) in dual formats (SQLite database and JSON file) to support diverse application scenarios. This structured detection output enables downstream applications to generate user alerts for installed extensions, indicating the risk of over-privileged permissions.
[0047] Step 5: Data Storage
[0048] To ensure the persistence and scalability of detection results, this invention stores all identified over-authorization cases and their related metadata (including extension IDs, version numbers, lists of unmatched permissions, etc.) in a dual format (SQLite database and JSON file). The SQLite database provides efficient structured data management capabilities, facilitating rapid querying and analysis; while the JSON file stores data in a lightweight, easy-to-read format, supporting seamless integration with other systems. This dual-format storage design not only meets the needs of different application scenarios but also provides flexibility for subsequent data analysis and visualization. Through this structured data storage method, downstream applications can easily access the detection results and generate user alerts based on permission risk levels, helping users to understand and adjust extension permission settings in a timely manner, thereby effectively reducing security risks caused by excessive permission granting.
[0049] Step 6: Design a new permission warning mechanism
[0050] When developers release browser extensions, the Google Play Store primarily checks the extension's `manifest` file for compliance, lacking in-depth review of the appropriateness of permission usage. When a user installs an extension, Google decides whether to display a warning pop-up based on the intrusiveness of the permissions. For highly intrusive permissions, the system will display a prompt requiring user confirmation; for less intrusive permissions, they are granted silently. When a developer adds permissions that require a warning, the extension is temporarily disabled until the user explicitly agrees to the new permission request. However, once the extension is installed, subsequent updates are automatic and not subject to a second review by the Google Play Store.
[0051] This loose review mechanism provides an opportunity for the spread of malicious extensions, allowing attackers to exploit this vulnerability to distribute harmful extensions through the official store. Furthermore, Google's existing permission warning mechanism relies on a single criterion (i.e., the level of intrusiveness of permissions), making it difficult for users to fully understand the actual risks of different permissions and to intuitively identify potential malicious behavior from extensions. Therefore, designing a more granular permission management mechanism to help users better understand and defend against the threat of malicious extensions is particularly important.
[0052] To address the aforementioned issues, this invention proposes a novel permission classification and warning mechanism. This mechanism evaluates permissions based on three core criteria: whether the permission is too broad, whether it will trigger a warning, and the potential danger of granting the permission. According to these criteria, this invention classifies browser extension permissions into four levels: Critical (highest risk), High (highest risk), Medium (medium risk), and Low (lowest risk). Specifically, if a permission poses a risk in all three criteria, it is marked as Critical; if it poses a risk in two criteria, it is marked as High; if it poses a risk in only one criterion, it is marked as Medium; and if no issues are found in any of the criteria, it is marked as Low. The following will elaborate on the three classification criteria designed in this invention and their specific application scenarios.
[0053] When evaluating the security of Chrome extension permissions, this invention primarily analyzes it from three dimensions: the breadth of the permission scope, the likelihood of triggering warnings, and the potential risks of granting permissions. First, regarding the breadth of the permission scope, this invention focuses on permissions that may excessively expose user privacy data. For example, some extensions, after obtaining certain permissions, can easily access sensitive user information. For instance, the history permission allows the extension to access the user's complete browsing history, while the tabs permission enables the extension to create, modify, or rearrange browser tabs. Granting these permissions may lead to excessive exposure of user privacy data and is therefore included as one of the evaluation criteria in this invention.
[0054] Secondly, whether a permission triggers a warning is also an important metric. Permissions that typically trigger warnings involve sensitive or high-risk operations, such as access to a user's location, camera, or microphone. These permissions are usually granted with a clear notification to the user to ensure they are aware of the potential risks. This invention analyzes the characteristics of these permissions and identifies them as a key factor in evaluating extended security. Specifically, Table 3 lists all permissions that may trigger warnings and their associated descriptions.
[0055] Finally, the inherent risks of permission granting are also a key focus of this invention's evaluation. Certain permissions may be granted without the user's knowledge or automatically acquired at inappropriate times, which can pose significant security risks. For example,<all_urls> Although the permission falls under the `host_permissions` category, it allows extended access to all web page content without explicit notification to the user during installation, thus being considered a high-risk permission. In contrast, the `power` permission is only used to monitor the device's power status and adjust device behavior as needed, posing a lower potential risk. Through in-depth analysis of permission granting behavior, this invention can more accurately identify and assess the security of extended permissions.
[0056] In summary, this study constructed a comprehensive evaluation system based on three dimensions: the breadth of the permission scope, the likelihood of warnings being triggered, and the risk of the granting action. Therefore, this invention reclassifies extended permissions according to the breadth of the permissions, the risk of the permission granting operation, and whether a warning is triggered, as shown in Table 3.
[0057] Table 3: Classification of Permission Risk Levels in the New Permission Warning Mechanism
[0058]
[0059]
[0060]
[0061] Step 7: Develop the "Permission Guard" extension
[0062] Existing permission warning mechanisms have certain limitations. Users find it difficult to intuitively identify potential malicious behavior from browser extensions and lack a clear understanding of the risk levels of various permissions. To address this issue, this invention develops a Google Chrome extension called Permission Guard. This tool can assess the permission risk level of a user's installed extensions in real time and issue alerts to help identify any over-granting. For example, when a user installs the extension "papers.labml.ai", Permission Guard will check its permissions and provide potential malicious behavior alerts and risk level assessments, as shown in the following figures. Figure 3 As shown. Furthermore, this extension will also display the differences between permission claims and actual usage in the form of notifications and warnings, with related results as follows: Figure 4 As shown. In this way, users can more clearly understand the potential risks of the extension and take corresponding protective measures. The "Permission Guard" extension of this invention displays the detection results through a visual interface, including the extension's permission risk level and over-authorization information, helping users optimize permission management.
[0063] Based on the above implementation methods, this invention addresses the security vulnerabilities in existing browser extension permission management by proposing an innovative permission management scheme. Through in-depth analysis of the relationship between Chrome extension permission declarations and actual API calls, a detection method called "PermissionOverprivileged Detector" is designed to address issues such as over-authorization and permission abuse. This method automatically identifies and assesses the risk of permission abuse by comparing the permissions declared by the extension with the actual API calls. Specifically, this invention constructs a mapping table between permissions and API calls, and performs a difference analysis on the permission requests of each extension based on this table, thereby accurately identifying whether a Chrome extension has over-authorized permissions. Simultaneously, this invention also incorporates a novel permission review mechanism, proposing an innovative browser extension permission management system and developing an extension called "Permission Guard." This extension can not only detect whether user-installed extensions have over-authorized permissions but also issue warnings to users based on the risk level of the permissions. Users can optimize and adjust the permissions granted to extensions based on the warning information, thereby effectively avoiding security risks caused by over-authorization. This achieves real-time monitoring and risk warning of extension permissions, effectively improving the security of browser extensions. Results show that in a dataset containing 199,058 extension samples, this method successfully detected 98,072 extensions with inconsistent permission requests and actual behavior, verifying the effectiveness and practicality of the method.
[0064] It should be further noted that the above embodiments are only used for understanding the technical solution of the present invention and are not intended to limit the scope of protection of the present invention. Any obvious adjustments and modifications made to the technical solution of the present invention that are part of the technical concept of the present invention should also be within the scope of protection of the present invention.
Claims
1. A method for detecting and issuing warnings about over-authorization of Chrome extensions, characterized in that, Includes the following steps: Data set collection: Obtain Chrome extension sample data from the Google Play Store, including extension CRX archive files, extension ID, extension name, extension version number, and metadata information, as input samples; Information extraction: Parse the extended manifest.json file. For Manifest V2, extract both API permissions and host permissions from the unified permissions field. For Manifest V3, extract API permissions from the permissions field and host permissions from the host_permissions field. Lexical analysis based on the Esprima library is performed on all JavaScript source code files of the extension. Building Permission-API Mapping: Based on the official Chrome documentation, we compiled a mapping table of all Permissions and their corresponding APIs for Manifest V2 and Manifest V3, serving as a benchmark for over-authorization detection; Design detection method: Based on the extracted extended API, extended Permission, Manifest version number, and extended ID information, combined with the permission-API mapping table, a "Permission OverprivilegedDetector" detection method based on differential analysis is designed. By comparing the extended permissions with the API mapping table, Chrome extensions that have requested permissions but have not used the corresponding APIs are identified, i.e., extensions that have been over-privileged. Data storage: Design and implement two data storage methods, including relational database format and JSON format, for storing detected over-authorization Chrome extension information; Permission warning mechanism: A new permission warning mechanism indicator system is designed. Through three evaluation dimensions, namely permission generality, risk warning mechanism, and authorization harm, Chrome extension permissions are divided into four risk levels: Critical (highest risk), High (highest risk), Medium (medium risk), and Low (basic risk). Develop an extension: Develop a Chrome extension called "Permission Guard" to monitor the usage of permissions for extensions installed by users in real time, and provide permission risk level assessment and early warning functions; In the step of collecting the dataset, the information collected includes all Chrome extension sample data and its metadata information obtained from the Google Play Store; In the data storage step, the detected over-authorization Chrome extension information is stored in relational database format and JSON format. The relational database is used for efficient querying and management, and the JSON format is used for lightweight data exchange. In the development of the extension, the developed "Permission Guard" extension can scan all Chrome extensions installed by the user, identify extensions with over-authorization issues, and provide permission risk level assessment and early warning functions based on the permission warning mechanism indicator system established above.
2. The method according to claim 1, characterized in that, In the information extraction step, extended permission declarations (Permissions) and actual API interfaces (APIs) are extracted using static analysis techniques. Based on the extracted information, a feature index extraction and data storage method based on static analysis is designed.
3. The method according to claim 1, characterized in that, The design detection method steps include the "Permission Overprivileged Detector" detection method based on difference analysis, which includes four stages: (1) Establishing a permission-API mapping benchmark based on the official documentation; (2) Identify the permissions declared in the manifest file and the APIs actually called in the code through static analysis; (3) Perform a difference analysis to detect inconsistencies between permission declarations and API usage; (4) Persistently store over-authorized cases and their metadata, including extended IDs, versions, and unmatched permissions, in a dual format to support diverse application scenarios; The dual formats mentioned refer to SQLite database and JSON file format.
4. The method according to claim 1, characterized in that, In the permission warning mechanism, the permission generality focuses on permissions that can excessively expose user privacy data; the risk warning mechanism focuses on permissions involving sensitive or high-risk operations. When such permissions are granted, a clear prompt will be issued to the user to ensure that the user is aware of the potential risks. The aforementioned risks of authorization focus on the possibility that certain permissions may be granted without the user's knowledge or automatically acquired at inappropriate times, posing a high security risk to the user. When access rights to functions pose risks across all assessment dimensions, they are classified as the highest risk level; if security flaws are involved in two dimensions, they are assessed as high risk; if a potential threat exists only in a single dimension, they are classified as medium risk; and when all review indicators comply with security standards, they are marked as basic risk level.
5. The method according to claim 1, characterized in that, The "Permission Guard" extension displays detection results through a visual interface, including the extended permission risk level and over-authorization information, helping users optimize permission management.