Add detection patterns for latest actively exploited vulnerabilities: - CVE-2025-55182 (React2Shell, CVSS 10.0) - CVE-2025-8110 (Gogs RCE), CVE-2025-53770 (SharePoint) - CVE-2025-52691 (SmarterMail), CVE-2025-40551 (SolarWinds) - CVE-2024-47575 (FortiManager), CVE-2024-21887 (Ivanti) - CVE-2024-3400, CVE-2024-0012, CVE-2024-9474 (PAN-OS) New attack categories based on OWASP Top 10 2025: - HTTP Request Smuggling (TE.CL/CL.TE conflicts) - AI/LLM Prompt Injection (ChatML, instruction markers) - WAF Bypass techniques (Unicode normalization, double encoding) - Supply Chain attacks (CI/CD poisoning, dependency confusion) - Extended SSTI (Jinja2, Freemarker, Velocity, Thymeleaf) - API Abuse (BOLA/IDOR, mass assignment) CrowdSec scenarios split into 11 separate files for reliability. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
113 lines
3.2 KiB
JavaScript
113 lines
3.2 KiB
JavaScript
'use strict';
|
|
'require view';
|
|
'require dom';
|
|
'require ui';
|
|
'require device-intel/api as api';
|
|
'require secubox/kiss-theme';
|
|
|
|
return view.extend({
|
|
load: function() {
|
|
return Promise.all([
|
|
api.getMeshDevices(),
|
|
api.getSummary()
|
|
]);
|
|
},
|
|
|
|
render: function(data) {
|
|
var meshResult = data[0] || {};
|
|
var summary = data[1] || {};
|
|
var meshDevices = meshResult.devices || [];
|
|
|
|
var cssLink = E('link', {
|
|
rel: 'stylesheet',
|
|
href: L.resource('device-intel/common.css')
|
|
});
|
|
|
|
// Separate mesh peers from remote devices
|
|
var peers = meshDevices.filter(function(d) { return d.device_type === 'mesh_peer'; });
|
|
var remoteDevices = meshDevices.filter(function(d) { return d.device_type !== 'mesh_peer'; });
|
|
|
|
// ── Peer Cards ──
|
|
var peerCards;
|
|
if (peers.length > 0) {
|
|
peerCards = E('div', { 'class': 'di-stats' },
|
|
peers.map(function(p) {
|
|
return E('div', { 'class': 'di-stat-card' }, [
|
|
E('div', { 'style': 'display:flex; align-items:center; gap:0.5em; margin-bottom:0.5em;' }, [
|
|
E('span', {
|
|
'class': 'di-online-dot ' + (p.online ? 'online' : 'offline')
|
|
}),
|
|
E('strong', {}, p.hostname || p.mac)
|
|
]),
|
|
E('div', { 'style': 'font-size:0.85em; color:#6c757d;' }, p.ip || '-')
|
|
]);
|
|
})
|
|
);
|
|
} else {
|
|
peerCards = E('div', {
|
|
'style': 'text-align:center; padding:2em; color:#6c757d;'
|
|
}, [
|
|
E('p', {}, _('No mesh peers discovered.')),
|
|
E('p', { 'style': 'font-size:0.9em;' },
|
|
_('Ensure SecuBox P2P is running and peers are configured.'))
|
|
]);
|
|
}
|
|
|
|
// ── Remote Devices Table ──
|
|
var remoteTable;
|
|
if (remoteDevices.length > 0) {
|
|
var rows = remoteDevices.map(function(d) {
|
|
return E('tr', {}, [
|
|
E('td', {}, [
|
|
E('span', { 'class': 'di-online-dot ' + (d.online ? 'online' : 'offline') }),
|
|
d.label || d.hostname || d.mac
|
|
]),
|
|
E('td', {}, d.ip || '-'),
|
|
E('td', {}, d.device_type || '-'),
|
|
E('td', {}, d.source_node || '-')
|
|
]);
|
|
});
|
|
|
|
remoteTable = E('table', { 'class': 'di-device-table' }, [
|
|
E('thead', {}, E('tr', {}, [
|
|
E('th', {}, _('Device')),
|
|
E('th', {}, _('IP')),
|
|
E('th', {}, _('Type')),
|
|
E('th', {}, _('Source Node'))
|
|
])),
|
|
E('tbody', {}, rows)
|
|
]);
|
|
} else {
|
|
remoteTable = E('p', { 'style': 'color:#6c757d; font-style:italic;' },
|
|
_('No remote devices available. Peer device inventory sharing is not yet active.'));
|
|
}
|
|
|
|
var content = E('div', {}, [
|
|
cssLink,
|
|
E('h2', {}, _('Mesh Network')),
|
|
|
|
E('div', { 'class': 'cbi-section' }, [
|
|
E('div', { 'style': 'display:flex; justify-content:space-between; align-items:center;' }, [
|
|
E('h3', { 'style': 'margin:0;' }, _('Peers')),
|
|
E('span', { 'style': 'color:#6c757d;' },
|
|
String(peers.length) + _(' peer(s) discovered'))
|
|
]),
|
|
peerCards
|
|
]),
|
|
|
|
E('div', { 'class': 'cbi-section' }, [
|
|
E('h3', {}, _('Remote Devices')),
|
|
E('p', { 'style': 'color:#6c757d; margin-bottom:1em; font-size:0.9em;' },
|
|
_('Devices reported by mesh peers. Requires device-intel on remote nodes.')),
|
|
remoteTable
|
|
])
|
|
]);
|
|
|
|
return KissTheme.wrap(content, 'admin/secubox/services/device-intel/mesh');
|
|
},
|
|
|
|
handleSaveApply: null,
|
|
handleSave: null,
|
|
handleReset: null
|
|
});
|