Malicious browser policies (“Managed by your organization”)

Advanced Updated: · Suggest an edit · Change history

If the browser menu says “Managed by your organization” and you have no organization, an unwanted program may be behind it. It abuses policies, which companies and schools normally use to manage browsers.

Advanced procedure, Windows only

This procedure edits the registry. Do it only on your own computer. If it is a work or school computer, do not delete the policies; they belong to the administrator. Before you start, make a backup and (if System Restore is on) a restore point.

What policies are and how to recognise them

Policies force browser settings that cannot be changed in the menu. Malicious policies usually:

  • force an extension that cannot be removed (it is greyed out and says “Installed by your organization”),
  • lock the homepage or search engine,
  • block resetting the settings or removing extensions.

You can see the policies currently in effect at: Chrome chrome://policy, Edge edge://policy, Brave brave://policy, Firefox about:policies.

Preparation

  1. First uninstall unwanted programs and run a one-time antivirus scanner following the universal browser repair. Otherwise the program may create the policies again right away.
  2. Close the browser.
  3. Open PowerShell as administrator (right-click Start → Terminal (Admin) or Windows PowerShell (Admin)).

Steps 1 and 2: list and remove, by browser

Choose your browser. Run the scripts in PowerShell as administrator. If you are not sure what an entry in the output means, do not delete anything and ask for help on a forum (see below), pasting the output there. Malicious policies typically contain a forced extension list (ExtensionInstallForcelist) or the address of a homepage or search engine.

Chrome

You can see the policies at chrome://policy.

Step 1: list (read only)

$keys = @('HKLM:\SOFTWARE\Policies\Google\Chrome', 'HKCU:\SOFTWARE\Policies\Google\Chrome')
$found = $keys | Where-Object { Test-Path $_ }
if (-not $found) { 'No policies found.'; return }
foreach ($k in $found) {
  "== $k"
  Get-ChildItem $k -Recurse -ErrorAction SilentlyContinue | ForEach-Object { $_.Name }
  (Get-ItemProperty $k).PSObject.Properties |
    Where-Object { $_.Name -notlike 'PS*' } |
    ForEach-Object { '   {0} = {1}' -f $_.Name, $_.Value }
}

Step 2: back up and remove

