It is currently Mon Jul 21, 2025 4:35 pm



Reply to topic  [ 6 posts ] 
Sneaky Microsoft Firefox Extension 
Author Message
Felix Rex
User avatar

Joined: Fri Mar 28, 2003 6:01 pm
Posts: 16701
Location: On a slope
Reply with quote
Post Sneaky Microsoft Firefox Extension
Ok, so Microsoft slipped a Firefox extension in with some updates recently. Chances are you all have it if you run FF. Go to Tools -> AddOns and look for Microsoft .NET Framework Assistant. There? Yeap, thought so. Irritating. Among other things, it actually alters your browser identification string. Go Microsoft!

Of course, you can't remove it via the addons panel, you have to do it via the registry and deleting files off the hard drive. Go Microsoft! Here's some quick instructions, gotten via http://nambulous.wordpress.com/2008/08/ ... m-firefox/.

Launch the registry editor via start | run | regedit
go to HKEY_LOCAL_MACHINE/SOFTWARE/Mozilla/Firefox/Extensions
delete the value on the right, or just delete the whole extensions key if you want.

go to HKEY_LOCAL_MACHINE/SOFTWARE/MozillePlugins
delete the key @microsoft.com/WPF,version=3.5

on the hard drive, go to C:\Windows\Microsoft.NET\Framework\v3.5\Windows Presentation Foundation
Delete everything in this folder

In Firefox, type about:config in the address bar and click ok on the warning.
In filter type microsoft.
find "general.useragent.extra.microsoftdotnet" and "microsoft.CLR.clickonce.autolaunch", right click on them and choose reset, then close and reopen Firefox

That should do it. The values should be gone from about:config and the add-on will be gone from the addons. Good times to be had by all!

_________________
They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety.


Mon Feb 02, 2009 7:53 am
Profile WWW
Minor Diety
User avatar

Joined: Fri Apr 11, 2003 5:09 pm
Posts: 4004
Location: Walsall, West Mids, UK
Reply with quote
Post 
Hmm, nothing in my add-ons list yet - but next time my PC get's any windows updates I'll be double checking.

What's it supposed to actually do?

Thanks for the H/U either way :D

_________________
Games to complete:
GTA IV [100%] (For Multiplayer next!)
Fallout 3 [50%]
Rock Band [35%]
http://www.cafepress.com/SmeepProducts


Mon Feb 02, 2009 12:11 pm
Profile WWW
Minor Diety
User avatar

Joined: Mon Mar 31, 2003 7:23 am
Posts: 14892
Location: behind a good glass of Duvel
Reply with quote
Post 
It's MS. It eats your babies. It also rapes puppies.

_________________
"I find a Burger Tank in this place? I'm-a be a one-man cheeseburger apocalypse."

- Coach


Mon Feb 02, 2009 12:39 pm
Profile
Felix Rex
User avatar

Joined: Fri Mar 28, 2003 6:01 pm
Posts: 16701
Location: On a slope
Reply with quote
Post 
People are guessing it's setting the way for some new Microsoft web initiative. Maybe a new push for Silverlight or something, I don't know. The fact it installs on a non-Microsoft product without so much as a warning is inexcusable.

I'll probably write an app to automate removing this thing.

_________________
They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety.


Mon Feb 02, 2009 2:12 pm
Profile WWW
Felix Rex
User avatar

Joined: Fri Mar 28, 2003 6:01 pm
Posts: 16701
Location: On a slope
Reply with quote
Post 
well, I was working on it but I'm kinda burned out at this point. Deleting the physical files is easy. I got removing one of the two reg keys automated...the second one is giving me permission denied errors for some reason. That's where I gave up.

I'm not sure how to edit the about:config values. I thought they'd be in user.js, but they're not. They may be in the sqlite db, but I don't really know.

Anyway, for now I'll just paste up my source code. If I ever finish it, I'll post the full project and binary.

You may ask why do I care so much? I don't. It's just good practice doing c# winform development. I'm still a noob.

the code:
Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.Win32;
using System.Security;
using System.IO;

namespace cleanMSFirefoxAddon
{
    public partial class mainForm : Form
    {

