The reason why Prefs.js is on your system
Prefs.js is a file that stores Firefox user settings and options. This record is normally stored in %APPDATA%\Mozilla\Firefox\Profiles\ folder. It is a completely legitimate file that Mozilla Firefox, Thunderbird, Mozilla Suite, SeaMonkey and other Mozilla-based applications use to store settings. In most of the cases, this plain-text file stores changes made to the default settings.
The indicated file stores settings associated with user's preferences, and whenever you change them via application's user interface, the prefs.js file will be modified. Although the file doesn't contain all of the settings – it records changes made to default settings as soon as they get written to the disk.
Typically, changes are recorded and saved into the Prefs file after you close the Mozilla Firefox or Mozilla-based program.
According to the publisher, it can be edited with a text editor, but it is not recommended for avoiding profile damage and similar issues.
Some anti-malware programs detect this file as dangerous. Why?
The reason why some security programs detect Prefs.js as dangerous or related to deceptive browser hijackers as Trovi or even adware program is that this file can store extensions' settings.
Therefore, if some malicious extension related to spyware or malware alters your homepage, new tab or even default search settings without your knowledge, the indicated file will be overwritten and store changes made by the spyware.
It has been noticed that this file can be affected by OneStep Search, Trovi, or Babylon Toolbar. If you noticed annoying redirects, continuous commercial advertisements or similar annoying actions, you should check your PC for suspicious software using anti-malware programs like Reimage Reimage Cleaner Intego.
Tips to avoid installing browser hijackers and potentially unwanted programs
Browser hijackers are legitimate programs that function in a very annoying way. They can be installed in tandem with freeware. In most cases, people suffer from Prefs.js hijack after installing some free programs with Default/Standard settings. You should never rely on these settings as they are highly untrustworthy.
They provide settings composed by the developer of your chosen software, and the vendor usually is interested in promoting extra programs.
Of course, one does so for pay-per-install revenue. If you would like to avoid installing unexpected software components, choose Custom/Advanced settings for the installation. After doing so, deselect all additional items one after another. You should remove marks from checkboxes that say you agree to “Make X my default homepage/search engine/new tab.“
Get rid of Prefs.js virus easily
You do not need to remove prefs.js file because it is not a virus itself. It is a legitimate system file, but if you anti-malware software detects it as dangerous, it means that your browser or Mozilla-based application was compromised by a certain spyware program.
You can solve the issue with a help of anti-spyware software or remove the potentially unwanted program manually.
To fix Prefs.js file manually, you have to remove questionable extensions and revert affected browser settings to their previous state. You should also reset Firefox, and that can be done with the help of this easy-to-follow tutorial by the 2-Spyware team.