$keys = @('HKLM:\SOFTWARE\Policies\Google\Chrome', 'HKCU:\SOFTWARE\Policies\Google\Chrome')
foreach ($key in ($keys | Where-Object { Test-Path $_ })) {
  $backup = "$env:USERPROFILE\Desktop\chrome-policy-$($key.Substring(0,4))-$(Get-Date -Format yyyyMMdd-HHmmss).reg"
  reg export ($key -replace '^HK(LM|CU):\\', 'HK$1\') $backup /y
  Remove-Item -Path $key -Recurse -Force
}
gpupdate /force

Edge

You can see the policies at edge://policy.

Step 1: list (read only)

$keys = @('HKLM:\SOFTWARE\Policies\Microsoft\Edge', 'HKCU:\SOFTWARE\Policies\Microsoft\Edge')
$found = $keys | Where-Object { Test-Path $_ }
if (-not $found) { 'No policies found.'; return }
foreach ($k in $found) {
  "== $k"
  Get-ChildItem $k -Recurse -ErrorAction SilentlyContinue | ForEach-Object { $_.Name }
  (Get-ItemProperty $k).PSObject.Properties |
    Where-Object { $_.Name -notlike 'PS*' } |
    ForEach-Object { '   {0} = {1}' -f $_.Name, $_.Value }
}

Step 2: back up and remove

$keys = @('HKLM:\SOFTWARE\Policies\Microsoft\Edge', 'HKCU:\SOFTWARE\Policies\Microsoft\Edge')
foreach ($key in ($keys | Where-Object { Test-Path $_ })) {
  $backup = "$env:USERPROFILE\Desktop\edge-policy-$($key.Substring(0,4))-$(Get-Date -Format yyyyMMdd-HHmmss).reg"
  reg export ($key -replace '^HK(LM|CU):\\', 'HK$1\') $backup /y
  Remove-Item -Path $key -Recurse -Force
}
gpupdate /force

Brave

You can see the policies at brave://policy.

Step 1: list (read only)

$keys = @('HKLM:\SOFTWARE\Policies\BraveSoftware\Brave', 'HKCU:\SOFTWARE\Policies\BraveSoftware\Brave')
$found = $keys | Where-Object { Test-Path $_ }
if (-not $found) { 'No policies found.'; return }
foreach ($k in $found) {
  "== $k"
  Get-ChildItem $k -Recurse -ErrorAction SilentlyContinue | ForEach-Object { $_.Name }
  (Get-ItemProperty $k).PSObject.Properties |
    Where-Object { $_.Name -notlike 'PS*' } |
    ForEach-Object { '   {0} = {1}' -f $_.Name, $_.Value }
}

Step 2: back up and remove

$keys = @('HKLM:\SOFTWARE\Policies\BraveSoftware\Brave', 'HKCU:\SOFTWARE\Policies\BraveSoftware\Brave')
foreach ($key in ($keys | Where-Object { Test-Path $_ })) {
  $backup = "$env:USERPROFILE\Desktop\brave-policy-$($key.Substring(0,4))-$(Get-Date -Format yyyyMMdd-HHmmss).reg"
  reg export ($key -replace '^HK(LM|CU):\\', 'HK$1\') $backup /y
  Remove-Item -Path $key -Recurse -Force
}
gpupdate /force

Firefox

You can see the policies at about:policies.

Step 1: list (read only)

$keys = @('HKLM:\SOFTWARE\Policies\Mozilla\Firefox', 'HKCU:\SOFTWARE\Policies\Mozilla\Firefox')
$found = $keys | Where-Object { Test-Path $_ }
if (-not $found) { 'No policies found.' }
foreach ($k in $found) {
  "== $k"
  Get-ChildItem $k -Recurse -ErrorAction SilentlyContinue | ForEach-Object { $_.Name }
  (Get-ItemProperty $k).PSObject.Properties |
    Where-Object { $_.Name -notlike 'PS*' } |
    ForEach-Object { '   {0} = {1}' -f $_.Name, $_.Value }
}
$file = 'C:\Program Files\Mozilla Firefox\distribution\policies.json'
if (Test-Path $file) { "== $file"; Get-Content $file }

Step 2: back up and remove

$keys = @('HKLM:\SOFTWARE\Policies\Mozilla\Firefox', 'HKCU:\SOFTWARE\Policies\Mozilla\Firefox')
foreach ($key in ($keys | Where-Object { Test-Path $_ })) {
  $backup = "$env:USERPROFILE\Desktop\firefox-policy-$($key.Substring(0,4))-$(Get-Date -Format yyyyMMdd-HHmmss).reg"
  reg export ($key -replace '^HK(LM|CU):\\', 'HK$1\') $backup /y
  Remove-Item -Path $key -Recurse -Force
}
$file = 'C:\Program Files\Mozilla Firefox\distribution\policies.json'
if (Test-Path $file) { Rename-Item $file 'policies.json.bak' }
gpupdate /force

The registry backup is a .reg file on your desktop (double-click it to restore the policies). The script does not delete policies.json, it only renames it to policies.json.bak. If you did not create the file yourself that is fine; if you did, rename it back.

Opera

Opera does not support policies, so there are no malicious policies to remove in it. If Opera has unwanted extensions or changed settings, use the universal browser repair.

Safari

Safari does not use the registry but macOS configuration profiles. Open System Settings → Privacy & Security → Profiles (or General → Device Management). If you see a profile you did not install, and it is not a work or school Mac, select it and remove it with the − button.

Verification

Open the policy page in the browser (chrome://policy etc.). It should say “No policies set” and the menu must no longer say “Managed by your organization”. The forced extension should now be removable. Check again after restarting the computer.

Do the policies keep coming back?

If the policies reappear after a while, something is creating them, for example a scheduled task, a service or a program you have not uninstalled yet. Do not go further on your own. Looking for such places (so-called persistence points) without experience is risky. Ask for help on the Malwarebytes or BleepingComputer forum and paste the output from step 1.

Sources