Unregister Insecure Custom URL Scheme via Regedit
Custom URL schemes allow desktop applications to be launched directly from web browsers or links. However, poorly implemented, outdated, or malicious protocols can expose a system to remote code execution and argument injection vulnerabilities. This guide provides a direct, step-by-step process for locating, backing up, and permanently deleting an insecure custom URL protocol from the Windows Registry using Regedit.
Step 1: Open the Windows Registry Editor
- Press
Windows Key + Rto open the Run dialog. - Type
regeditand press Enter. - Click Yes if prompted by User Account Control (UAC) to grant administrative privileges.
Step 2: Locate the Insecure Protocol
Custom URL protocols are registered under specific registry hives. Navigate to one of the following paths depending on whether the protocol was installed for the current user or system-wide:
- Current User only:
HKEY_CURRENT_USER\Software\Classes - System-wide:
HKEY_LOCAL_MACHINE\Software\Classes - Merged View (All registered classes):
HKEY_CLASSES_ROOT
Scroll down the list under the selected hive to find the key
corresponding to the name of the custom URL scheme (for example,
exampleprotocol).
Step 3: Verify the URL Scheme
Before modifying or deleting the key, ensure that it is indeed the intended URL handler:
- Click on the target protocol key in the left navigation pane.
- In the right pane, confirm the presence of a String Value
(
REG_SZ) namedURL Protocol. This entry identifies the key as a custom URL handler. - Expand the protocol key to review the subkey path:
[ProtocolName]\shell\open\command - Check the
(Default)value inside thecommandfolder to verify the executable and arguments associated with the scheme.
Step 4: Back Up the Registry Key
Always export a backup before deleting registry entries:
- Right-click the custom protocol key in the left pane.
- Select Export.
- Choose a safe file location, enter a descriptive file name (e.g.,
protocol-backup.reg), and click Save.
Step 5: Unregister and Delete the Protocol
- Right-click the main protocol key in the left pane.
- Select Delete.
- Confirm the deletion when prompted by clicking Yes.
Step 6: Verify the Removal
- Close the Registry Editor.
- Restart any open web browsers to clear cached protocol associations.
- Attempt to trigger the protocol by entering
scheme-name://testinto your browser’s address bar. The browser should now treat the entry as a standard search query or report that no application is associated with the protocol.