📜 ⬆️ ⬇️

Fire Fox Anatomy

My friend wanted to install FireFox. And not just to install, but so that it was “like you”. FireFox has a built-in tool for publishing a list of installed add-ons. I immediately took advantage of it and published my additions. But since a friend is not very close to IT, although he is just as lazy, he didn’t want to go anywhere, download, install, or tune in anywhere. Says "why all this, you have everything on a flash drive, just copy it to me."

I had to think about it: you cannot just copy, except for the settings of FireFox and its plug-ins, there are still passwords, history of visits, favorites. Why would he know on what porn sites I wandered. Manually do not want to clean. All this is stored in files, not in the registry - FireFox cross-platform, and in Linux the registry, as far as I know, no. So the files in which it is all stored, you should try to replace the files from the newly installed Firefox.

The minimum task: find out where FireFox stores stored passwords and history.
The maximum task: to form a general opinion about the purpose of files in the FireFox directory.
')
I warn you right away that all that I managed to find out is not the result of disassembling, debugging, translating manul, code analysis. This is a simple comparison of directories, reading configs in a notebook, and experiments with replacing files in two installed Firefoxes.

So, we try to turn on the intuition, since the names are quite meaningful there, we look at the directory of the newly installed Firefox and see the following subdirectories:
chrome - contains jar-files with their manifests, and the manifest format is not Windows;
components - Java scripts that are responsible for this or that FireFox functionality (you can guess the assignment by the file name, for example, as your name is: NetworkGeolocationProvider.js);
defaults - scripts and styles common to all profiles;
dictionaries - spelling dictionaries (for HunSpell engine);
extensions - add-ons common to all (usually there is only the default theme);
greprefs - Firefox engine settings in the form of java scripts;
modules - additional Java-scripts for work of different baubles (for example, for microformats );
plugins - plug-ins common to everyone (by default there is only the Mozilla Default Plugin, the purpose of which is to keep track of updates for other plug-ins or, if necessary, display a message about a plug-in that doesn’t have enough);
res - some CSS styles, fonts and images (and the web designer will be interested in looking at the “directories” in the “dtd” subdirectory and may come with you <,> and & );
searchplugins - search engines (the ones that are “found using ...”);
uninstall - uninstall program and installation log files (I do not recommend deleting, sometimes I need it when updating FireFox).

As well as files in the FireFox directory:
AccessibleMarshal.dll - honestly, I don’t know what the ActiveX library is, everything works for me without registering it in the system;
application.ini, platform.ini - a few unimportant settings;
blocklist.xml - list of plugins blocked for installation;
browserconfig.properties - despite the loud name, just setting the "home page";
crashreporter.exe, crashreporter.ini, crashreporter-override.ini - the same application that starts when FireFox crashes , plus its settings;
dependentlibs.list - the list of libraries required for Firefox to work in this operating system;
freebl3.dll, nspr4.dll, nss3.dll, nssckbi.dll, nssdbm3.dll, nssutil3.dll, plc4.dll, plds4.dll, softokn3.dll, smime3.dll, ssl3.dll, xpcom.dll are the ones “Required libraries”, as I understand it, are wrappers for working with files, directories, and the cryptosystem of the operating system (the ns prefix indicates the FireFox parent — Netscape);
freebl3.chk, nssdbm3.chk, softokn3.chk - digital signatures of some libraries (or maybe not signatures, and maybe not digital ones);
firefox.exe - it is the one that is fiery :)
install.log - the installation log (you can look at the installation errors, or you can simply delete it);
js3250.dll - java scripts engine;
LICENSE - MOZILLA PUBLIC LICENSE Version 1.1 - just like that, in capital letters;
mozcpp19.dll, mozcrt19.dll - wrappers over operating system objects (types, strings, threads, threads and functions for working with them) - this is the price of cross-platform (just scary to look at the headers);
plugin-container.exe - for some time, add-ons are executed in the sandbox, which is implemented by this application (quite often it helps when working with curves additions);
README.txt - a file that no one ever reads (in principle, there’s nothing to read);
sqlite3.dll - SQLite database engine (it is used in FireFox);
updater.exe, update.locale, updater.ini - the updater and its settings (update.locale is the sister of talent);
xul.dll is a layer between content and plugins (I could be wrong);

Now, without turning off the intuition, consider the directory of the user profile, which has the following subdirectories:
bookmarkbackups - contains a file with bookmarks and its backups in the JSON format (the fact that json is easy to read - almost broke my eyes when I opened it in a notebook);
chrome - custom css-styles;
extensions - add-ons (this is the official translation);
minidumps - stores minidumps of memory recorded when FireFox crashes;
searchplugins - custom search engines;

as well as files:
blocklist.xml - list of plugins blocked for installation;
bookmarks.html - page for bookmarks;
cert_override.txt - root certificates added / overlaid by the user;
cert8.db - root certificates;
compatibility.ini -?
compreg.dat - registered for execution java scripts / components
content-prefs.sqlite - some Firefox settings;
cookies.sqlite - saved cookies (except flash);
downloads.sqlite - the list of downloaded files;
extensions.cache, extensions.ini, extensions.rdf - installed add-ons;
formhistory.sqlite - history of filling html-forms;
key3.db - the file storing the key with which the saved passwords are encrypted;
localstore.rdf -?
mimeTypes.rdf - list of known MIME types;
permissions.sqlite - saved permissions for sites (for example, the site addons.mozilla.org can install add-ons);
places.sqlite - the location of cached resources;
places.sqlite-journal -? log current cached resources?
pluginreg.dat - list of registered plugins (not to be confused with add-ons);
prefs.js - user settings;
search.json - search history;
search.sqlite -? search history (for some reason nothing is recorded here, maybe in the future it will be)?
secmod.db -? encryption settings and use of tokens?
signons.sqlite - saved passwords;
urlclassifierkey3.txt -?
webappsstore.sqlite -? saved RSS feeds?
xpti.dat -? something related to ActiveX?

As you can see, there are still questions on some files. For other files, I'm not sure that they fulfill the role that is assigned to them here. I hope that someone will be able to add in the comments or write their post about the internal structure of our favorite Fire Fox. And maybe his new version, which we are promised in February. Good luck all surfing.

PS
Well, at least I solved the task
- clearing the “bookmarkbackups” catalog;
- replacing cookies.sqlite, downloads.sqlite, formhistory.sqlite, search.json, signons.sqlite;
- deleting session * .rdf files that store the history of visited sites.

Source: https://habr.com/ru/post/111972/


All Articles