Broad Host Permissions
Flags items that declare overly broad host access patterns, enabling interaction with all websites. This level of access can be exploited to inject scripts into trusted sites and increases the risk of sensitive data exposure, cross-site surveillance, and credential harvesting.
Collection of Authentication Information
Flags items that disclose collecting authentication information, including passwords, credentials, or PINs, which may lead to account breaches or unauthorized access.
Collection of Personal Communications
Flags items that disclose collecting personal communications, such as emails, chat messages, or social media posts, which may compromise private conversations or sensitive data.
Code Purpose and Intention
Adminer PRO is a Chrome extension designed to enhance the user experience with Facebook's Ads Library. It allows users to filter and highlight creatives with high ad volume, helping professionals in paid traffic, copywriting, and creative fields to identify trends and analyze competition efficiently.
Code Functionality
- Localization: The extension uses the Chrome i18n API to provide localized messages based on the user's browser language settings. This is achieved through functions like
getMessageandlocalizePage.
function getMessage(messageName) {
return chrome.i18n.getMessage(messageName);
}
function localizePage() {
var elements = document.querySelectorAll('[data-i18n]');
elements.forEach(element => {
var key = element.getAttribute('data-i18n');
element.textContent = getMessage(key);
});
}
- Installation Event Handling: The extension listens for the installation event to set default settings and open the options page.
chrome.runtime.onInstalled.addListener(function (details) {
if (details.reason === 'install') {
setDefaultSettings();
chrome.runtime.openOptionsPage();
}
});
- Default Settings: Sets default language and other settings based on the user's browser language.
function setDefaultSettings() {
var browserLanguage = navigator.language.split('-')[0];
var supportedLanguages = ['en', 'pt'];
var defaultLanguage = supportedLanguages.includes(browserLanguage) ? browserLanguage : 'en';
chrome.storage.sync.set({
language: defaultLanguage,
customSetting: 'default value',
activeFooter: {}
});
}
- Message Handling: The extension listens for messages and processes them accordingly, such as fetching data or retrieving the current tab ID.
chrome.runtime.onMessage.addListener(function (message, sender, sendResponse) {
if (message.action === 'getData') {
fetchData().then(data => sendResponse({ success: true, data: data }));
return true;
}
if (message.action === 'getTabId') {
if (sender.tab && sender.tab.id) {
sendResponse({ success: true, tabId: sender.tab.id });
} else {
chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) {
if (tabs.length > 0) {
sendResponse({ success: true, tabId: tabs[0].id });
} else {
sendResponse({ success: false, error: 'No active tab found' });
}
});
return true;
}
}
sendResponse({ success: false, error: 'Unknown action' });
return true;
});
Network and API Activity
- The extension uses the Chrome Storage API to save settings and the Chrome Tabs API to query active tabs.
- No external network requests or data exfiltration activities were observed.
Obfuscation
- The code is not obfuscated. It uses standard JavaScript and Webpack for module bundling, which is typical for Chrome extensions.
Conclusion
The code appears to be a legitimate Chrome extension with no indicators of malicious behavior. It focuses on enhancing user interaction with Facebook's Ads Library by providing filtering and localization features.
API Access
tabs: Provides access to privileged information about open tabs including URLs, titles, and loading status, beyond basic tab management.
storage: Enables persistent data storage for the extension, potentially storing large amounts of user-related information.
activeTab: Grants temporary access to the current tab's data when triggered by user interaction, limiting scope compared to permanent permissions.
Chrome Runtime Events
- chrome.runtime.onInstalled
/background.js
- chrome.runtime.onMessage
/background.js
API Call Summary
All API calls are available for Enterprise users.