Home Cyber Security News Mozilla Hardens Their Firefox Browser To Fend Off Code Injection Attacks

Mozilla Hardens Their Firefox Browser To Fend Off Code Injection Attacks

by Abeerah Hashim
Mozilla network partitioning

Mozilla has announced another bold step towards ensuring better security for users. This time, they will be fending off code injection attacks by making changes to the Firefox browser.

Changes In Firefox Browser Against Code Injection Attacks

In a recent post, Mozilla has revealed some major changes to the Firefox browser. These changes will help Mozilla make Firefox secure against code injection attacks.

Specifically, the changes include removal of ‘potentially dangerous artifacts’ such as ‘inline scripts’ and ‘eval()-like functions’. By doing so, they strive to ‘reduce the attack surface’ and harden the code.

Removing Inline Scripts

Explaining about the removal of inline scripts, they revealed that this step would strengthen the Firefox ‘about protocol’. In simple words, there were numerous about:pages allowing an insight to the internal browser state. Notably, the about:config exposed an API allowing users to make changes to the Firefox settings. Since these pages implemented HTML and JavaScript, they remained vulnerable to code injection attacks. Consequently, Mozilla decided to remove inline scripts.

As stated in the blog post,

To better protect our users and to add an additional layer of security to Firefox, we rewrote all inline event handlers and moved all inline JavaScript code to packaged files for all 45 about: pages. This allowed us to apply a strong Content Security Policy (CSP) such as ‘default-src chrome:’ which ensures that injected JavaScript code does not execute. Instead JavaScript code only executes when loaded from a packaged resource using the internal chrome: protocol.

Removing eval()-like Functions

In another attempt to reduce the attack surface, Mozilla decides to remove a ‘powerful yet dangerous tool’ – eval()-like Functions.

According to the blog,

To further minimize the attack surface in Firefox and discourage the use of eval() we rewrote all use of ‘eval()’-like functions from system privileged contexts and from the parent process in the Firefox codebase. Additionally we added assertions, disallowing the use of ‘eval()’ and its relatives in system-privileged script contexts.

Besides, during their assessment, they noticed some uses of eval to customize Firefox start up via unintended tricks. So, for such cases, they assure allowing usage of eval().

Let us know your thoughts in the comments.

You may also like

Latest Hacking News

Privacy Preference Center

Necessary

The __cfduid cookie is used to identify individual clients behind a shared IP address and apply security settings on a per-client basis.

cookie_notice_accepted and gdpr[allowed_cookies] are used to identify the choices made from the user regarding cookie consent.

For example, if a visitor is in a coffee shop where there may be several infected machines, but the specific visitor's machine is trusted (for example, because they completed a challenge within your Challenge Passage period), the cookie allows Cloudflare to identify that client and not challenge them again. It does not correspond to any user ID in your web application, and does not store any personally identifiable information.

__cfduid, cookie_notice_accepted, gdpr[allowed_cookies]

Advertising

DoubleClick by Google refers to the DoubleClick Digital Marketing platform which is a separate division within Google. This is Google’s most advanced advertising tools set, which includes five interconnected platform components.

DoubleClick Campaign Manager: the ad-serving platform, called an Ad Server, that delivers ads to your customers and measures all online advertising, even across screens and channels.

DoubleClick Bid Manager – the programmatic bidding platform for bidding on high-quality ad inventory from more than 47 ad marketplaces including Google Display Network.

DoubleClick Ad Exchange: the world’s largest ad marketplace for purchasing display, video, mobile, Search and even Facebook inventory.

DoubleClick Search: is more powerful than AdWords and used for purchasing search ads across Google, Yahoo, and Bing.

DoubleClick Creative Solutions: for designing, delivering and measuring rich media (video) ads, interactive and expandable ads.

doubleclick

Analytics

The _ga is asssociated with Google Universal Analytics - which is a significant update to Google's more commonly used analytics service. This cookie is used to distinguish unique users by assigning a randomly generated number as a client identifier. It is included in each page request in a site and used to calculate visitor, session and campaign data for the sites analytics reports. By default it is set to expire after 2 years, although this is customisable by website owners.

The _gat global object is used to create and retrieve tracker objects, from which all other methods are invoked. Therefore the methods in this list should be run only off a tracker object created using the _gat global variable. All other methods should be called using the _gaq global object for asynchronous tracking.

_gid works as a user navigates between web pages, they can use the gtag.js tagging library to record information about the page the user has seen (for example, the page's URL) in Google Analytics. The gtag.js tagging library uses HTTP Cookies to "remember" the user's previous interactions with the web pages.

_ga, _gat, _gid