        public mainForm()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            messages.Text = "Deleting registry entries\n";
            //remove registry entries
            string keybase = "SOFTWARE\\Mozilla\\Firefox";
            RegistryKey key = Registry.LocalMachine.OpenSubKey(keybase + "\\extensions");
            if (key == null)
            {
                //maybe 64bit Vista
                keybase = "SOFTWARE\\Wow6432Node\\Mozilla\\Firefox";
                key = Registry.LocalMachine.OpenSubKey(keybase + "\\extensions");
            }
            if (key != null)
            {
                clearRegistry(keybase, "extensions");
            }
            else
            {
                messages.Text += "     extensions key does not exist.\n";
            }
            keybase = "SOFTWARE\\MozillaPlugins";
            key = Registry.LocalMachine.OpenSubKey(keybase + "\\@microsoft.com/WPF,version=3.5");
            if (key == null)
            {
                //maybe 64bit Vista
                keybase = "SOFTWARE\\Wow6432Node\\MozillaPlugins";
                key = Registry.LocalMachine.OpenSubKey(keybase + "\\@microsoft.com/WPF,version=3.5");
            }
            if (key != null)
            {
                clearRegistry(keybase, "@microsoft.com/WPF,version=3.5");
            }
            else
            {
                messages.Text += "     @microsoft.com/WPF,version=3.5 key does not exist.";
            }

            //remove physical files
            if (!clearFiles())
            {
                messages.Text += "Deleting physical files failed, aborting.\n";
                return;
            }

            //make changes to about:config
            if (!resetConfig())
            {
                messages.Text += "Reseting about:config failed, aborting.\n";
                return;
            }

        }
        private void clearRegistry(string keybase, string extension)
        {
            RegistryKey key = Registry.LocalMachine.OpenSubKey(keybase);
            messages.Text += "     Attempting to delete " + keybase + "\\" + extension + "\n";
            try
            {
                key.DeleteSubKeyTree(extension);
                messages.Text += "    Deleted key " + key.Name + "\n";
            }
            catch (ArgumentException ex)
            {
                messages.Text += "     The key appears to no longer exist.  Since we tested for its existence, this is odd.  Aborting.\n     " +
                    ex.Message + "\n";
            }
            catch (SecurityException ex)
            {
                messages.Text += @"     You don't have permissions to delete the registry key.\n " +
                    "     Be sure you're running this application as an administrator.\n     " +
                    ex.Message + "\n";
            }
            catch (UnauthorizedAccessException ex)
            {
                messages.Text += "     You don't have permissions to delete the registry key.\n " +
                    "     Be sure you're running this application as an administrator.\n     " +
                    ex.Message + "\n";
            }
            catch (ObjectDisposedException ex)
            {
                messages.Text += @"     This exception should only occur if the registry key was deleted at the " +
                    "same time this delete request was made.  Aborting application run.\n     " + ex.Message + "\n";
            }
            catch (Exception ex)
            {
                messages.Text += @"     Uncaught exception, aborting: " + ex.Message + "\n";
            }
        }
        private bool clearFiles()
        {
            string path = Environment.GetEnvironmentVariable("WINDIR") + @"\Microsoft.NET\Framework\v3.5\Windows Presentation Foundation\DotNetAssistanceExtension";
            if (Directory.Exists(path))
            {
                Directory.Delete(path, true);
                messages.Text += "Deleted files\n";
            }
            else
            {
                messages.Text += "Files do not exist\n";
            }
            return true;
        }
        private bool resetConfig()
        {
            /*
             *  not sure
             * 
             */
            return true;
        }

    }
}

_________________
They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety.


Wed Feb 04, 2009 2:38 pm
Profile WWW
Felix Rex
User avatar

