Page 1 of 1

Retrieving Stored Password & User Names File

PostPosted: Thu Jun 07, 2012 4:13 pm
by madmax0150
I'm looking for way to program a tool to retrieve all my stored passwords and usernames from stored browser cache on my system, and export them to a file. I would like to be able do this with something as simple as a batch script or a Visual Basic script (.vbs file). I'm not new to programming, and I'm proficient in multiple languages, so if a Different programming languages require I can easily adapt :geek: . I have already spent a great deal of time searching Google and various programming sites, trying to figure out the way usernames and passwords are stored within browser cache, but with no success so far.I know that typically this data is kept within the %APPDATA% folder on the system, but I'm unable to figure out which file I should be looking for.

If anyone has any ideas on the subject, or could point me in the right direction it would be greatly appreciated. :mrgreen:


Re: Retrieving Stored Password & User Names File

PostPosted: Thu Jun 07, 2012 4:28 pm
by hellow533
If you use firefox I know you can just go to tools->options->security->Saved passwords. Might be more what you are looking for.

Re: Retrieving Stored Password & User Names File

PostPosted: Thu Jun 07, 2012 4:37 pm
by madmax0150
I'm looking to write a program which will complete that process automatically for me and not just grab data from one browser but from all browsers stored on the local system.

-- Thu Jun 07, 2012 6:04 pm --

okay so I figured out that I will need to find the default storage locations for each one of the web browsers I want to Be able to grab data from.
So far I have found that Firefox keeps its data in C:\Users\User\AppData\Roaming\Mozilla\Firefox\Profiles\(X#X#X#X#X#X#X).default where X#X#X#X#X# is unique. There are two files that I will need in order to decrypt the passwords the first file is the key for the encrypted username and password this file Will end with the following name key3.db The second file containing the actual data is called signings.sqlite , This file is usually always name the same.

Anyone have any ideas on how to decrypt the encrypted file with the key,I'm trying to get the process by which this decryption happen so I can figure out a way to write code to do this for me.

-- Thu Jun 07, 2012 11:46 pm --

Okay boys and girls since the first part of the process will To make a copy of the files that I mentioned earlier so we can then begin the decryption process.
Since the Folder within %APPDATA%\Mozilla\Firefox\Profiles\ Never has the same name as any other system, I had to find a way to find the correct pathway to the file I was looking for, Then send the pathway to the file to a variable which I could use within a copy command. The batch script that I came up with to do this for me is as follows

set F=nul
mkdir %CD%\Logs
mkdir %CD%\Logs\%COMPUTERNAME%
cd %APPDATA%\Mozilla\Firefox\Profiles\
dir /b "key3.db" /s > %~dp0Logs\%COMPUTERNAME%\tmp.txt
set /p F= <%~dp0Logs\%COMPUTERNAME%\tmp.txt
copy %F% %~dp0Logs\%COMPUTERNAME%\key3.db
del %~dp0Logs\%COMPUTERNAME%\tmp.txt
dir /b "signons.sqlite" /s > %~dp0Logs\%COMPUTERNAME%\tmp.txt
set /p F= <%~dp0Logs\%COMPUTERNAME%\tmp.txt
copy %F% %~dp0Logs\%COMPUTERNAME%\signons.sqlite
del %~dp0Logs\%COMPUTERNAME%\tmp.txt
set f=nul

basically what the above script does is search for the pathway to the file named key3.db and then exports that pathway to the tmp.txt. The pathway stored within the tmp.txt is then set to a variable, in this case it is set to the %F% variable.I then use the %F% variable with the copy command To make a copy of the needed files. I then repeat this process for the signons.sqlite file.

Now that a made a copy of these files I can now start the decryption process.

I've just started looking into the decryption process, and will post my further findings here. :ugeek: