Repository navigation
Expand file tree
/
Copy pathTGDetect_Complete_Project_Guide.html
More file actions
3321 lines (3071 loc) · 180 KB
/
Copy pathTGDetect_Complete_Project_Guide.html
File metadata and controls
3321 lines (3071 loc) · 180 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
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
<!DOCTYPE html>
<html lang="en" data-theme="night">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TGDetect — Complete Technical Architecture, Deep Walkthrough & Presentation Guide</title>
<style>
:root {
--bg: #090d16;
--bg-alt: #0c1220;
--panel: #111a2e;
--panel-hover: #16223b;
--panel-header: #152238;
--panel-border: #1e2e4a;
--border-subtle: #192740;
--accent: #00e5ff;
--accent-dim: #0098b3;
--accent-glow: rgba(0, 229, 255, 0.15);
--accent-glow-strong: rgba(0, 229, 255, 0.3);
--green: #10b981;
--green-glow: rgba(16, 185, 129, 0.15);
--red: #f43f5e;
--red-glow: rgba(244, 63, 94, 0.15);
--amber: #f59e0b;
--amber-glow: rgba(245, 158, 11, 0.15);
--purple: #a855f7;
--purple-glow: rgba(168, 85, 247, 0.15);
--text: #f1f5f9;
--text-muted: #94a3b8;
--text-dim: #64748b;
--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
--font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, "Courier New", monospace;
--sidebar-w: 320px;
--radius-sm: 4px;
--radius-md: 8px;
--radius-lg: 12px;
}
[data-theme="solarized-light"] {
--bg: #fdf6e3;
--bg-alt: #f4ece1;
--panel: #eee8d5;
--panel-hover: #e8e0cc;
--panel-header: #e4dcbe;
--panel-border: #dfd7c2;
--border-subtle: #d6ccb2;
--accent: #1e7b74;
--accent-dim: #145550;
--accent-glow: rgba(30, 123, 116, 0.12);
--accent-glow-strong: rgba(30, 123, 116, 0.25);
--green: #2aa198;
--green-glow: rgba(42, 161, 152, 0.15);
--red: #dc322f;
--red-glow: rgba(220, 50, 47, 0.15);
--amber: #b58900;
--amber-glow: rgba(181, 137, 0, 0.15);
--purple: #6c71c4;
--purple-glow: rgba(108, 113, 196, 0.15);
--text: #073642;
--text-muted: #586e75;
--text-dim: #839496;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: var(--font-sans);
background-color: var(--bg);
color: var(--text);
line-height: 1.65;
font-size: 15px;
overflow-x: hidden;
transition: background-color 0.2s ease, color 0.2s ease;
}
/* Layout */
.app-container {
display: flex;
min-height: 100vh;
}
/* Sticky Sidebar */
.sidebar {
width: var(--sidebar-w);
height: 100vh;
position: sticky;
top: 0;
background: var(--bg-alt);
border-right: 1px solid var(--panel-border);
display: flex;
flex-direction: column;
flex-shrink: 0;
z-index: 100;
overflow-y: auto;
}
.sidebar-header {
padding: 1.25rem;
border-bottom: 1px solid var(--panel-border);
background: var(--panel-header);
}
.sidebar-brand {
display: flex;
align-items: center;
gap: 0.6rem;
font-weight: 800;
font-size: 1.15rem;
letter-spacing: 0.05em;
color: var(--text);
}
.badge-pulse {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--accent);
box-shadow: 0 0 8px var(--accent);
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { transform: scale(0.95); opacity: 0.7; }
50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 12px var(--accent); }
100% { transform: scale(0.95); opacity: 0.7; }
}
.sidebar-subbrand {
font-size: 0.75rem;
font-family: var(--font-mono);
color: var(--text-muted);
margin-top: 0.25rem;
text-transform: uppercase;
letter-spacing: 0.08em;
}
.sidebar-search {
padding: 0.75rem 1.25rem;
border-bottom: 1px solid var(--panel-border);
}
.sidebar-search input {
width: 100%;
background: var(--panel);
border: 1px solid var(--panel-border);
color: var(--text);
padding: 0.5rem 0.75rem;
border-radius: var(--radius-sm);
font-size: 0.85rem;
font-family: var(--font-mono);
outline: none;
transition: border-color 0.2s ease;
}
.sidebar-search input:focus {
border-color: var(--accent);
box-shadow: 0 0 8px var(--accent-glow);
}
/* Quick Jump Highlights */
.quick-jump-section {
padding: 0.75rem 1.25rem;
border-bottom: 1px solid var(--panel-border);
}
.quick-jump-title {
font-size: 0.7rem;
font-family: var(--font-mono);
text-transform: uppercase;
letter-spacing: 0.1em;
color: var(--text-dim);
margin-bottom: 0.5rem;
}
.quick-jump-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0.4rem;
}
.quick-jump-btn {
display: block;
text-decoration: none;
font-size: 0.75rem;
font-weight: 600;
padding: 0.35rem 0.5rem;
border-radius: var(--radius-sm);
background: var(--panel);
border: 1px solid var(--panel-border);
color: var(--text);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
transition: all 0.15s ease;
}
.quick-jump-btn:hover {
background: var(--accent-glow);
border-color: var(--accent);
color: var(--accent);
}
/* Navigation Links */
.nav-menu {
list-style: none;
padding: 0.75rem 0;
flex: 1;
}
.nav-item a {
display: flex;
align-items: center;
padding: 0.45rem 1.25rem;
text-decoration: none;
color: var(--text-muted);
font-size: 0.85rem;
border-left: 2px solid transparent;
transition: all 0.15s ease;
}
.nav-item a:hover, .nav-item a.active {
color: var(--accent);
background: var(--accent-glow);
border-left-color: var(--accent);
}
.nav-num {
font-family: var(--font-mono);
font-size: 0.75rem;
opacity: 0.6;
width: 28px;
flex-shrink: 0;
}
/* Main Content Area */
.main-content {
flex: 1;
padding: 2.5rem 3.5rem;
max-width: 1440px;
margin: 0 auto;
overflow-y: auto;
}
@media (max-width: 1100px) {
.main-content { padding: 1.5rem; }
.sidebar { display: none; }
}
/* Top Action Bar */
.top-action-bar {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 1.5rem;
margin-bottom: 2rem;
border-bottom: 1px solid var(--panel-border);
}
.top-tag {
display: inline-flex;
align-items: center;
gap: 0.4rem;
background: var(--panel);
border: 1px solid var(--panel-border);
padding: 0.35rem 0.75rem;
border-radius: 9999px;
font-family: var(--font-mono);
font-size: 0.78rem;
color: var(--text-muted);
}
.top-tag .dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--green);
}
.theme-toggle-btn {
background: var(--panel);
border: 1px solid var(--panel-border);
color: var(--text);
padding: 0.4rem 0.85rem;
border-radius: var(--radius-sm);
font-size: 0.82rem;
font-family: var(--font-mono);
cursor: pointer;
display: inline-flex;
align-items: center;
gap: 0.5rem;
transition: all 0.15s ease;
}
.theme-toggle-btn:hover {
border-color: var(--accent);
color: var(--accent);
}
/* Typography & Headings */
h1.guide-title {
font-size: 2.4rem;
font-weight: 800;
letter-spacing: -0.02em;
color: var(--text);
margin-bottom: 0.5rem;
line-height: 1.2;
}
.guide-subtitle {
font-size: 1.05rem;
color: var(--text-muted);
margin-bottom: 2rem;
max-width: 900px;
}
h2.section-heading {
font-size: 1.6rem;
font-weight: 700;
color: var(--accent);
margin: 3.5rem 0 1.25rem;
padding-bottom: 0.6rem;
border-bottom: 1px solid var(--panel-border);
display: flex;
align-items: center;
gap: 0.6rem;
}
h3.sub-heading {
font-size: 1.2rem;
font-weight: 600;
color: var(--text);
margin: 1.75rem 0 0.75rem;
}
p { margin-bottom: 1rem; color: var(--text); }
/* Tactical Panels */
.card {
background: var(--panel);
border: 1px solid var(--panel-border);
border-radius: var(--radius-md);
padding: 1.5rem;
margin: 1.25rem 0;
position: relative;
box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
.card-header-bar {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
padding-bottom: 0.75rem;
border-bottom: 1px solid var(--border-subtle);
}
.card-title {
font-size: 1.05rem;
font-weight: 700;
color: var(--text);
display: flex;
align-items: center;
gap: 0.5rem;
}
.card-badge {
font-family: var(--font-mono);
font-size: 0.7rem;
padding: 0.2rem 0.5rem;
border-radius: 3px;
background: var(--panel-header);
border: 1px solid var(--panel-border);
color: var(--text-muted);
}
/* Grids */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.25rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
/* Stat Box */
.stat-box {
background: var(--bg-alt);
border: 1px solid var(--panel-border);
border-radius: var(--radius-sm);
padding: 1rem;
text-align: left;
}
.stat-val {
font-size: 1.8rem;
font-weight: 800;
font-family: var(--font-mono);
color: var(--accent);
line-height: 1.1;
margin-bottom: 0.25rem;
}
.stat-lbl {
font-size: 0.75rem;
font-family: var(--font-mono);
text-transform: uppercase;
color: var(--text-muted);
letter-spacing: 0.05em;
}
.stat-desc {
font-size: 0.8rem;
color: var(--text-dim);
margin-top: 0.35rem;
}
/* Presentation lines & Callout boxes */
.presentation-quote {
background: linear-gradient(135deg, var(--accent-glow) 0%, rgba(0,0,0,0) 100%);
border-left: 4px solid var(--accent);
border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
padding: 1rem 1.25rem;
margin: 1rem 0;
}
.presentation-quote .label {
font-family: var(--font-mono);
font-size: 0.75rem;
font-weight: 700;
text-transform: uppercase;
color: var(--accent);
margin-bottom: 0.3rem;
display: flex;
align-items: center;
gap: 0.4rem;
}
.presentation-quote .quote-text {
font-size: 1rem;
font-weight: 600;
font-style: italic;
color: var(--text);
line-height: 1.5;
}
/* 4-Step Explanation Blocks */
.four-step-block {
border: 1px solid var(--panel-border);
border-radius: var(--radius-md);
margin: 1.25rem 0;
overflow: hidden;
}
.step-row {
padding: 1rem 1.25rem;
border-bottom: 1px solid var(--border-subtle);
background: var(--panel);
}
.step-row:last-child { border-bottom: none; }
.step-label {
font-size: 0.78rem;
font-weight: 700;
font-family: var(--font-mono);
letter-spacing: 0.05em;
margin-bottom: 0.35rem;
display: flex;
align-items: center;
gap: 0.4rem;
}
.step-label.simple { color: var(--green); }
.step-label.technical { color: var(--accent); }
.step-label.tgdetect { color: var(--purple); }
.step-label.say { color: var(--amber); }
.step-content {
font-size: 0.92rem;
line-height: 1.55;
color: var(--text);
}
/* Alert Boxes */
.alert {
padding: 1rem 1.25rem;
border-radius: var(--radius-sm);
margin: 1.25rem 0;
font-size: 0.9rem;
line-height: 1.5;
}
.alert-warning {
background: var(--amber-glow);
border-left: 4px solid var(--amber);
color: var(--text);
}
.alert-warning strong { color: var(--amber); }
.alert-danger {
background: var(--red-glow);
border-left: 4px solid var(--red);
color: var(--text);
}
.alert-danger strong { color: var(--red); }
.alert-info {
background: var(--accent-glow);
border-left: 4px solid var(--accent);
color: var(--text);
}
.alert-info strong { color: var(--accent); }
/* Tables */
.table-wrapper {
overflow-x: auto;
margin: 1.25rem 0;
border: 1px solid var(--panel-border);
border-radius: var(--radius-sm);
}
table {
width: 100%;
border-collapse: collapse;
font-size: 0.88rem;
text-align: left;
}
th {
background: var(--panel-header);
color: var(--accent);
font-family: var(--font-mono);
font-size: 0.78rem;
text-transform: uppercase;
letter-spacing: 0.05em;
padding: 0.75rem 1rem;
border-bottom: 1px solid var(--panel-border);
}
td {
padding: 0.75rem 1rem;
border-bottom: 1px solid var(--border-subtle);
color: var(--text);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--panel-hover); }
.tag {
display: inline-block;
font-family: var(--font-mono);
font-size: 0.7rem;
font-weight: 600;
padding: 0.15rem 0.5rem;
border-radius: 4px;
}
.tag-green { background: var(--green-glow); color: var(--green); border: 1px solid var(--green); }
.tag-accent { background: var(--accent-glow); color: var(--accent); border: 1px solid var(--accent); }
.tag-red { background: var(--red-glow); color: var(--red); border: 1px solid var(--red); }
.tag-amber { background: var(--amber-glow); color: var(--amber); border: 1px solid var(--amber); }
.tag-purple { background: var(--purple-glow); color: var(--purple); border: 1px solid var(--purple); }
/* Code and Mono Blocks */
pre, code {
font-family: var(--font-mono);
}
code {
background: var(--bg-alt);
color: var(--accent);
padding: 0.15rem 0.4rem;
border-radius: 3px;
font-size: 0.85em;
border: 1px solid var(--panel-border);
}
pre {
background: var(--bg-alt);
border: 1px solid var(--panel-border);
border-radius: var(--radius-sm);
padding: 1.25rem;
overflow-x: auto;
font-size: 0.85rem;
line-height: 1.5;
color: var(--text);
margin: 1rem 0;
}
pre code {
background: none;
border: none;
padding: 0;
color: inherit;
}
/* Accordion */
.accordion {
border: 1px solid var(--panel-border);
border-radius: var(--radius-sm);
margin: 0.75rem 0;
overflow: hidden;
background: var(--panel);
}
.accordion-trigger {
width: 100%;
padding: 1rem 1.25rem;
background: var(--panel);
border: none;
text-align: left;
color: var(--text);
font-weight: 600;
font-size: 0.95rem;
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
transition: background 0.15s ease;
}
.accordion-trigger:hover { background: var(--panel-hover); }
.accordion-trigger .chevron {
transition: transform 0.2s ease;
font-family: var(--font-mono);
font-size: 0.8rem;
color: var(--accent);
}
.accordion-content {
display: none;
padding: 1rem 1.25rem;
border-top: 1px solid var(--border-subtle);
background: var(--bg-alt);
font-size: 0.9rem;
line-height: 1.6;
}
.accordion.open .accordion-content { display: block; }
.accordion.open .chevron { transform: rotate(90deg); }
/* SVG Diagrams */
.svg-diagram-wrapper {
background: var(--bg-alt);
border: 1px solid var(--panel-border);
border-radius: var(--radius-md);
padding: 1.5rem;
margin: 1.5rem 0;
overflow-x: auto;
text-align: center;
}
.svg-diagram-wrapper svg {
max-width: 100%;
height: auto;
}
/* Copy Button */
.copy-btn {
background: transparent;
border: 1px solid var(--panel-border);
color: var(--text-muted);
border-radius: 3px;
padding: 0.2rem 0.5rem;
font-size: 0.7rem;
font-family: var(--font-mono);
cursor: pointer;
margin-left: 0.5rem;
}
.copy-btn:hover {
border-color: var(--accent);
color: var(--accent);
}
</style>
</head>
<body>
<div class="app-container">
<aside class="sidebar">
<div class="sidebar-header">
<div class="sidebar-brand">
<span class="badge-pulse"></span>
<span>TGDETECT</span>
</div>
<div class="sidebar-subbrand">COMMAND INTELLIGENCE SYSTEM</div>
</div>
<div class="sidebar-search">
<input type="text" id="search-input" placeholder="Search architecture, metrics..." onkeyup="filterContent()">
</div>
<div class="quick-jump-section">
<div class="quick-jump-title">CRITICAL PRESENTATION SHORTCUTS</div>
<div class="quick-jump-grid">
<a href="#part-2" class="quick-jump-btn" style="color:var(--accent);">🔥 4 Objectives</a>
<a href="#part-3" class="quick-jump-btn">🛠 Tech Stack</a>
<a href="#part-4" class="quick-jump-btn">📂 Dataset</a>
<a href="#part-7" class="quick-jump-btn">🕸 Graph Build</a>
<a href="#part-11" class="quick-jump-btn" style="color:var(--green);">🤖 Model Arch</a>
<a href="#part-14" class="quick-jump-btn" style="color:var(--amber);">📊 Metrics</a>
<a href="#part-19" class="quick-jump-btn" style="color:var(--accent);">🎤 Presentation</a>
<a href="#part-23" class="quick-jump-btn" style="color:var(--purple);">🧪 Viva Q&A</a>
</div>
</div>
<ul class="nav-menu">
<li class="nav-item"><a href="#executive-summary"><span class="nav-num">--</span> Executive Summary</a></li>
<li class="nav-item"><a href="#part-1"><span class="nav-num">01</span> System Architecture</a></li>
<li class="nav-item"><a href="#part-2"><span class="nav-num">02</span> 4 Main Objectives</a></li>
<li class="nav-item"><a href="#part-3"><span class="nav-num">03</span> Technology Stack</a></li>
<li class="nav-item"><a href="#part-4"><span class="nav-num">04</span> Dataset Ingestion</a></li>
<li class="nav-item"><a href="#part-5"><span class="nav-num">05</span> Upload Pipeline</a></li>
<li class="nav-item"><a href="#part-6"><span class="nav-num">06</span> Dataset Truth & Sync</a></li>
<li class="nav-item"><a href="#part-7"><span class="nav-num">07</span> Graph Construction</a></li>
<li class="nav-item"><a href="#part-8"><span class="nav-num">08</span> Temporal Analysis</a></li>
<li class="nav-item"><a href="#part-9"><span class="nav-num">09</span> Attack Chains</a></li>
<li class="nav-item"><a href="#part-10"><span class="nav-num">10</span> MITRE ATT&CK</a></li>
<li class="nav-item"><a href="#part-11"><span class="nav-num">11</span> Model Architecture</a></li>
<li class="nav-item"><a href="#part-12"><span class="nav-num">12</span> Model Training</a></li>
<li class="nav-item"><a href="#part-13"><span class="nav-num">13</span> Loss Functions</a></li>
<li class="nav-item"><a href="#part-14"><span class="nav-num">14</span> Performance Scores</a></li>
<li class="nav-item"><a href="#part-15"><span class="nav-num">15</span> Benchmark Comparison</a></li>
<li class="nav-item"><a href="#part-16"><span class="nav-num">16</span> Telemetry vs Benchmark</a></li>
<li class="nav-item"><a href="#part-17"><span class="nav-num">17</span> Command Center Views</a></li>
<li class="nav-item"><a href="#part-18"><span class="nav-num">18</span> ML vs UI Cockpit</a></li>
<li class="nav-item"><a href="#part-19"><span class="nav-num">19</span> Presentation Script</a></li>
<li class="nav-item"><a href="#part-20"><span class="nav-num">20</span> 30-Second Pitch</a></li>
<li class="nav-item"><a href="#part-21"><span class="nav-num">21</span> 1-Minute Summary</a></li>
<li class="nav-item"><a href="#part-22"><span class="nav-num">22</span> 3-Minute Live Demo</a></li>
<li class="nav-item"><a href="#part-23"><span class="nav-num">23</span> Viva Questions (35)</a></li>
<li class="nav-item"><a href="#part-24"><span class="nav-num">24</span> Limitations & Future</a></li>
<li class="nav-item"><a href="#part-25"><span class="nav-num">25</span> Base Paper Alignment</a></li>
<li class="nav-item"><a href="#part-26"><span class="nav-num">26</span> Implementation Status</a></li>
</ul>
</aside>
<main class="main-content">
<!-- ============================================================ -->
<!-- EXECUTIVE SUMMARY & CHEAT SHEET -->
<!-- ============================================================ -->
<section id="executive-summary">
<div class="top-action-bar">
<div class="top-tag"><span class="dot"></span> <span>OFFICIAL RESEARCH & ARCHITECTURAL SPECIFICATION</span></div>
<div style="display:flex; gap:0.5rem; align-items:center;">
<span class="top-tag">RELEASE v1.0.0 · PRODUCTION RUNTIME</span>
<button id="theme-toggle" class="theme-toggle-btn" onclick="toggleTheme()">☀ Switch to Solarized Light</button>
</div>
</div>
<h1 class="guide-title">TGDetect — Temporal Graph Security Threat Detection System</h1>
<p class="guide-subtitle">
A complete, deep, and factually authentic architectural walkthrough, dataset pipeline specification,
spatiotemporal GNN model analysis, and technical presentation guide.
</p>
<div class="card" style="border-left: 4px solid var(--accent);">
<div class="card-header-bar">
<div class="card-title">⚡ EXECUTIVE SUMMARY & CORE IDENTITY</div>
<span class="card-badge">THE ARCHITECTURAL AXIOM</span>
</div>
<p>
<strong>TGDetect</strong> is an end-to-end spatiotemporal graph intelligence system engineered to detect
sophisticated multi-stage cyberattacks and polymorphic botnets across enterprise networks.
While legacy Intrusion Detection Systems (IDS) inspect isolated packets or tabular flow summaries without relational
memory, TGDetect constructs a dynamic, directed temporal multigraph where nodes represent entities (IP addresses)
and edges represent timestamped communications carrying rich, leakage-free flow features.
</p>
<p>
TGDetect’s foundational axiom is: <strong style="color:var(--accent);">"TGDetect never fakes reality."</strong>
Every metric on screen, every node in the graph, and every attack path in the command center is strictly computed
from verified telemetry. Live operational telemetry is strictly decoupled from offline held-out model evaluation benchmarks.
</p>
<div class="grid-4" style="margin-top:1.25rem;">
<div class="stat-box">
<div class="stat-val">38,787</div>
<div class="stat-lbl">Trainable Parameters</div>
<div class="stat-desc">Lightweight 2-layer GraphSAGE + GRU architecture</div>
</div>
<div class="stat-box">
<div class="stat-val">0.9983</div>
<div class="stat-lbl">ROC-AUC (Test)</div>
<div class="stat-desc">Held-out unseen Donbot family (Scenario 47)</div>
</div>
<div class="stat-box">
<div class="stat-val">99.58%</div>
<div class="stat-lbl">Recall @ 1% FPR</div>
<div class="stat-desc">Catches 9,217 of 9,256 unseen botnet flows</div>
</div>
<div class="stat-box">
<div class="stat-val">0.8388</div>
<div class="stat-lbl">Best-F1 Score</div>
<div class="stat-desc">Oracle threshold 0.0070 (Precision 0.7483 / Recall 0.9543)</div>
</div>
</div>
</div>
<div class="card">
<div class="card-header-bar">
<div class="card-title">📋 60-SECOND REVISION CHEAT SHEET FOR EXAMINERS & EVALUATORS</div>
<span class="card-badge">RAPID REVISION</span>
</div>
<div class="grid-2">
<div>
<h4 style="color:var(--accent); margin-bottom:0.4rem;">The 4 Core Technical Pillars</h4>
<ul style="margin-left:1.2rem; color:var(--text); font-size:0.9rem;">
<li><strong>Pillar 1 — Graph Construction:</strong> IP entities as nodes, bidirectional NetFlows as directed edges with 37-dim leakage-free features.</li>
<li><strong>Pillar 2 — Zero-Day Generalization:</strong> 2-layer GraphSAGE + GRU trained on 4 botnet families, generalizing to unseen Donbot.</li>
<li><strong>Pillar 3 — Attack Reconstruction:</strong> Multi-strategy tracker (<code>entity_time</code>, <code>chain_id</code>, <code>causal_parent</code>) connecting multi-hop campaigns.</li>
<li><strong>Pillar 4 — State Authenticity:</strong> Single source of truth (<code>DatasetContext</code> + <code>DataCache</code>) synchronizing all 8 views dynamically.</li>
</ul>
</div>
<div>
<h4 style="color:var(--amber); margin-bottom:0.4rem;">Key Numbers to Defend</h4>
<ul style="margin-left:1.2rem; color:var(--text); font-size:0.9rem;">
<li><strong>Model Size:</strong> Exactly 38,787 weights (SAGEConv1=192, EdgeEnc=2,432, SAGEConv2=8,256, GRU=24,960, Heads=259).</li>
<li><strong>Test Volume:</strong> 1,068,851 test flows (9,256 malicious, 0.87% base rate) from CTU-13 Scenario 47.</li>
<li><strong>PR-AUC Drop:</strong> 0.7065 on unseen Donbot vs ~1.0 in-distribution — proves zero data leakage!</li>
<li><strong>F1=0 at Saved Threshold:</strong> A calibration transfer artifact (0.9999 threshold), NOT a model failure.</li>
</ul>
</div>
</div>
</div>
</section>
<!-- ============================================================ -->
<!-- PART 1: COMPLETE PROJECT UNDERSTANDING -->
<!-- ============================================================ -->
<section id="part-1">
<h2 class="section-heading">Part 1 — Complete Project Understanding & System Architecture</h2>
<div class="four-step-block">
<div class="step-row">
<div class="step-label simple">🧠 Simple Explanation</div>
<div class="step-content">
Imagine a thief breaking into a corporate headquarters. They don't just kick down the door and run off with a server.
Instead, on Monday they pose as a delivery driver to clone a badge (Reconnaissance). On Tuesday, they slip in, test a door,
and leave a tiny hidden transmitter (Initial Access & Persistence). On Wednesday, they quietly copy files over hours (Exfiltration).
If a security guard only looks at Monday, Tuesday, or Wednesday in isolation, nothing looks like a robbery.
<strong>Traditional IDS is like that blind security guard:</strong> it inspects each packet or log entry alone.
<strong>TGDetect is the master investigator:</strong> it maps who spoke to whom, tracks the sequence of events across days,
and draws the connected web of criminal activity using Graph Neural Networks.
</div>
</div>
<div class="step-row">
<div class="step-label technical">⚙ Technical Explanation</div>
<div class="step-content">
Advanced Persistent Threats (APTs) and modern botnets (e.g. Donbot, Rbot, Virut) employ multi-stage, low-and-slow execution
strategies designed to evade static threshold alerts and signature-based Network Intrusion Detection Systems (NIDS).
Tabular machine learning models (e.g. Random Forests, XGBoost) treat each NetFlow row as an independent identically distributed (i.i.d.)
sample, discarding crucial graph topological connectivity and chronological ordering.
TGDetect formulates cyber defense as <strong>inductive representation learning over dynamic temporal multigraphs</strong>.
By framing network entities as nodes and communication records as timestamped edges carrying multidimensional flow descriptors,
TGDetect deploys spatial neighborhood convolutions (GraphSAGE) to aggregate local communication subgraphs and recurrent units (GRU)
to capture temporal state transitions across discrete sliding windows.
</div>
</div>
<div class="step-row">
<div class="step-label tgdetect">🔍 TGDetect Implementation</div>
<div class="step-content">
TGDetect's pipeline ingests raw bidirectional NetFlow records (Argus format), validates structural schemas, extracts
14 standardized <code>TGEvent</code> attributes, and constructs temporal multigraphs. Node features are kept strictly leakage-free
(1-dimensional constant type vector), forcing the GNN to learn genuine topological propagation patterns via 37-dimensional edge
features. The PyTorch Geometric model executes 2 layers of SAGEConv with custom bidirectional edge-message aggregation,
feeding node sequence trajectories into a GRU that outputs per-flow classification logits via a concat-based edge classifier head.
</div>
</div>
<div class="step-row">
<div class="step-label say">🎤 What I Can Say in My Presentation</div>
<div class="step-content">
<em>"Traditional intrusion detection fails against multi-stage attacks because inspecting a single network flow in isolation
blinds you to the attacker's broader campaign. TGDetect models the entire network as an evolving temporal graph, allowing our neural network
to spot the coordinated, multi-step structural patterns of advanced threats even when individual flows appear completely benign."</em>
</div>
</div>
</div>
<h3 class="sub-heading">Ten Fundamental Questions Answered</h3>
<div class="card">
<table style="width:100%;">
<thead>
<tr>
<th style="width:25%;">Question</th>
<th style="width:35%;">Traditional Flaw / Reality</th>
<th style="width:40%;">TGDetect Solution & Grounding</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>1. Overall Purpose</strong></td>
<td>Siloed detection engines produce alert floods without context.</td>
<td>An end-to-end spatiotemporal graph intelligence platform detecting polymorphic, multi-stage attacks and reconstructing causal campaigns.</td>
</tr>
<tr>
<td><strong>2. Problem Solved</strong></td>
<td>Low-and-slow attacks blend into background network noise.</td>
<td>Correlates distributed activities across time windows and multi-hop IP graph neighborhoods.</td>
</tr>
<tr>
<td><strong>3. Traditional Inadequacy</strong></td>
<td>Signatures (Snort) require pre-known patterns; flat ML discards topology.</td>
<td>Graph representation preserves structural connectivity; GNN learns topological motifs.</td>
</tr>
<tr>
<td><strong>4. Multi-step Attack Difficulty</strong></td>
<td>Each step (DNS query, HTTPS beacon, SMB flow) looks innocent in isolation.</td>
<td>Attackers cannot hide the <em>topological relationships</em> between reconnaissance, C2, and exfiltration.</td>
</tr>
<tr>
<td><strong>5. Why Graphs?</strong></td>
<td>Flat tables discard source-destination graph structure.</td>
<td>Preserves who communicated with whom, in what direction, and across what degree of separation.</td>
</tr>
<tr>
<td><strong>6. Why Temporal?</strong></td>
<td>Static graphs collapse time, losing causality and sequence.</td>
<td>60-second sliding windows with 30-second stride preserve event order, burst dynamics, and temporal progression.</td>
</tr>
<tr>
<td><strong>7. Why GNNs?</strong></td>
<td>Manual graph heuristics (PageRank, degree) are brittle and unlearned.</td>
<td>GraphSAGE aggregates neighborhood context into dense vector embeddings; GRU tracks temporal trajectory.</td>
</tr>
<tr>
<td><strong>8. Diff from Normal IDS</strong></td>
<td>Normal IDS evaluates single packets/flows against static rules.</td>
<td>TGDetect evaluates flows within their evolving structural subgraphs and historical interaction context.</td>
</tr>
<tr>
<td><strong>9. Attack Relationships</strong></td>
<td>Uncorrelated alerts leave manual triage to exhausted analysts.</td>
<td>Explicitly represents relationships via directed multigraph edges and reconstructs causal attack chains.</td>
</tr>
<tr>
<td><strong>10. APT / Botnet Utility</strong></td>
<td>Zero-day malware escapes hash/signature databases instantly.</td>
<td>Demonstrated 99.58% recall on unseen Donbot botnet by recognizing relational communication patterns.</td>
</tr>
</tbody>
</table>
</div>
<h3 class="sub-heading">Complete System Architecture Diagram</h3>
<div class="svg-diagram-wrapper">
<svg viewBox="0 0 1000 780" width="100%" height="780" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient id="boxGrad" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#152238" />
<stop offset="100%" stop-color="#0e1726" />
</linearGradient>
<filter id="cyanGlow" x="-20%" y="-20%" width="140%" height="140%">
<feDropShadow dx="0" dy="0" stdDeviation="4" flood-color="#00e5ff" flood-opacity="0.3"/>
</filter>
<marker id="arrow" viewBox="0 0 10 10" refX="6" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse">
<path d="M 0 1 L 8 5 L 0 9 z" fill="#00e5ff" />
</marker>
<marker id="arrow-sub" viewBox="0 0 10 10" refX="6" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse">
<path d="M 0 1 L 8 5 L 0 9 z" fill="#10b981" />
</marker>
</defs>
<!-- Stage 1: Ingestion & Validation -->
<g transform="translate(50, 40)">
<rect width="260" height="90" rx="8" fill="url(#boxGrad)" stroke="#1e2e4a" stroke-width="1.5"/>
<text x="20" y="32" fill="#00e5ff" font-family="'JetBrains Mono', monospace" font-size="11" font-weight="700">STAGE 1: INGESTION & VALIDATION</text>
<text x="20" y="54" fill="#f1f5f9" font-family="sans-serif" font-size="13" font-weight="600">Raw NetFlow / Logs Upload</text>
<text x="20" y="72" fill="#94a3b8" font-family="sans-serif" font-size="11">Argus .binetflow · Mordor JSONL · CSV</text>
</g>
<line x1="180" y1="130" x2="180" y2="170" stroke="#00e5ff" stroke-width="2" marker-end="url(#arrow)"/>
<!-- Stage 2: Normalization & Labeling -->
<g transform="translate(50, 170)">
<rect width="260" height="90" rx="8" fill="url(#boxGrad)" stroke="#1e2e4a" stroke-width="1.5"/>
<text x="20" y="32" fill="#00e5ff" font-family="'JetBrains Mono', monospace" font-size="11" font-weight="700">STAGE 2: NORMALIZATION</text>
<text x="20" y="54" fill="#f1f5f9" font-family="sans-serif" font-size="13" font-weight="600">TGEvent Stream Engine</text>
<text x="20" y="72" fill="#94a3b8" font-family="sans-serif" font-size="11">14-field schema · "botnet" substring label</text>
</g>
<line x1="180" y1="260" x2="180" y2="300" stroke="#00e5ff" stroke-width="2" marker-end="url(#arrow)"/>
<!-- Stage 3: Graph Construction -->
<g transform="translate(50, 300)">
<rect width="260" height="95" rx="8" fill="url(#boxGrad)" stroke="#00e5ff" stroke-width="1.5" filter="url(#cyanGlow)"/>
<text x="20" y="32" fill="#00e5ff" font-family="'JetBrains Mono', monospace" font-size="11" font-weight="700">STAGE 3: GRAPH BUILDER</text>
<text x="20" y="54" fill="#f1f5f9" font-family="sans-serif" font-size="13" font-weight="600">Temporal Multigraph Construction</text>
<text x="20" y="72" fill="#94a3b8" font-family="sans-serif" font-size="11">IP nodes (1-dim) · Directed flows (37-dim)</text>
</g>
<!-- Stage 4: Branching to Temporal & Attack Tracker -->
<path d="M 310 345 L 390 345" stroke="#00e5ff" stroke-width="2" marker-end="url(#arrow)"/>
<!-- Attack Tracker Subsystem -->
<g transform="translate(390, 170)">