Joined: Fri Mar 28, 2003 6:01 pm
Posts: 16701
Location: On a slope
Reply with quote
Post 
yea, I know noone cares. :(

I found the bug with deleting the reg keys. Stupid mistake on my part, but they usually are. I also found one of the 3 about:config values but haven't coded the routines to remove it from the prefs file. So far this app *should* work for all versions of Windows to remove the reg files and physical files on the hard drive. About:config values still need to be altered manually.
Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.Win32;
using System.Security;
using System.IO;

namespace cleanMSFirefoxAddon
{
    public partial class mainForm : Form
    {

        public mainForm()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            messages.Text = "Deleting registry entries\n";
            //remove registry entries
            string keybase = "SOFTWARE\\Mozilla\\Firefox";
            RegistryKey key = Registry.LocalMachine.OpenSubKey(keybase + "\\extensions");
            if (key == null)
            {
                //maybe 64bit Vista
                keybase = "SOFTWARE\\Wow6432Node\\Mozilla\\Firefox";
                key = Registry.LocalMachine.OpenSubKey(keybase + "\\extensions");
            }
            if (key != null)
            {
                clearRegistry(keybase, "extensions");
            }
            else
            {
                messages.Text += "     extensions key does not exist.\n";
            }
            keybase = "SOFTWARE\\MozillaPlugins";
            key = Registry.LocalMachine.OpenSubKey(keybase + "\\@microsoft.com/WPF,version=3.5");
            if (key == null)
            {
                //maybe 64bit Vista
                keybase = "SOFTWARE\\Wow6432Node\\MozillaPlugins";
                key = Registry.LocalMachine.OpenSubKey(keybase + "\\@microsoft.com/WPF,version=3.5");
            }
            if (key != null)
            {
                clearRegistry(keybase, "@microsoft.com/WPF,version=3.5");
            }
            else
            {
                messages.Text += "     @microsoft.com/WPF,version=3.5 key does not exist.";
            }

            //remove physical files
            if (!clearFiles())
            {
                messages.Text += "Deleting physical files failed, aborting.\n";
                return;
            }

            //make changes to about:config
            if (!resetConfig())
            {
                messages.Text += "Reseting about:config failed, aborting.\n";
                return;
            }

        }
        private void clearRegistry(string keybase, string extension)
        {
            RegistryKey key = Registry.LocalMachine.OpenSubKey(keybase, true);
            messages.Text += "     Attempting to delete " + keybase + "\\" + extension + "\n";
            try
            {
                key.DeleteSubKeyTree(extension);
                messages.Text += "    Deleted key " + key.Name + "\n";
            }
            catch (ArgumentException ex)
            {
                messages.Text += "     The key appears to no longer exist.  Since we tested for its existence, this is odd.  Aborting.\n     " +
                    ex.Message + "\n";
            }
            catch (SecurityException ex)
            {
                messages.Text += @"     You don't have permissions to delete the registry key.\n " +
                    "     Be sure you're running this application as an administrator.\n     " +
                    ex.Message + "\n";
            }
            catch (UnauthorizedAccessException ex)
            {
                messages.Text += "     You don't have permissions to delete the registry key.\n " +
                    "     Be sure you're running this application as an administrator.\n     " +
                    ex.Message + "\n";
            }
            catch (ObjectDisposedException ex)
            {
                messages.Text += @"     This exception should only occur if the registry key was deleted at the " +
                    "same time this delete request was made.  Aborting application run.\n     " + ex.Message + "\n";
            }
            catch (Exception ex)
            {
                messages.Text += @"     Uncaught exception, aborting: " + ex.Message + "\n";
            }
        }
        private bool clearFiles()
        {
            string path = Environment.GetEnvironmentVariable("WINDIR") + @"\Microsoft.NET\Framework\v3.5\Windows Presentation Foundation\DotNetAssistanceExtension";
            if (Directory.Exists(path))
            {
                Directory.Delete(path, true);
                messages.Text += "Deleted files\n";
            }
            else
            {
                messages.Text += "Files do not exist\n";
            }
            return true;
        }
        private bool resetConfig()
        {
            /*
              located in
             * documents and settings/[username]/application data/mozilla/firefox/profiles/*.default/prefs.js
             *
             * key:
             *      user_pref("general.useragent.extra.microsoftdotnet", "(.NET CLR 3.5.30729)");
             *     
             * still haven't located
             *      microsoft.CLR.all_clr_versionts_in_useragent
             *  and
             *      microsoft.CLR.clickonce.autolaunch
             */
            return true;
        }
    }
}


You do not have the required permissions to view the files attached to this post.

_________________
They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety.


Thu Feb 05, 2009 2:11 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.