-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathindex.html
807 lines (680 loc) · 30.7 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
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
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
<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">
<link rel="stylesheet" href="static/node_modules/codemirror/lib/codemirror.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="static/node_modules/codemirror/lib/codemirror.js"></script>
<script src="static/node_modules/codemirror/mode/javascript/javascript.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"> App 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();
showAppSettingsModal();
});
customPayloadLink = document.getElementById("customPayloadLink");
customPayloadLink.addEventListener("click", function(event) {
event.preventDefault();
showCustomPayloadModal(false);
});
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">
<button type="button" class="btn btn-primary" onclick=selectAllEvents()>Select All</button>
<button type="button" class="btn btn-primary" onclick=selectNoEvents()>Select None</button><br><br>
<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">
Network API Calls
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="formPostEvents" checked>
<label class="form-check-label" for="flexCheckChecked">
Network Form Submissions
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="customExfilEvents" checked>
<label class="form-check-label" for="flexCheckChecked">
Custom Payload Exfiltrated Data
</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>
<!-- Application Settings 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">App 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 form-switch">
<input class="form-check-input" type="checkbox" id="allowNewClientSessions" checked>
<label class="form-check-label" for="allowNewClientSessions">Disable/Enable New Client Sessions</label>
</div>
<hr>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="showFingerprints">
<label class="form-check-label" for="showFingerprints">Disable/Enable Show Client Fingerprints</label>
</div>
<hr>
<!-- Email Settings -->
<h6>Email Notifications Settings:</h6>
<div class="mb-3">
<label for="smtpServer">SMTP Server:Port</label><br>
<input type="text" class="form-control" id="smtpServer">
</div>
<div class="mb-3">
<label for="emailUsername">Username</label><br>
<input type="text" class="form-control" id="emailUsername">
<label for="emailPassword">Password</label><br>
<input type="password" class="form-control" id="emailPassword">
</div>
<!-- List of email addresses to notify -->
<div class="mb-3">
<label for="emailInput">Enter Email</label>
<div class="input-group mb-3">
<input id="emailInput" type="text" class="form-control" placeholder="Enter Email">
<button id="addEmail" class="btn btn-primary" type="button">Add</button>
</div>
<ul id="emailAddressList" class="list-group">
</ul>
<script>document.getElementById("addEmail").addEventListener('click', addEmail);</script>
<br>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="enableEmails">
<label class="form-check-label" for="enableEmails">Disable/Enable Emails</label>
</div>
<div class="mb-3">
<br>
<label for="emailNotificationType">Event Type</label>
<select class="form-select" id="emailNotificationType">
<option value="newClients">Notify on new clients</option>
<option value="newClientsAndEvents">Notify on new clients and events</option>
</select>
</div>
<div class="mb-3">
<label for="emailDelay">Delay Between Emails (seconds)</label>
<input type="number" class="form-control" placeholder="Delay between emails (minutes)" id="emailDelay">
</div>
<!-- Buttons for saving settings and sending test email -->
<div class="d-grid gap-2 d-md-flex justify-content-md-end">
<button class="btn btn-primary" type="button" id="saveEmailSettings">Save Email Settings</button>
<button class="btn btn-secondary" type="button" id="sendTestEmail">Test Email</button>
</div>
<hr>
<!-- Delay Between Client List Refresh -->
<div class="mb-3">
<label for="clientRefreshDelay">Delay Between Client List Refresh (seconds):</label><br>
<input type="number" class="form-control" id="clientRefreshDelay" value="5">
</div>
<hr>
<!-- List of Blocked IPs -->
<h6>IPs Blocked From Running JS-Tap Client:</h6>
<div class="input-group mb-3">
<input id="ipInput" type="text" class="form-control" placeholder="Enter IP">
<button id="addBlockIP" class="btn btn-primary" type="button">Add</button>
</div>
<ul id="blockedIPList" class="list-group">
</ul>
<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>
</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-code-button" type="button" class="btn btn-secondary">Expand Code</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-6" id="savedPayloadsGroup">
<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-6" id="payloadEditor">
<div id="payloadNameGroup">
<label for="payloadName" class="form-label">Payload Name:</label>
<input type="text" class="form-control" id="payloadName" name="name" required><br>
</div>
<div id="payloadDescriptionGroup">
<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>
<!-- <div id=payload-editor></div> -->
<textarea id="payload-editor" class="form-control" wrap="off" overflow="auto" 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>
<!-- Create Form Mimic Modal -->
<div id="createFormMimicModal" 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">Mimic Form Submission</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div>
<p style="padding-left: 40px;padding-right: 40px"><b>Instructions:</b><br>This modal allows you to configure a custom payload to mimic a form submission. You can modify the parameters in the custom payload. <br><br>First, check if the submission uses a CSRF token. If it does, you'll need a more complex payload. CSRF tokens are random values with names related to CSRF, XSRF, or Nonce. Enter the parameter name and value on the right and hit search. JS-Tap will search its previously captured HTML to locate and parse this value, which is needed for submitting the mimicked action.<br><br>
If there is no CSRF token in the form submission, click "Next" to build the payload.
</p>
<hr>
</div>
<!-- Modal Body with Split Layout -->
<div class="modal-body container-fluid">
<div class="row">
<!-- Form Data -->
<div class="col-md-7">
<h4>Form Data:</h4>
<!-- To be filled in by JavaScript -->
<div id="formDataDiv"></div>
</div>
<!-- CSRF selector - Right Side -->
<div class="col-md-5" id="csrfSelector">
<div>
<label for="csrfNameInput" class="form-label">CSRF Token Name:</label>
<input type="text" class="form-control" id="csrfNameInput" name="csrfNameInput" required><br>
</div>
<div>
<label for="csrfValueInput" class="form-label">CSRF Token Value:</label>
<input type="text" class="form-control" id="csrfValueInput" name="csrfValueInput" required><br>
</div>
<!-- To be filled in by JavaScript -->
<div id="searchDataDiv"></div>
</div>
</div>
</div> <!-- End of Modal Body -->
<!-- Button Bar -->
<div class="modal-header">
<div class="ms-auto">
<button id="mimic-form-search-button"type="button" class="btn btn-primary">Search CSRF</button>
<button id="mimic-form-next-button"type="button" class="btn btn-primary">Next</button>
<button id="mimic-form-close-button"type="button" data-bs-dismiss="modal" class="btn btn-secondary">Close</button>
</div>
</div>
</div>
</div>
</div>
<!-- Create API Call Mimic Modal -->
<div id="createApiMimicModal" 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">Mimic Network API Call</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div>
<p style="padding-left: 40px;padding-right: 40px"><b>Instructions:</b><br>This modal helps you automatically build a custom payload to mimic a network call. You can modify the parameters. <br><br>First, check if the API call uses an authorization header or token. If it does, you'll need a more complex payload. Authorization tokens are typically sent in an Authorization header. If you see such a header, enter the header name and value on the right and hit search. Tokens are often in this format:<br>Authorization: Bearer SECRETTOKEN<br><br>Use "Authorization" for the token name and "SECRETTOKEN" as the value for the search. The payload generator will add the Bearer string if needed. JS-Tap will search its previously captured storage to find and parse this auth token, which is needed for the mimicked action.<br><br>
If there is no authorization token, the API might use cookies you can't see. In that case, click "Next" to build the payload.
</p>
<hr>
</div>
<!-- Modal Body with Split Layout -->
<div class="modal-body container-fluid">
<div class="row">
<!-- Form Data -->
<div class="col-md-7">
<h4>Network API Data:</h4>
<!-- To be filled in by JavaScript -->
<div id="apiDataDiv"></div>
</div>
<!-- Auth selector - Right Side -->
<div class="col-md-5" id="tokenSelector">
<div>
<label for="tokenNameInput" class="form-label">Token Header Name:</label>
<input type="text" class="form-control" id="apiTokenNameInput" name="apiTokenNameInput" required><br>
</div>
<div>
<label for="csrfValueInput" class="form-label">Token Value:</label>
<input type="text" class="form-control" id="apiTokenValueInput" name="apiTokenValueInput" required><br>
</div>
<!-- To be filled in by JavaScript -->
<div id="apiSearchDataDiv"></div>
</div>
</div>
</div> <!-- End of Modal Body -->
<!-- Button Bar -->
<div class="modal-header">
<div class="ms-auto">
<button id="mimic-api-search-button"type="button" class="btn btn-primary">Search Token</button>
<button id="mimic-api-next-button"type="button" class="btn btn-primary">Next</button>
<button id="mimic-api-close-button"type="button" data-bs-dismiss="modal" class="btn btn-secondary">Close</button>
</div>
</div>
</div>
</div>
</div>
<!-- Custom Payload Exfil Viewer Modal -->
<div id="customPayloadExfilModal" 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="exfil-viewer-title">Custom Exfiltration Viewer</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<textarea id="exfil-data-viewer" class="form-control" rows="20" readonly></textarea>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</body>
</html>