forked from hoodoer/JS-Tap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
591 lines (493 loc) · 20.6 KB
/
index.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
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JS-Tap</title>
<link rel="stylesheet" href="static/node_modules/bootstrap/dist/css/bootstrap.css">
<style>
.table-active {
background-color: #f8f9fa;
}
.card-stack {
height: calc(95vh - 130px);
overflow-y: auto;
}
.input-width {
width: 50%;
}
body {
padding-top: 130px;
overflow: hidden;
}
#searchClientInput {
height: 30px;
padding: 3px 8px;
background-color: #aaa;
color: #000; /* Text color */
}
#searchClientInput::placeholder {
color: #8b8680; /* Placeholder text color */
}
</style>
</head>
<body>
<script src="static/node_modules/bootstrap/dist/js/bootstrap.bundle.js"></script>
<script src="static/node_modules/js-beautify/js/lib/beautifier.min.js"></script>
<script src="static/node_modules/js-beautify/js/lib/beautify-css.js"></script>
<script src="static/node_modules/js-beautify/js/lib/beautify-html.js"></script>
<script src="static/node_modules/js-beautify/js/lib/beautify.js"></script>
<script src="protectedStatic/niceTime.js"></script>
<script src="protectedStatic/main.js"></script>
<!-- Nav Bar -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
<a class="navbar-brand" href="https://github.com/hoodoer/JS-Tap" target="_blank"><img src="protectedStatic/logo.png" width="140" height="100" class="d-inline-block align-center" alt=""> JS-Tap</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href="#allnotes" id="allnotesLink"> View All Notes </a>
</li>
<li class="nav-item">
<a class="nav-link" href="#newsessionhandler" id="newsessionLink"> Session Settings </a>
</li>
<li class="nav-item">
<a class="nav-link" href="#custompayload" id="customPayloadLink"> Custom Payloads </a>
</li>
<li class="nav-item">
<a class="nav-link" href="#guide" id="guideLink"> Guide </a>
</li>
<li class="nav-item">
<a class="nav-link" href="#about" id="aboutLink"> About </a>
</li>
<script>
navNotesLink = document.getElementById("allnotesLink");
navNotesLink.addEventListener("click", function(event) {
event.preventDefault();
showAllNotesModal();
});
navSessionLink = document.getElementById("newsessionLink");
navSessionLink.addEventListener("click", function(event) {
event.preventDefault();
showSessionModal();
});
customPayloadLink = document.getElementById("customPayloadLink");
customPayloadLink.addEventListener("click", function(event) {
event.preventDefault();
showCustomPayloadModal();
});
navAboutLink = document.getElementById("aboutLink");
navAboutLink.addEventListener("click", function(event){
event.preventDefault();
showAboutModal();
});
navGuideLink = document.getElementById("guideLink");
navGuideLink.addEventListener("click", function(event){
event.preventDefault();
showGuideModal();
});
</script>
<li class="nav-item">
<a class="nav-link" href="/logout"> Logout </a>
</li>
</ul>
</div>
</nav>
<!-- Dynamic UI Stuff below -->
<!-- <div class="d-flex justify-content-between align-items-center"> -->
<div class="container-fluid border">
<div class="row">
<!-- Client Card Stack -->
<div class="col-5">
<div class="d-flex align-items-center">
<label style="margin-top: 8;"><h4><b> Clients</b></h4></label>
<div style="width: 25px;"></div>
<input type="text" class="form-control" placeholder="Filter clients..." id="searchClientInput">
<div style="width: 25px;"></div>
<button type="button" class="btn btn-primary" onclick=showClientFilterModal()><img src="/protectedStatic/filter.svg"></button>
</div>
<div class="card-stack" id="client-stack"></div>
</div>
<!-- Register filter handler -->
<script type="text/javascript">document.getElementById('searchClientInput').addEventListener('input', filterClients);</script>
<!-- Client Event Card Stack, filled in dynamically with JavaScript -->
<div class="col-7">
<div class="d-flex justify-content-between align-items-center">
<label style="margin-top: 8;"><h4><b> Loot</b></h4></label>
<button type="button" class="btn btn-primary" onclick=showEventFilterModal()><img src="/protectedStatic/filter.svg"></button>
</div>
<div class="card-stack" id="detail-stack">
</div>
</div>
</div>
<!-- Modals below -->
<!-- HTML Code Viewer Modal -->
<div class="modal fade modal-xl" id="codeModal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="htmlCodeModal">HTML Code Viewer</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<textarea class="form-control" id="code-viewer-body" rows="25" readonly></textarea>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- About Modal -->
<div class="modal fade modal-lg" id="aboutModal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="aboutTitle">About JS-Tap</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body" id="code-viewer-body">
This tool is designed to help red teamers recon web applications using XSS payloads or post exploitation implants. <br><br>
This tool is intended to be used on systems you are authorized to attack.
Do not use this tool for illegal purposes, or I will be very grumpy in your general direction. <br><br>
<a href="https://github.com/hoodoer/JS-Tap" target="_blank">https://github.com/hoodoer/JS-Tap</a><br><br><br>
Contact:<br>
<a href="https://twitter.com/hoodoer" target="_blank">@hoodoer</a><br>
<a href="mailto:[email protected]" target="_blank">[email protected]</a>
<br>
<br>
<a href="https://trustedsec.com" target="_blank">Consulting Work</a><br>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Guide Modal -->
<div class="modal fade modal-lg" id="guideModal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="guideTitle">JS-Tap Guide</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body" id="guide-body">
There are a quite a few settings in the JS-Tap payload that need to be set prior<br>
to your engagement. The example JavaScript payload is contained in <b>telemlib.js.</b><br>
You can rename this or copy this to whatever name you wish, all files in the <b>payloads</b><br>
directory are served up publicly for clients to pull in. You can have different payloads <br>
with difference configurations for different applications.
<br><br>
See the project README file for instructions:<br>
<a href="https://github.com/hoodoer/JS-Tap" target="_blank">JS-Tap README</a><br>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Note Editor Modal -->
<div id="noteEditorModal" class="modal fade modal-lg" tabindex="-1" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="note-editor-title"></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<textarea id="note-editor" class="form-control" rows="20"></textarea>
</div>
<div class="modal-footer">
<button id="note-save-button" class="btn btn-primary">Save</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- All Notes viewer Modal -->
<div id="allNoteViewerModal" class="modal fade modal-lg" tabindex="-1" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="note-viewer-title">All Client Notes</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<textarea id="all-note-viewer" class="form-control" rows="20" readonly></textarea>
</div>
<div class="modal-footer">
<button id="note-download-button" class="btn btn-primary">Download Notes</button>
<!-- Hidden anchor element for downloading -->
<a id="downloadLink" style="display: none;"></a>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Request/Response modal -->
<div class="modal fade modal-lg" id="requestResponseModal">
<div class="modal-dialog">
<div class="modal-content">
<!-- Modal Header -->
<div class="modal-header">
<h4 class="modal-title">API Call Viewer</h4>
<button type="button" class="close" data-bs-dismiss="modal">×</button>
</div>
<!-- Modal Body -->
<div class="modal-body">
<div class="container">
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label for="textarea1">Request</label>
<textarea class="form-control" id="requestBox" rows="4" readonly=""></textarea>
</div>
</div>
<div class="col-lg-6">
<div class="form-group">
<label for="textarea2">Response</label>
<textarea class="form-control" id="responseBox" rows="4" readonly = ""></textarea>
</div>
</div>
</div>
</div>
</div>
<!-- Modal Footer -->
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Client Filter/Sort Modal -->
<div id="clientFilterModal" class="modal fade modal-lg" tabindex="-1" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Client Sort</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body" id="clientFilterModalBody">
<h5><u>Order clients by date/time they were first seen:</u></h5>
<div class="form-check">
<input class="form-check-input" type="radio" name="flexRadioDefault" id="firstSeenAscending" checked>
<label class="form-check-label" for="flexRadioDefault1">
First Seen - Oldest to most recent
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="flexRadioDefault" id="firstSeenDescending">
<label class="form-check-label" for="flexRadioDefault2">
First Seen - Most recent to oldest
</label>
</div>
<br>
<h5><u>Order clients by date/time they were last seen (update):</u></h5>
<div class="form-check">
<input class="form-check-input" type="radio" name="flexRadioDefault" id="lastSeenAscending">
<label class="form-check-label" for="flexRadioDefault1">
Last Seen - Oldest to most recent
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="flexRadioDefault" id="lastSeenDescending">
<label class="form-check-label" for="flexRadioDefault2">
Last Seen - Most recent to oldest
</label>
</div>
<br>
<br>
<h5><u>Client Filter Options:</u></h5>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="onlyStarredClients">
<label class="form-check-label" for="flexCheckChecked">
Show Only Starred Clients
</label>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" onclick=updateClients()>Close</button>
</div>
</div>
</div>
</div>
<!-- Event Filtering Modal -->
<div id="eventFilterModal" class="modal fade modal-md" tabindex="-1" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Event Filtering</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body" id="eventFilterModalBody">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="cookieEvents" checked>
<label class="form-check-label" for="flexCheckDefault">
Cookies
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="localStorageEvents" checked>
<label class="form-check-label" for="flexCheckChecked">
Local Storage
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="sessionStorageEvents" checked>
<label class="form-check-label" for="flexCheckChecked">
Session Storage
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="urlEvents" checked>
<label class="form-check-label" for="flexCheckChecked">
URLs Visited
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="htmlScrapeEvents" checked>
<label class="form-check-label" for="flexCheckChecked">
HTML Scraped
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="screenshotEvents" checked>
<label class="form-check-label" for="flexCheckChecked">
Screenshots
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="userInputEvents" checked>
<label class="form-check-label" for="flexCheckChecked">
User Inputs
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="apiEvents" checked>
<label class="form-check-label" for="flexCheckChecked">
API Events
</label>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" onclick=updateEvents()>Close</button>
</div>
</div>
</div>
</div>
<!-- New Client Session Control Modal -->
<div id="clientSessionModal" class="modal fade modal-md" tabindex="-1" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Session Settings</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body" id="clientFilterModalBody">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="allowNewClientSessions" checked>
<label class="form-check-label" for="flexCheckChecked">
Allow New Client Sessions
</label>
</div>
<br><br>
<!-- List of Blocked IPs -->
<div class="modal-body">
<h6>Blocked IPs:</h6>
<div class="input-group mb-3">
<input id="ipInput" type="text" class="form-control" placeholder="Enter IP">
<div class="input-group-append">
<button id="addBlockIP" class="btn btn-primary" type="button">Add</button>
</div>
</div>
<ul id="blockedIPList" class="list-group">
</ul>
</div>
<script>document.getElementById("addBlockIP").addEventListener('click', blockIP);</script>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" onclick=updateClientSessions()>Close</button>
</div>
</div>
</div>
</div>
<!-- Custom Payload Modal -->
<div id="customPayloadModal" class="modal fade" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<!-- Modal Header with Title and Close Button -->
<div class="modal-header">
<h5 class="modal-title" id="custom-payload-title">Custom JavaScript Payloads</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<!-- Button Bar -->
<div class="modal-header">
<div class="ms-0">
<button id="payload-import-button" class="btn btn-secondary me-2" data-toggle="tooltip" title="Import Custom Payloads">Import</button>
<input type="file" id="importInput" accept=".json" style="display: none;">
<button id="payload-export-button" class="btn btn-secondary me-4"data-toggle="tooltip" title="Export Custom Payloads">Export</button>
<a id="exportLink" style="display: none;"></a>
</div>
<div class="ms-auto">
<button id="payload-save-button" class="btn btn-primary me-2">Save</button>
<button id="payload-clear-button"type="button" class="btn btn-secondary">Clear All Jobs</button>
<button id="payload-close-button"type="button" class="btn btn-secondary">Close</button>
</div>
</div>
<!-- Modal Body with Split Layout -->
<div class="modal-body row">
<!-- Payload List - Left Side -->
<div class="col-md-7">
<h6>Saved Payloads (select to load for editing):</h6>
<ul id="savedPayloadsList" class="list-group">
<!-- List items here -->
</ul>
</div>
<!-- Code Editor - Right Side -->
<div class="col-md-5" id="payloadEditor">
<div>
<label for="payloadName" class="form-label">Payload Name:</label>
<input type="text" class="form-control" id="payloadName" name="name" required><br>
</div>
<div>
<label for="payloadDescription" class="form-label">Payload Description/Instructions:</label>
<textarea id="payloadDescription" class="form-control" rows="2"></textarea><br>
</div>
<div>
<label for="payload-editor" class="form-label">JavaScript Code:</label>
<textarea id="payload-editor" class="form-control" rows="10"></textarea>
</div>
</div>
</div> <!-- End of Modal Body -->
</div>
</div>
</div>
<!-- Custom Payload Modal - Single Client -->
<div id="singleClientPayloadModal" class="modal fade modal-lg" tabindex="-1" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="single-client-payload-title">Custom JavaScript Payloads</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div>
<p class="description"> Payloads can be run on this client.</p>
</div>
<!-- List of Saved Payloads -->
<div class="modal-body">
<h6>Saved Payloads:</h6>
<ul id="singleClientPayloadList" class="list-group">
</ul>
</div>
<div class="modal-footer">
<div class="ms-auto">
<button id="payload-close-button"type="button" data-bs-dismiss="modal" class="btn btn-secondary">Close</button>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>