File size: 69,962 Bytes
51ffe61
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Malware Variant Correlation Agent</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        .sidebar {
            transition: all 0.3s ease;
        }
        .graph-container {
            height: 600px;
            background-color: #1a202c;
            border-radius: 0.5rem;
        }
        .malware-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        }
        .timeline-item:not(:last-child)::after {
            content: '';
            position: absolute;
            left: 11px;
            top: 24px;
            height: 100%;
            width: 2px;
            background: #4a5568;
        }
        .code-viewer {
            font-family: 'Courier New', monospace;
            font-size: 0.875rem;
        }
        .draggable-node {
            cursor: move;
        }
        .tabs-container .tab-content {
            display: none;
        }
        .tabs-container .tab-content.active {
            display: block;
        }
    </style>
</head>
<body class="bg-gray-900 text-gray-200">
    <div class="flex h-screen overflow-hidden">
        <!-- Sidebar -->
        <div class="sidebar w-64 bg-gray-800 text-gray-200 flex-shrink-0">
            <div class="p-4 border-b border-gray-700">
                <h1 class="text-xl font-bold flex items-center">
                    <i class="fas fa-shield-virus mr-2 text-blue-400"></i>
                    <span>MalwareCorrelator</span>
                </h1>
                <p class="text-xs text-gray-400 mt-1">Variant Correlation Agent v2.1</p>
            </div>
            <div class="p-4">
                <div class="mb-6">
                    <h2 class="text-sm font-semibold text-gray-400 uppercase tracking-wider mb-2">Analysis</h2>
                    <ul>
                        <li class="mb-1">
                            <a href="#" class="flex items-center px-3 py-2 rounded bg-gray-700 text-blue-300">
                                <i class="fas fa-project-diagram mr-2"></i>
                                <span>Variant Mapping</span>
                            </a>
                        </li>
                        <li class="mb-1">
                            <a href="#" class="flex items-center px-3 py-2 rounded hover:bg-gray-700">
                                <i class="fas fa-fingerprint mr-2"></i>
                                <span>IOC Correlation</span>
                            </a>
                        </li>
                        <li class="mb-1">
                            <a href="#" class="flex items-center px-3 py-2 rounded hover:bg-gray-700">
                                <i class="fas fa-route mr-2"></i>
                                <span>TTP Analysis</span>
                            </a>
                        </li>
                        <li class="mb-1">
                            <a href="#" class="flex items-center px-3 py-2 rounded hover:bg-gray-700">
                                <i class="fas fa-history mr-2"></i>
                                <span>Evolution Timeline</span>
                            </a>
                        </li>
                    </ul>
                </div>
                <div class="mb-6">
                    <h2 class="text-sm font-semibold text-gray-400 uppercase tracking-wider mb-2">Threat Intelligence</h2>
                    <ul>
                        <li class="mb-1">
                            <a href="#" class="flex items-center px-3 py-2 rounded hover:bg-gray-700">
                                <i class="fas fa-database mr-2"></i>
                                <span>Malware Database</span>
                            </a>
                        </li>
                        <li class="mb-1">
                            <a href="#" class="flex items-center px-3 py-2 rounded hover:bg-gray-700">
                                <i class="fas fa-user-secret mr-2"></i>
                                <span>Threat Actors</span>
                            </a>
                        </li>
                        <li class="mb-1">
                            <a href="#" class="flex items-center px-3 py-2 rounded hover:bg-gray-700">
                                <i class="fas fa-flag mr-2"></i>
                                <span>Campaigns</span>
                            </a>
                        </li>
                    </ul>
                </div>
                <div>
                    <h2 class="text-sm font-semibold text-gray-400 uppercase tracking-wider mb-2">Tools</h2>
                    <ul>
                        <li class="mb-1">
                            <a href="#" class="flex items-center px-3 py-2 rounded hover:bg-gray-700">
                                <i class="fas fa-search mr-2"></i>
                                <span>Sample Search</span>
                            </a>
                        </li>
                        <li class="mb-1">
                            <a href="#" class="flex items-center px-3 py-2 rounded hover:bg-gray-700">
                                <i class="fas fa-file-export mr-2"></i>
                                <span>Report Generator</span>
                            </a>
                        </li>
                        <li class="mb-1">
                            <a href="#" class="flex items-center px-3 py-2 rounded hover:bg-gray-700">
                                <i class="fas fa-cog mr-2"></i>
                                <span>Settings</span>
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>

        <!-- Main Content -->
        <div class="flex-1 overflow-auto">
            <!-- Header -->
            <header class="bg-gray-800 border-b border-gray-700 p-4 flex justify-between items-center">
                <div class="flex items-center">
                    <button class="mr-4 text-gray-400 hover:text-white">
                        <i class="fas fa-bars"></i>
                    </button>
                    <h2 class="text-lg font-semibold">Malware Variant Correlation Dashboard</h2>
                </div>
                <div class="flex items-center space-x-4">
                    <div class="relative">
                        <input type="text" placeholder="Search samples, IOCs..." 
                               class="bg-gray-700 rounded-full py-2 px-4 pl-10 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 w-64">
                        <i class="fas fa-search absolute left-3 top-2.5 text-gray-400"></i>
                    </div>
                    <button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md text-sm font-medium flex items-center">
                        <i class="fas fa-plus mr-2"></i>
                        <span>New Analysis</span>
                    </button>
                    <div class="w-8 h-8 rounded-full bg-gray-700 flex items-center justify-center">
                        <i class="fas fa-user"></i>
                    </div>
                </div>
            </header>

            <!-- Dashboard Content -->
            <main class="p-6">
                <!-- Stats Cards -->
                <div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-6">
                    <div class="bg-gray-800 rounded-lg p-4 border-l-4 border-blue-500">
                        <div class="flex justify-between items-start">
                            <div>
                                <p class="text-sm text-gray-400">Analyzed Samples</p>
                                <h3 class="text-2xl font-bold">12,847</h3>
                            </div>
                            <i class="fas fa-file-code text-blue-400 text-xl"></i>
                        </div>
                        <p class="text-xs text-gray-400 mt-2">+124 new today</p>
                    </div>
                    <div class="bg-gray-800 rounded-lg p-4 border-l-4 border-green-500">
                        <div class="flex justify-between items-start">
                            <div>
                                <p class="text-sm text-gray-400">Identified Families</p>
                                <h3 class="text-2xl font-bold">328</h3>
                            </div>
                            <i class="fas fa-sitemap text-green-400 text-xl"></i>
                        </div>
                        <p class="text-xs text-gray-400 mt-2">+3 new this week</p>
                    </div>
                    <div class="bg-gray-800 rounded-lg p-4 border-l-4 border-purple-500">
                        <div class="flex justify-between items-start">
                            <div>
                                <p class="text-sm text-gray-400">Active Campaigns</p>
                                <h3 class="text-2xl font-bold">47</h3>
                            </div>
                            <i class="fas fa-flag text-purple-400 text-xl"></i>
                        </div>
                        <p class="text-xs text-gray-400 mt-2">2 new campaigns detected</p>
                    </div>
                    <div class="bg-gray-800 rounded-lg p-4 border-l-4 border-yellow-500">
                        <div class="flex justify-between items-start">
                            <div>
                                <p class="text-sm text-gray-400">Threat Actors</p>
                                <h3 class="text-2xl font-bold">89</h3>
                            </div>
                            <i class="fas fa-user-secret text-yellow-400 text-xl"></i>
                        </div>
                        <p class="text-xs text-gray-400 mt-2">5 new attributions</p>
                    </div>
                </div>

                <!-- Main Analysis Section -->
                <div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6">
                    <!-- Variant Relationship Graph -->
                    <div class="lg:col-span-2 bg-gray-800 rounded-lg p-4">
                        <div class="flex justify-between items-center mb-4">
                            <h3 class="font-semibold">Malware Variant Relationship Map</h3>
                            <div class="flex space-x-2">
                                <button class="bg-gray-700 hover:bg-gray-600 px-3 py-1 rounded text-sm">
                                    <i class="fas fa-expand mr-1"></i> Fullscreen
                                </button>
                                <button class="bg-gray-700 hover:bg-gray-600 px-3 py-1 rounded text-sm">
                                    <i class="fas fa-download mr-1"></i> Export
                                </button>
                            </div>
                        </div>
                        <div class="graph-container rounded-lg" id="relationshipGraph">
                            <!-- This will be populated by JavaScript with the graph visualization -->
                            <div class="flex items-center justify-center h-full">
                                <div class="text-center">
                                    <i class="fas fa-project-diagram text-4xl text-gray-600 mb-2"></i>
                                    <p class="text-gray-400">Loading variant relationship visualization...</p>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- Sample Details -->
                    <div class="bg-gray-800 rounded-lg p-4">
                        <div class="flex justify-between items-center mb-4">
                            <h3 class="font-semibold">Selected Sample Details</h3>
                            <span class="bg-red-500 text-white text-xs px-2 py-1 rounded">Malicious</span>
                        </div>
                        <div class="space-y-4">
                            <div>
                                <p class="text-sm text-gray-400">Sample Hash</p>
                                <p class="font-mono text-sm bg-gray-900 p-2 rounded">a1b2c3d4e5f6...7890</p>
                            </div>
                            <div>
                                <p class="text-sm text-gray-400">File Type</p>
                                <p>Windows PE Executable (64-bit)</p>
                            </div>
                            <div>
                                <p class="text-sm text-gray-400">First Seen</p>
                                <p>2023-05-15 14:32:10 UTC</p>
                            </div>
                            <div>
                                <p class="text-sm text-gray-400">Malware Family</p>
                                <div class="flex items-center">
                                    <span class="bg-blue-900 text-blue-200 px-2 py-1 rounded text-xs mr-2">TrickBot</span>
                                    <span class="text-xs text-gray-400">(92% confidence)</span>
                                </div>
                            </div>
                            <div>
                                <p class="text-sm text-gray-400">Associated Campaign</p>
                                <div class="flex items-center">
                                    <span class="bg-purple-900 text-purple-200 px-2 py-1 rounded text-xs mr-2">Operation Cobalt Strike</span>
                                    <span class="text-xs text-gray-400">(87% confidence)</span>
                                </div>
                            </div>
                            <div>
                                <p class="text-sm text-gray-400">Threat Actor</p>
                                <div class="flex items-center">
                                    <span class="bg-yellow-900 text-yellow-200 px-2 py-1 rounded text-xs mr-2">Wizard Spider</span>
                                    <span class="text-xs text-gray-400">(78% confidence)</span>
                                </div>
                            </div>
                            <div class="pt-4 border-t border-gray-700">
                                <p class="text-sm text-gray-400 mb-2">Similarity Scores</p>
                                <div class="space-y-2">
                                    <div>
                                        <div class="flex justify-between text-xs mb-1">
                                            <span>Sample XZ-124 (TrickBot)</span>
                                            <span>94%</span>
                                        </div>
                                        <div class="w-full bg-gray-700 rounded-full h-2">
                                            <div class="bg-blue-500 h-2 rounded-full" style="width: 94%"></div>
                                        </div>
                                    </div>
                                    <div>
                                        <div class="flex justify-between text-xs mb-1">
                                            <span>Sample AB-789 (BazarLoader)</span>
                                            <span>82%</span>
                                        </div>
                                        <div class="w-full bg-gray-700 rounded-full h-2">
                                            <div class="bg-blue-400 h-2 rounded-full" style="width: 82%"></div>
                                        </div>
                                    </div>
                                    <div>
                                        <div class="flex justify-between text-xs mb-1">
                                            <span>Sample CD-456 (Ryuk)</span>
                                            <span>67%</span>
                                        </div>
                                        <div class="w-full bg-gray-700 rounded-full h-2">
                                            <div class="bg-blue-300 h-2 rounded-full" style="width: 67%"></div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Tabs Section -->
                <div class="bg-gray-800 rounded-lg mb-6">
                    <div class="tabs-container">
                        <div class="flex border-b border-gray-700">
                            <button class="tab-button px-4 py-3 font-medium text-sm border-b-2 border-blue-500 text-blue-400" data-tab="ttp">TTP Analysis</button>
                            <button class="tab-button px-4 py-3 font-medium text-sm text-gray-400 hover:text-white" data-tab="ioc">IOC Correlation</button>
                            <button class="tab-button px-4 py-3 font-medium text-sm text-gray-400 hover:text-white" data-tab="timeline">Evolution Timeline</button>
                            <button class="tab-button px-4 py-3 font-medium text-sm text-gray-400 hover:text-white" data-tab="code">Code Similarity</button>
                        </div>
                        
                        <!-- TTP Analysis Tab -->
                        <div id="ttp" class="tab-content active p-4">
                            <h4 class="font-semibold mb-4">Tactics, Techniques, and Procedures (MITRE ATT&CK Framework)</h4>
                            <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
                                <div>
                                    <h5 class="text-sm font-medium text-gray-400 mb-2">Common TTPs Across Related Samples</h5>
                                    <div class="bg-gray-900 rounded-lg p-3">
                                        <div class="mb-3">
                                            <div class="flex items-center mb-1">
                                                <span class="bg-red-500 text-white text-xs px-2 py-0.5 rounded mr-2">Tactic</span>
                                                <span class="font-medium">Execution</span>
                                            </div>
                                            <ul class="text-sm space-y-1 ml-8">
                                                <li class="flex items-center">
                                                    <span class="w-2 h-2 bg-blue-400 rounded-full mr-2"></span>
                                                    <span>Command-Line Interface (T1059)</span>
                                                    <span class="ml-auto text-xs text-gray-400">92% match</span>
                                                </li>
                                                <li class="flex items-center">
                                                    <span class="w-2 h-2 bg-blue-400 rounded-full mr-2"></span>
                                                    <span>Windows Management Instrumentation (T1047)</span>
                                                    <span class="ml-auto text-xs text-gray-400">87% match</span>
                                                </li>
                                            </ul>
                                        </div>
                                        <div class="mb-3">
                                            <div class="flex items-center mb-1">
                                                <span class="bg-purple-500 text-white text-xs px-2 py-0.5 rounded mr-2">Tactic</span>
                                                <span class="font-medium">Persistence</span>
                                            </div>
                                            <ul class="text-sm space-y-1 ml-8">
                                                <li class="flex items-center">
                                                    <span class="w-2 h-2 bg-blue-400 rounded-full mr-2"></span>
                                                    <span>Registry Run Keys (T1547.001)</span>
                                                    <span class="ml-auto text-xs text-gray-400">95% match</span>
                                                </li>
                                                <li class="flex items-center">
                                                    <span class="w-2 h-2 bg-blue-400 rounded-full mr-2"></span>
                                                    <span>Scheduled Task (T1053)</span>
                                                    <span class="ml-auto text-xs text-gray-400">83% match</span>
                                                </li>
                                            </ul>
                                        </div>
                                        <div>
                                            <div class="flex items-center mb-1">
                                                <span class="bg-yellow-500 text-white text-xs px-2 py-0.5 rounded mr-2">Tactic</span>
                                                <span class="font-medium">Defense Evasion</span>
                                            </div>
                                            <ul class="text-sm space-y-1 ml-8">
                                                <li class="flex items-center">
                                                    <span class="w-2 h-2 bg-blue-400 rounded-full mr-2"></span>
                                                    <span>Process Injection (T1055)</span>
                                                    <span class="ml-auto text-xs text-gray-400">89% match</span>
                                                </li>
                                                <li class="flex items-center">
                                                    <span class="w-2 h-2 bg-blue-400 rounded-full mr-2"></span>
                                                    <span>Obfuscated Files (T1027)</span>
                                                    <span class="ml-auto text-xs text-gray-400">91% match</span>
                                                </li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                                <div>
                                    <h5 class="text-sm font-medium text-gray-400 mb-2">TTP Heatmap Across Variants</h5>
                                    <div class="bg-gray-900 rounded-lg p-4">
                                        <canvas id="ttpHeatmap" height="300"></canvas>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        <!-- IOC Correlation Tab -->
                        <div id="ioc" class="tab-content p-4">
                            <h4 class="font-semibold mb-4">Indicator of Compromise Correlation</h4>
                            <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                                <div>
                                    <h5 class="text-sm font-medium text-gray-400 mb-2">Shared IOCs</h5>
                                    <div class="bg-gray-900 rounded-lg p-3">
                                        <div class="mb-4">
                                            <div class="flex items-center mb-2">
                                                <i class="fas fa-globe mr-2 text-blue-400"></i>
                                                <span class="font-medium">Domains</span>
                                            </div>
                                            <ul class="text-sm space-y-1">
                                                <li class="flex items-center justify-between bg-gray-800 p-2 rounded">
                                                    <span class="font-mono">malware-c2[.]com</span>
                                                    <span class="text-xs bg-blue-900 text-blue-200 px-2 py-0.5 rounded">5 variants</span>
                                                </li>
                                                <li class="flex items-center justify-between bg-gray-800 p-2 rounded">
                                                    <span class="font-mono">download-update[.]net</span>
                                                    <span class="text-xs bg-blue-900 text-blue-200 px-2 py-0.5 rounded">3 variants</span>
                                                </li>
                                                <li class="flex items-center justify-between bg-gray-800 p-2 rounded">
                                                    <span class="font-mono">secure-payment[.]xyz</span>
                                                    <span class="text-xs bg-blue-900 text-blue-200 px-2 py-0.5 rounded">2 variants</span>
                                                </li>
                                            </ul>
                                        </div>
                                        <div class="mb-4">
                                            <div class="flex items-center mb-2">
                                                <i class="fas fa-server mr-2 text-blue-400"></i>
                                                <span class="font-medium">IP Addresses</span>
                                            </div>
                                            <ul class="text-sm space-y-1">
                                                <li class="flex items-center justify-between bg-gray-800 p-2 rounded">
                                                    <span class="font-mono">185.143.223.47</span>
                                                    <span class="text-xs bg-blue-900 text-blue-200 px-2 py-0.5 rounded">4 variants</span>
                                                </li>
                                                <li class="flex items-center justify-between bg-gray-800 p-2 rounded">
                                                    <span class="font-mono">91.234.56.178</span>
                                                    <span class="text-xs bg-blue-900 text-blue-200 px-2 py-0.5 rounded">3 variants</span>
                                                </li>
                                            </ul>
                                        </div>
                                        <div>
                                            <div class="flex items-center mb-2">
                                                <i class="fas fa-file-signature mr-2 text-blue-400"></i>
                                                <span class="font-medium">File Hashes</span>
                                            </div>
                                            <ul class="text-sm space-y-1">
                                                <li class="flex items-center justify-between bg-gray-800 p-2 rounded">
                                                    <span class="font-mono">a1b2c3...7890 (DLL)</span>
                                                    <span class="text-xs bg-blue-900 text-blue-200 px-2 py-0.5 rounded">3 variants</span>
                                                </li>
                                                <li class="flex items-center justify-between bg-gray-800 p-2 rounded">
                                                    <span class="font-mono">x7y8z9...1234 (EXE)</span>
                                                    <span class="text-xs bg-blue-900 text-blue-200 px-2 py-0.5 rounded">2 variants</span>
                                                </li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                                <div>
                                    <h5 class="text-sm font-medium text-gray-400 mb-2">IOC Timeline</h5>
                                    <div class="bg-gray-900 rounded-lg p-4">
                                        <div id="iocTimelineChart" style="height: 300px;"></div>
                                    </div>
                                    <div class="mt-4">
                                        <h5 class="text-sm font-medium text-gray-400 mb-2">YARA Rule Matches</h5>
                                        <div class="bg-gray-900 rounded-lg p-3">
                                            <div class="flex items-center justify-between mb-2">
                                                <span class="text-sm font-medium">TrickBot v4 Loader</span>
                                                <span class="text-xs bg-green-900 text-green-200 px-2 py-0.5 rounded">98% match</span>
                                            </div>
                                            <div class="flex items-center justify-between mb-2">
                                                <span class="text-sm font-medium">BazarBackdoor C2</span>
                                                <span class="text-xs bg-green-900 text-green-200 px-2 py-0.5 rounded">87% match</span>
                                            </div>
                                            <div class="flex items-center justify-between">
                                                <span class="text-sm font-medium">Ryuk Encryption</span>
                                                <span class="text-xs bg-yellow-900 text-yellow-200 px-2 py-0.5 rounded">72% match</span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        <!-- Evolution Timeline Tab -->
                        <div id="timeline" class="tab-content p-4">
                            <h4 class="font-semibold mb-4">Malware Family Evolution Timeline</h4>
                            <div class="bg-gray-900 rounded-lg p-4">
                                <div class="timeline-container">
                                    <div class="timeline-item relative pl-8 pb-6">
                                        <div class="absolute left-0 top-0 w-6 h-6 rounded-full bg-blue-500 flex items-center justify-center">
                                            <i class="fas fa-code text-xs text-white"></i>
                                        </div>
                                        <div class="bg-gray-800 rounded-lg p-3">
                                            <div class="flex justify-between items-start">
                                                <div>
                                                    <h5 class="font-medium">TrickBot v1.0</h5>
                                                    <p class="text-xs text-gray-400">2016-10-15</p>
                                                </div>
                                                <span class="text-xs bg-blue-900 text-blue-200 px-2 py-0.5 rounded">Initial Version</span>
                                            </div>
                                            <p class="text-sm mt-1">First observed banking Trojan with web injects and form grabbing capabilities.</p>
                                        </div>
                                    </div>
                                    <div class="timeline-item relative pl-8 pb-6">
                                        <div class="absolute left-0 top-0 w-6 h-6 rounded-full bg-blue-500 flex items-center justify-center">
                                            <i class="fas fa-plus text-xs text-white"></i>
                                        </div>
                                        <div class="bg-gray-800 rounded-lg p-3">
                                            <div class="flex justify-between items-start">
                                                <div>
                                                    <h5 class="font-medium">TrickBot v2.4</h5>
                                                    <p class="text-xs text-gray-400">2017-05-22</p>
                                                </div>
                                                <span class="text-xs bg-purple-900 text-purple-200 px-2 py-0.5 rounded">Modular Update</span>
                                            </div>
                                            <p class="text-sm mt-1">Added modular architecture with plugin support for extended functionality.</p>
                                        </div>
                                    </div>
                                    <div class="timeline-item relative pl-8 pb-6">
                                        <div class="absolute left-0 top-0 w-6 h-6 rounded-full bg-blue-500 flex items-center justify-center">
                                            <i class="fas fa-network-wired text-xs text-white"></i>
                                        </div>
                                        <div class="bg-gray-800 rounded-lg p-3">
                                            <div class="flex justify-between items-start">
                                                <div>
                                                    <h5 class="font-medium">TrickBot v3.1</h5>
                                                    <p class="text-xs text-gray-400">2018-11-07</p>
                                                </div>
                                                <span class="text-xs bg-yellow-900 text-yellow-200 px-2 py-0.5 rounded">Lateral Movement</span>
                                            </div>
                                            <p class="text-sm mt-1">Incorporated worm-like spreading capabilities and SMB propagation.</p>
                                        </div>
                                    </div>
                                    <div class="timeline-item relative pl-8">
                                        <div class="absolute left-0 top-0 w-6 h-6 rounded-full bg-blue-500 flex items-center justify-center">
                                            <i class="fas fa-bolt text-xs text-white"></i>
                                        </div>
                                        <div class="bg-gray-800 rounded-lg p-3">
                                            <div class="flex justify-between items-start">
                                                <div>
                                                    <h5 class="font-medium">TrickBot v4.2</h5>
                                                    <p class="text-xs text-gray-400">2020-03-18</p>
                                                </div>
                                                <span class="text-xs bg-red-900 text-red-200 px-2 py-0.5 rounded">Ransomware</span>
                                            </div>
                                            <p class="text-sm mt-1">Integrated with Ryuk ransomware for double extortion attacks.</p>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        <!-- Code Similarity Tab -->
                        <div id="code" class="tab-content p-4">
                            <h4 class="font-semibold mb-4">Code Similarity Analysis</h4>
                            <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
                                <div>
                                    <h5 class="text-sm font-medium text-gray-400 mb-2">Fuzzy Hashing Comparison</h5>
                                    <div class="bg-gray-900 rounded-lg p-4">
                                        <canvas id="similarityChart" height="250"></canvas>
                                    </div>
                                    <div class="mt-4">
                                        <h5 class="text-sm font-medium text-gray-400 mb-2">Shared Code Fragments</h5>
                                        <div class="bg-gray-800 rounded-lg p-3">
                                            <div class="flex justify-between items-center mb-2">
                                                <span class="text-sm font-medium">Encryption Routine</span>
                                                <span class="text-xs bg-blue-900 text-blue-200 px-2 py-0.5 rounded">91% match</span>
                                            </div>
                                            <div class="flex justify-between items-center mb-2">
                                                <span class="text-sm font-medium">C2 Communication</span>
                                                <span class="text-xs bg-blue-900 text-blue-200 px-2 py-0.5 rounded">87% match</span>
                                            </div>
                                            <div class="flex justify-between items-center">
                                                <span class="text-sm font-medium">Persistence Mechanism</span>
                                                <span class="text-xs bg-blue-900 text-blue-200 px-2 py-0.5 rounded">83% match</span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div>
                                    <h5 class="text-sm font-medium text-gray-400 mb-2">Code Comparison Viewer</h5>
                                    <div class="bg-gray-900 rounded-lg overflow-hidden">
                                        <div class="flex bg-gray-800 text-sm">
                                            <div class="w-1/2 p-2 font-medium border-r border-gray-700">Current Sample</div>
                                            <div class="w-1/2 p-2 font-medium">Related Sample (TrickBot v3.1)</div>
                                        </div>
                                        <div class="code-viewer grid grid-cols-2 divide-x divide-gray-700">
                                            <div class="p-2 overflow-auto max-h-64">
                                                <pre class="text-gray-300"><code>void encryptFiles(string path) {
    for (auto &entry : fs::directory_iterator(path)) {
        if (entry.is_directory()) {
            encryptFiles(entry.path());
        } else {
            auto file = entry.path();
            if (isValidTarget(file)) {
                RSAEncrypt(file);
                rename(file, file += ".encrypted");
            }
        }
    }
}</code></pre>
                                            </div>
                                            <div class="p-2 overflow-auto max-h-64">
                                                <pre class="text-gray-300"><code>void encryptFiles(string path) {
    for (auto &entry : fs::directory_iterator(path)) {
        if (entry.is_directory()) {
            encryptFiles(entry.path());
        } else {
            auto file = entry.path();
            if (shouldEncrypt(file)) {
                RSAEncrypt(file);
                rename(file, file += ".locked");
            }
        }
    }
}</code></pre>
                                            </div>
                                        </div>
                                        <div class="bg-gray-800 p-2 text-xs text-gray-400">
                                            <i class="fas fa-info-circle mr-1 text-blue-400"></i> Highlighted code shows 91% similarity in encryption routines
                                        </div>
                                    </div>
                                    <div class="mt-4">
                                        <h5 class="text-sm font-medium text-gray-400 mb-2">Import Address Table (IAT) Comparison</h5>
                                        <div class="bg-gray-900 rounded-lg p-3">
                                            <div class="grid grid-cols-3 gap-2 text-xs mb-2 font-medium">
                                                <div>Function</div>
                                                <div class="text-center">Current</div>
                                                <div class="text-center">Related</div>
                                            </div>
                                            <div class="space-y-2">
                                                <div class="grid grid-cols-3 gap-2 items-center">
                                                    <div class="text-sm">CreateProcessW</div>
                                                    <div class="bg-gray-800 p-1 rounded text-center"></div>
                                                    <div class="bg-gray-800 p-1 rounded text-center"></div>
                                                </div>
                                                <div class="grid grid-cols-3 gap-2 items-center">
                                                    <div class="text-sm">RegSetValueEx</div>
                                                    <div class="bg-gray-800 p-1 rounded text-center"></div>
                                                    <div class="bg-gray-800 p-1 rounded text-center"></div>
                                                </div>
                                                <div class="grid grid-cols-3 gap-2 items-center">
                                                    <div class="text-sm">WSASend</div>
                                                    <div class="bg-gray-800 p-1 rounded text-center"></div>
                                                    <div class="bg-gray-800 p-1 rounded text-center"></div>
                                                </div>
                                                <div class="grid grid-cols-3 gap-2 items-center">
                                                    <div class="text-sm">CryptEncrypt</div>
                                                    <div class="bg-gray-800 p-1 rounded text-center"></div>
                                                    <div class="bg-gray-800 p-1 rounded text-center"></div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Related Samples -->
                <div class="bg-gray-800 rounded-lg p-4 mb-6">
                    <div class="flex justify-between items-center mb-4">
                        <h3 class="font-semibold">Related Malware Samples</h3>
                        <div class="flex items-center space-x-2">
                            <span class="text-xs text-gray-400">Sort by:</span>
                            <select class="bg-gray-700 border border-gray-600 text-sm rounded px-2 py-1">
                                <option>Similarity Score</option>
                                <option>First Seen</option>
                                <option>Campaign</option>
                                <option>Threat Actor</option>
                            </select>
                        </div>
                    </div>
                    <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
                        <div class="malware-card bg-gray-900 rounded-lg p-4 border border-gray-700 transition duration-300">
                            <div class="flex justify-between items-start mb-2">
                                <div>
                                    <h4 class="font-medium">TrickBot v3.1</h4>
                                    <p class="text-xs text-gray-400">First seen: 2018-11-07</p>
                                </div>
                                <span class="text-xs bg-blue-900 text-blue-200 px-2 py-0.5 rounded">94% match</span>
                            </div>
                            <div class="flex items-center mb-3">
                                <span class="bg-blue-500 text-white text-xs px-2 py-0.5 rounded mr-2">TrickBot</span>
                                <span class="bg-purple-500 text-white text-xs px-2 py-0.5 rounded mr-2">Operation Cobalt</span>
                                <span class="bg-yellow-500 text-white text-xs px-2 py-0.5 rounded">Wizard Spider</span>
                            </div>
                            <div class="text-sm mb-3">
                                <p class="text-gray-400">Shared characteristics:</p>
                                <ul class="list-disc list-inside text-gray-300 text-xs space-y-1 mt-1">
                                    <li>Identical C2 communication pattern</li>
                                    <li>Similar persistence mechanism</li>
                                    <li>Shared encryption algorithm</li>
                                </ul>
                            </div>
                            <div class="flex justify-between items-center text-xs">
                                <a href="#" class="text-blue-400 hover:underline">View analysis</a>
                                <button class="bg-gray-700 hover:bg-gray-600 px-2 py-1 rounded">Compare</button>
                            </div>
                        </div>
                        <div class="malware-card bg-gray-900 rounded-lg p-4 border border-gray-700 transition duration-300">
                            <div class="flex justify-between items-start mb-2">
                                <div>
                                    <h4 class="font-medium">BazarLoader v2</h4>
                                    <p class="text-xs text-gray-400">First seen: 2020-02-14</p>
                                </div>
                                <span class="text-xs bg-blue-900 text-blue-200 px-2 py-0.5 rounded">82% match</span>
                            </div>
                            <div class="flex items-center mb-3">
                                <span class="bg-green-500 text-white text-xs px-2 py-0.5 rounded mr-2">BazarLoader</span>
                                <span class="bg-purple-500 text-white text-xs px-2 py-0.5 rounded mr-2">Operation Cobalt</span>
                                <span class="bg-yellow-500 text-white text-xs px-2 py-0.5 rounded">Wizard Spider</span>
                            </div>
                            <div class="text-sm mb-3">
                                <p class="text-gray-400">Shared characteristics:</p>
                                <ul class="list-disc list-inside text-gray-300 text-xs space-y-1 mt-1">
                                    <li>Similar initial loader code</li>
                                    <li>Common C2 infrastructure</li>
                                    <li>Overlapping TTPs</li>
                                </ul>
                            </div>
                            <div class="flex justify-between items-center text-xs">
                                <a href="#" class="text-blue-400 hover:underline">View analysis</a>
                                <button class="bg-gray-700 hover:bg-gray-600 px-2 py-1 rounded">Compare</button>
                            </div>
                        </div>
                        <div class="malware-card bg-gray-900 rounded-lg p-4 border border-gray-700 transition duration-300">
                            <div class="flex justify-between items-start mb-2">
                                <div>
                                    <h4 class="font-medium">Ryuk v1.3</h4>
                                    <p class="text-xs text-gray-400">First seen: 2019-08-22</p>
                                </div>
                                <span class="text-xs bg-blue-900 text-blue-200 px-2 py-0.5 rounded">67% match</span>
                            </div>
                            <div class="flex items-center mb-3">
                                <span class="bg-red-500 text-white text-xs px-2 py-0.5 rounded mr-2">Ryuk</span>
                                <span class="bg-purple-500 text-white text-xs px-2 py-0.5 rounded mr-2">Operation Cobalt</span>
                                <span class="bg-yellow-500 text-white text-xs px-2 py-0.5 rounded">Wizard Spider</span>
                            </div>
                            <div class="text-sm mb-3">
                                <p class="text-gray-400">Shared characteristics:</p>
                                <ul class="list-disc list-inside text-gray-300 text-xs space-y-1 mt-1">
                                    <li>Similar encryption implementation</li>
                                    <li>Common lateral movement techniques</li>
                                    <li>Shared infrastructure components</li>
                                </ul>
                            </div>
                            <div class="flex justify-between items-center text-xs">
                                <a href="#" class="text-blue-400 hover:underline">View analysis</a>
                                <button class="bg-gray-700 hover:bg-gray-600 px-2 py-1 rounded">Compare</button>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Actionable Intelligence -->
                <div class="bg-gray-800 rounded-lg p-4">
                    <div class="flex justify-between items-center mb-4">
                        <h3 class="font-semibold">Actionable Intelligence</h3>
                        <button class="bg-blue-600 hover:bg-blue-700 text-white px-3 py-1 rounded text-sm flex items-center">
                            <i class="fas fa-file-export mr-1"></i>
                            <span>Generate Report</span>
                        </button>
                    </div>
                    <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
                        <div class="bg-gray-900 rounded-lg p-4">
                            <div class="flex items-center mb-3">
                                <div class="w-10 h-10 rounded-full bg-blue-900 flex items-center justify-center mr-3">
                                    <i class="fas fa-search text-blue-400"></i>
                                </div>
                                <h4 class="font-medium">Threat Hunting</h4>
                            </div>
                            <ul class="text-sm space-y-2">
                                <li class="flex items-start">
                                    <i class="fas fa-check-circle text-green-400 mt-1 mr-2"></i>
                                    <span>Search for IOCs in your environment: <span class="font-mono text-blue-300">malware-c2[.]com</span>, <span class="font-mono text-blue-300">185.143.223.47</span></span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-check-circle text-green-400 mt-1 mr-2"></i>
                                    <span>Look for processes with command-line parameters matching known patterns</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-check-circle text-green-400 mt-1 mr-2"></i>
                                    <span>Monitor registry keys for persistence mechanisms</span>
                                </li>
                            </ul>
                        </div>
                        <div class="bg-gray-900 rounded-lg p-4">
                            <div class="flex items-center mb-3">
                                <div class="w-10 h-10 rounded-full bg-purple-900 flex items-center justify-center mr-3">
                                    <i class="fas fa-shield-alt text-purple-400"></i>
                                </div>
                                <h4 class="font-medium">Detection Rules</h4>
                            </div>
                            <ul class="text-sm space-y-2">
                                <li class="flex items-start">
                                    <i class="fas fa-file-code text-yellow-400 mt-1 mr-2"></i>
                                    <span>YARA rule: <span class="font-mono text-purple-300">TrickBot_Loader_v4</span> (92% match)</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-file-code text-yellow-400 mt-1 mr-2"></i>
                                    <span>Sigma rule: <span class="font-mono text-purple-300">Ryuk_Encryption_Process</span></span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-file-code text-yellow-400 mt-1 mr-2"></i>
                                    <span>Suricata rule: <span class="font-mono text-purple-300">ET MALWARE TrickBot C2 Beacon</span></span>
                                </li>
                            </ul>
                        </div>
                        <div class="bg-gray-900 rounded-lg p-4">
                            <div class="flex items-center mb-3">
                                <div class="w-10 h-10 rounded-full bg-red-900 flex items-center justify-center mr-3">
                                    <i class="fas fa-user-shield text-red-400"></i>
                                </div>
                                <h4 class="font-medium">Mitigation</h4>
                            </div>
                            <ul class="text-sm space-y-2">
                                <li class="flex items-start">
                                    <i class="fas fa-ban text-red-400 mt-1 mr-2"></i>
                                    <span>Block communication to known C2 domains/IPs</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-ban text-red-400 mt-1 mr-2"></i>
                                    <span>Disable SMBv1 and restrict RDP access</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-ban text-red-400 mt-1 mr-2"></i>
                                    <span>Implement application whitelisting for critical directories</span>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </main>
        </div>
    </div>

    <script>
        // Tab functionality
        document.querySelectorAll('.tab-button').forEach(button => {
            button.addEventListener('click', () => {
                // Remove active class from all tabs and buttons
                document.querySelectorAll('.tab-button').forEach(btn => {
                    btn.classList.remove('border-blue-500', 'text-blue-400');
                    btn.classList.add('text-gray-400');
                });
                
                document.querySelectorAll('.tab-content').forEach(content => {
                    content.classList.remove('active');
                });
                
                // Add active class to clicked tab
                button.classList.add('border-blue-500', 'text-blue-400');
                button.classList.remove('text-gray-400');
                
                const tabId = button.getAttribute('data-tab');
                document.getElementById(tabId).classList.add('active');
            });
        });

        // Sample visualization for relationship graph
        setTimeout(() => {
            const graphContainer = document.getElementById('relationshipGraph');
            graphContainer.innerHTML = `
                <div class="relative h-full">
                    <div class="draggable-node absolute top-1/4 left-1/4 w-24 h-24 rounded-full bg-blue-900 border-2 border-blue-400 flex flex-col items-center justify-center cursor-move" style="transform: translate(-50%, -50%)">
                        <i class="fas fa-bug text-xl text-blue-300 mb-1"></i>
                        <span class="text-xs font-medium">Current Sample</span>
                        <span class="text-xxs text-gray-300">TrickBot v4.2</span>
                    </div>
                    
                    <div class="draggable-node absolute top-1/3 left-1/2 w-20 h-20 rounded-full bg-blue-800 border-2 border-blue-400 flex flex-col items-center justify-center cursor-move" style="transform: translate(-50%, -50%)">
                        <i class="fas fa-bug text-lg text-blue-300 mb-1"></i>
                        <span class="text-xs">TrickBot v3.1</span>
                        <span class="text-xxs text-gray-300">94%</span>
                    </div>
                    
                    <div class="draggable-node absolute top-2/3 left-1/3 w-20 h-20 rounded-full bg-green-800 border-2 border-green-400 flex flex-col items-center justify-center cursor-move" style="transform: translate(-50%, -50%)">
                        <i class="fas fa-bug text-lg text-green-300 mb-1"></i>
                        <span class="text-xs">BazarLoader</span>
                        <span class="text-xxs text-gray-300">82%</span>
                    </div>
                    
                    <div class="draggable-node absolute top-3/4 left-3/4 w-20 h-20 rounded-full bg-red-800 border-2 border-red-400 flex flex-col items-center justify-center cursor-move" style="transform: translate(-50%, -50%)">
                        <i class="fas fa-bug text-lg text-red-300 mb-1"></i>
                        <span class="text-xs">Ryuk v1.3</span>
                        <span class="text-xxs text-gray-300">67%</span>
                    </div>
                    
                    <svg class="absolute inset-0 w-full h-full" style="z-index: 0;">
                        <line x1="25%" y1="25%" x2="50%" y2="33%" stroke="#3B82F6" stroke-width="2" stroke-dasharray="5,5" />
                        <line x1="25%" y1="25%" x2="33%" y2="75%" stroke="#10B981" stroke-width="2" stroke-dasharray="5,5" />
                        <line x1="25%" y1="25%" x2="75%" y2="75%" stroke="#EF4444" stroke-width="2" stroke-dasharray="5,5" />
                    </svg>
                </div>
            `;
            
            // Make nodes draggable
            document.querySelectorAll('.draggable-node').forEach(node => {
                let isDragging = false;
                let offsetX, offsetY;
                
                node.addEventListener('mousedown', (e) => {
                    isDragging = true;
                    const rect = node.getBoundingClientRect();
                    offsetX = e.clientX - rect.left;
                    offsetY = e.clientY - rect.top;
                    node.style.zIndex = '10';
                    node.style.cursor = 'grabbing';
                });
                
                document.addEventListener('mousemove', (e) => {
                    if (!isDragging) return;
                    
                    const container = graphContainer.getBoundingClientRect();
                    let x = e.clientX - container.left - offsetX;
                    let y = e.clientY - container.top - offsetY;
                    
                    // Constrain to container
                    x = Math.max(0, Math.min(x, container.width - node.offsetWidth));
                    y = Math.max(0, Math.min(y, container.height - node.offsetHeight));
                    
                    node.style.left = `${x}px`;
                    node.style.top = `${y}px`;
                    node.style.transform = 'translate(0, 0)';
                });
                
                document.addEventListener('mouseup', () => {
                    isDragging = false;
                    node.style.zIndex = '1';
                    node.style.cursor = 'move';
                });
            });
        }, 1000);
        
        // Charts
        document.addEventListener('DOMContentLoaded', function() {
            // TTP Heatmap
            const ttpCtx = document.getElementById('ttpHeatmap').getContext('2d');
            const ttpHeatmap = new Chart(ttpCtx, {
                type: 'bar',
                data: {
                    labels: ['Execution', 'Persistence', 'Defense Evasion', 'Cred Access', 'Discovery', 'Lateral Movement', 'Collection', 'Exfiltration', 'Impact'],
                    datasets: [
                        {
                            label: 'Current Sample',
                            data: [92, 95, 89, 45, 78, 82, 60, 55, 85],
                            backgroundColor: 'rgba(59, 130, 246, 0.7)',
                            borderColor: 'rgba(59, 130, 246, 1)',
                            borderWidth: 1
                        },
                        {
                            label: 'Family Average',
                            data: [85, 90, 82, 40, 75, 78, 55, 50, 80],
                            backgroundColor: 'rgba(16, 185, 129, 0.7)',
                            borderColor: 'rgba(16, 185, 129, 1)',
                            borderWidth: 1
                        }
                    ]
                },
                options: {
                    responsive: true,
                    maintainAspectRatio: false,
                    scales: {
                        y: {
                            beginAtZero: true,
                            max: 100,
                            grid: {
                                color: 'rgba(255, 255, 255, 0.1)'
                            },
                            ticks: {
                                color: 'rgba(255, 255, 255, 0.7)'
                            }
                        },
                        x: {
                            grid: {
                                display: false
                            },
                            ticks: {
                                color: 'rgba(255, 255, 255, 0.7)'
                            }
                        }
                    },
                    plugins: {
                        legend: {
                            labels: {
                                color: 'rgba(255, 255, 255, 0.7)'
                            }
                        }
                    }
                }
            });
            
            // Similarity Chart
            const similarityCtx = document.getElementById('similarityChart').getContext('2d');
            const similarityChart = new Chart(similarityCtx, {
                type: 'radar',
                data: {
                    labels: ['Code Structure', 'Imports', 'Strings', 'Encryption', 'C2 Comms', 'Persistence', 'Lateral Movement'],
                    datasets: [
                        {
                            label: 'Current vs TrickBot v3.1',
                            data: [94, 89, 92, 91, 95, 87, 82],
                            backgroundColor: 'rgba(59, 130, 246, 0.2)',
                            borderColor: 'rgba(59, 130, 246, 1)',
                            borderWidth: 2,
                            pointBackgroundColor: 'rgba(59, 130, 246, 1)'
                        },
                        {
                            label: 'Current vs BazarLoader',
                            data: [82, 75, 78, 68, 72, 80, 65],
                            backgroundColor: 'rgba(16, 185, 129, 0.2)',
                            borderColor: 'rgba(16, 185, 129, 1)',
                            borderWidth: 2,
                            pointBackgroundColor: 'rgba(16, 185, 129, 1)'
                        }
                    ]
                },
                options: {
                    responsive: true,
                    maintainAspectRatio: false,
                    scales: {
                        r: {
                            angleLines: {
                                color: 'rgba(255, 255, 255, 0.1)'
                            },
                            grid: {
                                color: 'rgba(255, 255, 255, 0.1)'
                            },
                            pointLabels: {
                                color: 'rgba(255, 255, 255, 0.7)'
                            },
                            ticks: {
                                backdropColor: 'rgba(0, 0, 0, 0)',
                                color: 'rgba(255, 255, 255, 0.5)',
                                stepSize: 20
                            }
                        }
                    },
                    plugins: {
                        legend: {
                            labels: {
                                color: 'rgba(255, 255, 255, 0.7)'
                            }
                        }
                    }
                }
            });
            
            // IOC Timeline Chart
            const iocTimelineOptions = {
                series: [{
                    name: 'IOC Occurrences',
                    data: [
                        { x: '2020-01', y: 5 },
                        { x: '2020-04', y: 8 },
                        { x: '2020-07', y: 12 },
                        { x: '2020-10', y: 18 },
                        { x: '2021-01', y: 15 },
                        { x: '2021-04', y: 22 },
                        { x: '2021-07', y: 28 },
                        { x: '2021-10', y: 32 },
                        { x: '2022-01', y: 25 },
                        { x: '2022-04', y: 18 },
                        { x: '2022-07', y: 14 },
                        { x: '2022-10', y: 10 },
                        { x: '2023-01', y: 8 },
                        { x: '2023-04', y: 12 }
                    ]
                }],
                chart: {
                    height: '100%',
                    type: 'area',
                    foreColor: '#CBD5E0',
                    toolbar: {
                        show: true,
                        tools: {
                            download: true,
                            selection: true,
                            zoom: true,
                            zoomin: true,
                            zoomout: true,
                            pan: true,
                            reset: true
                        }
                    },
                    zoom: {
                        enabled: true
                    }
                },
                dataLabels: {
                    enabled: false
                },
                stroke: {
                    curve: 'smooth',
                    width: 2,
                    colors: ['#3B82F6']
                },
                fill: {
                    type: 'gradient',
                    gradient: {
                        shadeIntensity: 1,
                        opacityFrom: 0.7,
                        opacityTo: 0.3,
                        stops: [0, 90, 100]
                    },
                    colors: ['#3B82F6']
                },
                xaxis: {
                    type: 'category',
                    axisBorder: {
                        show: false
                    },
                    axisTicks: {
                        show: false
                    }
                },
                yaxis: {
                    labels: {
                        formatter: function(val) {
                            return val.toFixed(0);
                        }
                    }
                },
                tooltip: {
                    enabled: true,
                    theme: 'dark',
                    x: {
                        format: 'MMM yyyy'
                    }
                },
                grid: {
                    borderColor: 'rgba(255, 255, 255, 0.1)'
                }
            };
            
            const iocTimelineChart = new ApexCharts(document.querySelector("#iocTimelineChart"), iocTimelineOptions);
            iocTimelineChart.render();
        });
    </script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=CrypticallyRequie/malwarecorrelator" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>