-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmindmap.html
More file actions
204 lines (196 loc) · 12.8 KB
/
Copy pathmindmap.html
File metadata and controls
204 lines (196 loc) · 12.8 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>HACT — Framework Mind Map</title>
<link rel="canonical" href="https://livre-osint.github.io/HACT/mindmap.html" />
<link rel="alternate" hreflang="en" href="https://livre-osint.github.io/HACT/mindmap.html" />
<link rel="alternate" hreflang="fr" href="https://livre-osint.github.io/HACT/mindmap-fr.html" />
<link rel="alternate" hreflang="x-default" href="https://livre-osint.github.io/HACT/mindmap.html" />
<style>
:root{--navy:#0b2338;--navy-2:#12395b;--accent:#c8102e;--bg:#f4f6f8;--ink:#1b2a38;--muted:#5a6b7b;--line:#dce3ea;--cell-hover:#d6e6f2;--ai:#7a3cf0;}
*{box-sizing:border-box}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;color:var(--ink);background:var(--bg)}
header.top{background:linear-gradient(180deg,var(--navy),var(--navy-2));color:#fff;padding:14px 20px;display:flex;align-items:center;gap:16px;position:sticky;top:0;z-index:10}
header.top .logo{font-weight:800;font-size:20px;letter-spacing:.5px}
header.top .logo b{color:#e94b5b}
header.top .sub{font-size:12.5px;color:#9db6cc}
header.top a{color:#cfe0ee;text-decoration:none;font-size:13.5px;font-weight:600;border:1px solid #2c5578;padding:6px 12px;border-radius:18px}
header.top a:hover{background:#0a2135;color:#fff}
header.top .hlinks{margin-left:auto;display:flex;gap:8px;flex-wrap:wrap;align-items:center}
main{max-width:1400px;margin:0 auto;padding:20px}
h1{font-size:20px;border-left:4px solid var(--accent);padding-left:10px;margin:6px 0}
p.note{color:var(--muted);font-size:14px;max-width:1000px;margin:0 0 14px}
.mm-legend{display:flex;flex-wrap:wrap;gap:6px 12px;margin:0 0 14px}
.mm-legend .lg{display:inline-flex;align-items:center;gap:7px;font-size:12.5px;cursor:pointer;padding:3px 8px;border-radius:16px;border:1px solid var(--line);background:#fff}
.mm-legend .lg:hover{background:var(--cell-hover)}
.mm-legend .sw{width:11px;height:11px;border-radius:50%;flex:0 0 auto}
.mm-legend .lg span{color:var(--muted)}
.mm-wrap{overflow:auto;border:1px solid var(--line);border-radius:12px;background:#ffffff;padding:8px}
#mm-svg{min-width:1200px}
#mm-svg svg{display:block;margin:0 auto;width:100%;height:auto;max-width:1560px}
.mm-node text{transition:fill .12s}
.mm-node:hover .lf-txt{font-weight:700}
.mm-node:hover .lf-box{stroke:var(--navy);stroke-width:1.8}
.mm-node:hover .tn-box{filter:brightness(1.08)}
.modal-back{position:fixed;inset:0;background:rgba(8,20,32,.55);display:none;z-index:100;padding:30px}
.modal-back.open{display:flex;align-items:flex-start;justify-content:center}
.modal{background:#fff;max-width:680px;width:100%;border-radius:12px;max-height:86vh;overflow:auto;box-shadow:0 20px 60px rgba(0,0,0,.4)}
.m-head{background:linear-gradient(180deg,var(--navy),var(--navy-2));color:#fff;padding:16px 20px;position:relative}
.m-head .mid{color:#9db6cc;font-weight:700;font-size:12.5px}
.m-head h3{margin:2px 0 6px;font-size:20px}
.m-head .eq{font-size:12px;color:#cfe0ee}
.m-head .close{position:absolute;top:12px;right:14px;color:#fff;font-size:24px;cursor:pointer;line-height:1;opacity:.85}
.m-body{padding:16px 20px}
.m-body h4{margin:14px 0 5px;font-size:12px;text-transform:uppercase;letter-spacing:.5px;color:var(--accent)}
.m-body p{margin:0 0 8px}
.m-body ul{margin:6px 0;padding-left:20px}
.chips{display:flex;gap:10px;flex-wrap:wrap;margin:6px 0}
.chip{display:inline-block;font-size:11px;font-weight:700;border-radius:10px;padding:2px 9px;color:#fff}
.chip.high{background:#c8102e}.chip.medium{background:#e08a00}.chip.ghost{background:#e6edf3;color:var(--muted)}
.tl{list-style:none;padding:0;margin:0}
.tl li{border:1px solid var(--line);border-left:3px solid var(--accent);border-radius:6px;padding:8px 11px;margin:6px 0;background:#fbfcfe;cursor:pointer}
.tl li.ai{border-left-color:var(--ai)}
.tl li b{display:block;font-size:14px;margin:1px 0 2px}
.tl li span{font-size:12.5px;color:var(--muted)}
.tl li .tid{color:var(--accent);font-weight:700;font-size:11.5px}
</style>
</head>
<body>
<header class="top">
<span class="logo">H<b>ACT</b></span>
<span class="sub">Framework mind map — 13 tactics · 57 techniques</span>
<nav class="hlinks">
<a href="index.html#matrix">Matrix</a>
<a href="why.html">Why HACT?</a>
<a href="ioh.html">IoH</a>
<a href="about.html">About</a>
<a href="index.html">← Back</a>
</nav>
</header>
<main>
<h1>Framework mind map</h1>
<p class="note">The framework as a branching map, in the WiseMapping style: HACT at the centre, its 13 tactics as branches spreading left and right, and each tactic's techniques as leaves. Click any node — a leaf, a tactic pill, or a legend entry — to open its detail. AI-augmented techniques are marked in purple.</p>
<div class="mm-legend" id="mm-legend"></div>
<div class="mm-wrap"><div id="mm-svg"></div></div>
</main>
<div class="modal-back" id="modal-back"><div class="modal" id="modal"></div></div>
<script src="data.js"></script>
<script>
(function(){
"use strict";
var $=function(s){return document.querySelector(s);};
function esc(s){return String(s).replace(/[&<>"]/g,function(m){return({"&":"&","<":"<",">":">","\"":"""})[m];});}
function truncate(s,n){s=String(s);return s.length>n?s.slice(0,n-1)+"…":s;}
function hue(i){return Math.round((i*360)/TACTICS.length);}
function tacticColor(i){return "hsl("+hue(i)+",58%,42%)";}
var idxOf={};TACTICS.forEach(function(t,i){idxOf[t.id]=i;});
var techByTactic={};
TACTICS.forEach(function(t){t.techniques.forEach(function(th){techByTactic[th.id]={th:th,t:t};});});
var aiById={};
(typeof AI_THREATS!=="undefined"?AI_THREATS:[]).forEach(function(a){aiById[a.id]=a;});
var back=$("#modal-back"),modal=$("#modal");
function open(h){modal.innerHTML=h;back.classList.add("open");modal.scrollTop=0;var c=modal.querySelector(".close");if(c)c.onclick=close;}
function close(){back.classList.remove("open");}
back.addEventListener("click",function(e){if(e.target===back)close();});
document.addEventListener("keydown",function(e){if(e.key==="Escape")close();});
function head(id,name,eq){return '<div class="m-head"><span class="close">×</span><span class="mid">'+esc(id)+'</span><h3>'+name+'</h3><span class="eq">'+esc(eq)+'</span></div>';}
function openTactic(id){
var t=TACTICS.filter(function(x){return x.id===id;})[0];if(!t)return;
var h=head(t.id,esc(t.name),"MITRE ATT&CK equivalent ↔ "+t.attack);
h+='<div class="m-body"><h4>Adversary objective</h4><p>'+esc(t.objective)+'</p>';
h+='<div class="chips"><span class="chip '+(t.severity==="HIGH"?"high":"medium")+'">'+esc(t.severity)+'</span><span class="chip ghost">Detection '+esc(t.detection)+'</span><span class="chip ghost">'+esc(t.frequency)+'</span></div>';
h+='<h4>Techniques ('+t.techniques.length+')</h4><ul class="tl">';
t.techniques.forEach(function(th){h+='<li class="'+(th.ai?"ai":"")+'" data-tech="'+th.id+'"><span class="tid">'+esc(th.id)+(th.ai?" · AI":"")+'</span><b>'+esc(th.name)+'</b><span>'+esc(th.desc)+'</span></li>';});
h+='</ul><h4>Indicators of HUMINT Operation (IoH)</h4><ul>';
t.ioh.forEach(function(x){h+='<li>'+esc(x)+'</li>';});
h+='</ul><h4>Priority countermeasures</h4><ul>';
t.countermeasures.forEach(function(x){h+='<li>'+esc(x)+'</li>';});
h+='</ul></div>';
open(h);
modal.querySelectorAll("[data-tech]").forEach(function(li){li.onclick=function(){openTechnique(li.getAttribute("data-tech"));};});
}
function openTechnique(id){
var rec=techByTactic[id];if(!rec)return;var th=rec.th,t=rec.t,ai=aiById[id];
var h=head(th.id,esc(th.name)+(th.ai?' <span class="chip" style="background:#7a3cf0">AI</span>':""),"Tactic: "+t.id+" · "+t.name+" ↔ "+t.attack);
h+='<div class="m-body"><h4>Description</h4><p>'+esc(th.desc)+'</p>';
if(ai){h+='<h4>Threat summary</h4><p>'+esc(ai.summary)+'</p><h4>Countermeasure</h4><p>'+esc(ai.cm)+'</p>';}
h+='<p style="margin-top:12px"><a href="#" id="toTactic">→ View full tactic '+esc(t.id)+' ('+esc(t.name)+')</a></p></div>';
open(h);
var lt=modal.querySelector("#toTactic");if(lt)lt.onclick=function(e){e.preventDefault();openTactic(t.id);};
}
var leafH=28, tacticGap=22, marginTop=34, marginBottom=34;
var W=1560, cx=780, cNodeW=150, cNodeH=48;
var rightIdx=[0,1,2,3,4,5,6], leftIdx=[7,8,9,10,11,12];
function layoutSide(idxs){
var y=marginTop, items=[];
idxs.forEach(function(k){
var t=TACTICS[k]; if(!t) return;
var n=t.techniques.length||1;
var blockH=n*leafH;
var leaves=t.techniques.map(function(th,i){return {th:th,y:y+i*leafH+leafH/2};});
items.push({t:t,k:k,cy:y+blockH/2,leaves:leaves});
y+=blockH+tacticGap;
});
return {items:items,height:y-tacticGap+marginBottom};
}
var R=layoutSide(rightIdx), L=layoutSide(leftIdx);
var H=Math.max(R.height,L.height,cNodeH+marginTop+marginBottom);
var centerY=H/2, offR=(H-R.height)/2, offL=(H-L.height)/2;
function measure(label){return Math.min(258,26+label.length*6.1);}
var connectors=[], nodes=[];
function drawSide(side,off,dir){
side.items.forEach(function(it){
var color=tacticColor(it.k), ty=it.cy+off;
var tLabel=it.t.id+" "+truncate(it.t.name,20);
var tnW=Math.min(240,32+tLabel.length*6.2), tnH=24, tnTop=ty-tnH/2;
var tnX = dir>0 ? cx+130 : cx-130-tnW;
var sX = dir>0 ? cx+cNodeW/2 : cx-cNodeW/2;
var eX = dir>0 ? tnX : tnX+tnW;
var dx=eX-sX;
connectors.push('<path d="M'+sX+','+centerY+' C'+(sX+dx*0.5).toFixed(1)+','+centerY+' '+(eX-dx*0.5).toFixed(1)+','+ty.toFixed(1)+' '+eX+','+ty.toFixed(1)+'" fill="none" stroke="'+color+'" stroke-width="2.4" opacity="0.7"/>');
nodes.push('<g class="mm-node" data-tactic="'+it.t.id+'"><title>'+esc(it.t.id)+' — '+esc(it.t.name)+'</title>'+
'<rect class="tn-box" x="'+tnX+'" y="'+tnTop+'" width="'+tnW+'" height="'+tnH+'" rx="12" fill="'+color+'"/>'+
'<text x="'+(tnX+tnW/2)+'" y="'+(ty+4).toFixed(1)+'" text-anchor="middle" font-size="11.5" font-weight="700" fill="#fff">'+esc(tLabel)+'</text></g>');
var leafEdgeX = dir>0 ? cx+430 : cx-430;
it.leaves.forEach(function(lf){
var ly=lf.y+off, th=lf.th;
var label=th.id+" "+truncate(th.name,30);
var w=measure(label), h=22, boxX = dir>0 ? leafEdgeX : leafEdgeX-w;
var accent = th.ai ? "#7a3cf0" : color;
var cs = dir>0 ? tnX+tnW : tnX;
var ce = dir>0 ? boxX : boxX+w;
var ddx=ce-cs;
connectors.push('<path d="M'+cs+','+ty.toFixed(1)+' C'+(cs+ddx*0.5).toFixed(1)+','+ty.toFixed(1)+' '+(ce-ddx*0.5).toFixed(1)+','+ly.toFixed(1)+' '+ce+','+ly.toFixed(1)+'" fill="none" stroke="'+color+'" stroke-width="1.2" opacity="0.45"/>');
nodes.push('<g class="mm-node" data-tech="'+th.id+'"><title>'+esc(th.id)+' — '+esc(th.name)+(th.ai?" (AI)":"")+'</title>'+
'<rect class="lf-box" x="'+boxX.toFixed(1)+'" y="'+(ly-h/2).toFixed(1)+'" width="'+w.toFixed(1)+'" height="'+h+'" rx="6" fill="#ffffff" stroke="#cfd9e2" stroke-width="1"/>'+
'<rect x="'+(dir>0?boxX:boxX+w-3).toFixed(1)+'" y="'+(ly-h/2).toFixed(1)+'" width="3" height="'+h+'" fill="'+accent+'"/>'+
'<text class="lf-txt" x="'+(dir>0?boxX+11:boxX+w-11).toFixed(1)+'" y="'+(ly+4).toFixed(1)+'" text-anchor="'+(dir>0?"start":"end")+'" font-size="11" fill="#1b2a38">'+esc(label)+(th.ai?" ●":"")+'</text></g>');
});
});
}
drawSide(R,offR,1);
drawSide(L,offL,-1);
var cnTop=centerY-cNodeH/2;
nodes.push('<g><rect x="'+(cx-cNodeW/2)+'" y="'+cnTop.toFixed(1)+'" width="'+cNodeW+'" height="'+cNodeH+'" rx="13" fill="#12395b" stroke="#c8102e" stroke-width="2.5"/>'+
'<text x="'+cx+'" y="'+(centerY-1).toFixed(1)+'" text-anchor="middle" font-size="20" font-weight="800" fill="#fff">HACT</text>'+
'<text x="'+cx+'" y="'+(centerY+16).toFixed(1)+'" text-anchor="middle" font-size="10" fill="#9db6cc">13 · 57</text></g>');
$("#mm-svg").innerHTML='<svg viewBox="0 0 '+W+' '+Math.ceil(H)+'" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="HACT framework mind map">'+connectors.join("")+nodes.join("")+'</svg>';
$("#mm-svg").addEventListener("click",function(e){
var g=e.target.closest("[data-tech],[data-tactic]");if(!g)return;
if(g.getAttribute("data-tech"))openTechnique(g.getAttribute("data-tech"));
else if(g.getAttribute("data-tactic"))openTactic(g.getAttribute("data-tactic"));
});
$("#mm-svg").querySelectorAll("[data-tech],[data-tactic]").forEach(function(g){g.style.cursor="pointer";});
var lg=$("#mm-legend");
TACTICS.forEach(function(t,ti){
var d=document.createElement("div");d.className="lg";
d.innerHTML='<span class="sw" style="background:'+tacticColor(ti)+'"></span><b>'+esc(t.id)+'</b> <span>'+esc(t.name)+'</span>';
d.onclick=function(){openTactic(t.id);};lg.appendChild(d);
});
})();
</script>
<script src="lang.js"></script>
</body>
</html>