{"id":52871,"date":"2025-01-15T11:20:00","date_gmt":"2025-01-15T16:20:00","guid":{"rendered":"https:\/\/www.kaspersky.com\/blog\/?p=52871"},"modified":"2025-01-15T11:20:00","modified_gmt":"2025-01-15T16:20:00","slug":"chrome-extension-malicious-updates-and-mitigations","status":"publish","type":"post","link":"https:\/\/www.kaspersky.com\/blog\/chrome-extension-malicious-updates-and-mitigations\/52871\/","title":{"rendered":"How to defend against hijacking and trojanization of Chrome extensions"},"content":{"rendered":"<p>Right after Christmas, <a href=\"https:\/\/www.cyberhaven.com\/engineering-blog\/cyberhavens-preliminary-analysis-of-the-recent-malicious-chrome-extension\" target=\"_blank\" rel=\"nofollow noopener\">news broke<\/a> of a multi-stage attack targeting developers of popular Chrome extensions. Ironically, the biggest-name target was a cybersecurity extension created by Cyberhaven \u2014 compromised just before the holidays (<a href=\"https:\/\/www.kaspersky.com\/blog\/xmas-network-security\/46653\/\" target=\"_blank\" rel=\"noopener nofollow\">we\u2019d previously warned<\/a> about such risks). As the incident investigation unfolded, the list grew to include <a href=\"https:\/\/www.extensiontotal.com\/cyberhaven-incident-live\" target=\"_blank\" rel=\"nofollow noopener\">no fewer than 35 popular extensions<\/a>, with a combined total of 2.5 million installations. The attackers\u2019 goal was to steal data from the browsers of users who installed trojanized updates of these extensions. The focus of the campaign was on stealing credentials for Meta services to compromise business accounts and display ads at victims\u2019 expense. However, that\u2019s not the only data that malicious extensions can steal from browsers. We explain how the attack works, and what measures you can take to protect yourself against it at different stages.<\/p>\n<h2>Attacking developers: OAuth abuse<\/h2>\n<p>To inject trojan functionality into popular Chrome extensions, cybercriminals have developed an original phishing scheme. They send developers emails disguised as standard Google alerts claiming that their extension violates Chrome Web Store policies and needs a new description. The text and layout of the message mimic typical Google emails, so the victim is often convinced. Moreover, the email is often sent from a domain set up to attack a specific extension and containing the name of the extension in the actual domain name.<\/p>\n<p>Clicking the link in the email takes the user to a legitimate Google authentication page. After that, the developer sees another standard Google screen prompting to sign in via OAuth to an app called \u201cPrivacy Policy Extension\u201d, and to grant certain permissions to it as part of the authentication process. This standard procedure takes place on legitimate Google pages, except that the \u201cPrivacy Policy Extension\u201d app requests permission to publish other extensions to the Chrome Web Store. If this permission is granted, the creators of \u201cPrivacy Policy Extension\u201d are able to publish updates to the Chrome Web Store on behalf of the victim.<\/p>\n<p>In this case, there\u2019s no need for the attackers to steal the developer\u2019s password or other credentials, or to bypass multi-factor authentication (MFA). They simply abuse Google\u2019s system for granting permissions to trick developers into authorizing the publication of updates to their extensions. Judging by the <a href=\"https:\/\/www.virustotal.com\/gui\/ip-address\/149.248.2.160\/relations\" target=\"_blank\" rel=\"nofollow noopener\">long list<\/a> of domains registered by the attackers, they attempted to attack far more than 35 extensions. In cases where the attack was successful, they released an updated version of the extension, adding two files for stealing Facebook cookies and other data (worker.js and content.js).<\/p>\n<h2>Attacking users<\/h2>\n<p>Chrome extensions typically receive updates automatically, so users who switched on their machines between December 25 and December 31, and opened Chrome, may have received an infected update of a previously installed extension.<\/p>\n<p>In this event, a malicious script runs in the victim\u2019s browser and sends data needed for compromising Facebook business accounts to the attackers\u2019 server. In addition to Facebook identifiers and <a href=\"https:\/\/www.kaspersky.com\/blog\/youtubers-takeovers\/48375\/\" target=\"_blank\" rel=\"noopener nofollow\">cookies<\/a>, the malware steals information required to log in to the target\u2019s advertising account, such as the user-agent data to identify the user\u2019s browser. On facebook.com, even mouse-click data is intercepted to help the threat actors bypass CAPTCHA and two-factor authentication (2FA). If the victim manages ads for their company or private business on Meta, the cybercriminals get to spend their advertising budget on their own ads \u2014 typically promoting scams and malicious sites (<a href=\"https:\/\/www.kaspersky.com\/blog\/cyberattacks-on-your-marketing\/50571\/\" target=\"_blank\" rel=\"noopener nofollow\">malvertising<\/a>). On top of the direct financial losses, the targeted organization faces legal and reputational risks, as the fake ads are published under its name.<\/p>\n<p>The malware can conceivably steal data from other sites too, so it\u2019s worth checking your browser even if you don\u2019t manage Facebook ads for a company.<\/p>\n<h2>What to do if you installed an infected extension update<\/h2>\n<p>To stop the theft of information from your browser, the first thing you need to do is to uninstall the compromised extension or update it to a patched version. See <a href=\"https:\/\/www.extensiontotal.com\/cyberhaven-incident-live\" target=\"_blank\" rel=\"nofollow noopener\">here<\/a> for a list of all known infected extensions with their current remediation status. Unfortunately, simply uninstalling or updating the infected extension is <strong>not enough<\/strong>. You should also reset any passwords and API keys that were stored in the browser or used during the incident period.<\/p>\n<p>Then, check the available logs for signs of communication with the attackers\u2019 servers. IoCs are available <a href=\"https:\/\/www.extensiontotal.com\/cyberhaven-incident-live\" target=\"_blank\" rel=\"nofollow noopener\">here<\/a> and <a href=\"https:\/\/keepaware.com\/blog\/cyberhaven-browser-extension-compromise\" target=\"_blank\" rel=\"nofollow noopener\">here<\/a>. If communication with malicious servers was made, look for traces of unauthorized access in all services that were opened in the infected browser.<\/p>\n<p>After that, if Meta or any other advertising accounts were accessed from the infected browser, manually check all running ads, and stop any unauthorized advertising activity you find. Lastly, deactivate any compromised Facebook account sessions on all devices (<a href=\"https:\/\/www.facebook.com\/help\/211990645501187\/\" target=\"_blank\" rel=\"nofollow noopener\">Log out all other devices<\/a>), clear the browser cache and cookies, log in to Facebook again, and change the account password.<\/p>\n<h2>Incident takeaways<\/h2>\n<p>This incident is another example of <a href=\"https:\/\/www.kaspersky.com\/blog\/supply-chain-attacks-what-are-they-and-how-to-manage-the-risk\/52852\/\" target=\"_blank\" rel=\"noopener nofollow\">supply-chain attacks<\/a>. In the case of Chrome, it\u2019s made worse by the fact that updates are installed automatically without notifying the user. While updates are usually a good thing, here the auto-update mechanism allowed malicious extensions to spread quickly. To mitigate the risks of this scenario, companies are advised to do the following:<\/p>\n<ul>\n<li>Use group policies or the Google Admin console to restrict the installation of browser extensions to a trusted list;<\/li>\n<li>Create a list of trusted extensions based on business needs and information security practices used by the developers of said extensions;<\/li>\n<li>Apply <a href=\"https:\/\/support.google.com\/chrome\/a\/answer\/11190170?hl=en\" target=\"_blank\" rel=\"nofollow noopener\">version pinning<\/a> to disable automatic extension updates. At the same time, it\u2019ll be necessary to put in place a procedure for update monitoring and centralized updating of approved extensions by administrators;<\/li>\n<li>Install an <a href=\"https:\/\/www.kaspersky.com\/enterprise-security\/endpoint-detection-response-edr?icid=gl_kdailyplacehold_acq_ona_smm__onl_b2b_kasperskydaily_wpplaceholder_______\" target=\"_blank\" rel=\"noopener nofollow\">EDR solution<\/a> on all devices in your organization to protect against malware and monitor suspicious events.<\/li>\n<\/ul>\n<p>Companies that publish software, including web extensions, need to ensure that permission to publish is granted to the minimum number of employees necessary \u2014 ideally from a privileged workstation with additional layers of protection, including MFA and tightly configured application launch control and website access. Employees authorized to publish need to undergo regular <a href=\"https:\/\/k-asap.com\/en\/?icid=gl_kdailyplacehold_acq_ona_smm__onl_b2b_kasperskydaily_wpplaceholder____kasap___\" target=\"_blank\" rel=\"noopener\">information security training<\/a>, and be familiar with the latest attacker tactics, including spear phishing.<\/p>\n<input type=\"hidden\" class=\"category_for_banner\" value=\"mdr\"><input type=\"hidden\" class=\"placeholder_for_banner\" data-cat_id=\"mdr\" value=\"37723\">\n","protected":false},"excerpt":{"rendered":"<p>Dangerous features are creeping into legitimate Chrome extensions. How to keep your organization safe?<\/p>\n","protected":false},"author":2722,"featured_media":52872,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1999,3051,3052],"tags":[1278,16,1499,20,187,726,321],"class_list":{"0":"post-52871","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-business","8":"category-enterprise","9":"category-smb","10":"tag-browsers","11":"tag-chrome","12":"tag-extensions","13":"tag-facebook","14":"tag-passwords","15":"tag-scam","16":"tag-technology"},"hreflang":[{"hreflang":"x-default","url":"https:\/\/www.kaspersky.com\/blog\/chrome-extension-malicious-updates-and-mitigations\/52871\/"},{"hreflang":"ru","url":"https:\/\/www.kaspersky.ru\/blog\/chrome-extension-malicious-updates-and-mitigations\/38881\/"},{"hreflang":"ru-kz","url":"https:\/\/blog.kaspersky.kz\/chrome-extension-malicious-updates-and-mitigations\/28691\/"}],"acf":[],"banners":"","maintag":{"url":"https:\/\/www.kaspersky.com\/blog\/tag\/chrome\/","name":"Chrome"},"_links":{"self":[{"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/52871","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/users\/2722"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/comments?post=52871"}],"version-history":[{"count":1,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/52871\/revisions"}],"predecessor-version":[{"id":52873,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/52871\/revisions\/52873"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/media\/52872"}],"wp:attachment":[{"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/media?parent=52871"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/categories?post=52871"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/tags?post=52871"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}