mirror of
https://github.com/smittix/intercept.git
synced 2026-07-25 09:18:10 -07:00
Fix hidden SSID, probe analysis, and device correlation
Hidden SSID fixes: - Only track networks that are originally hidden (empty/Hidden ESSID) - Reveal hidden SSIDs when network ESSID changes or client probes match - Show count of hidden networks being monitored - Show revealed SSIDs with checkmark Probe analysis fixes: - Call scheduleProbeAnalysisUpdate when client has probes - Add periodic updateProbeAnalysis call every 2 seconds - Properly trigger probe analysis from client handler Other fixes: - Remove drawNetworkGraph call (topology panel was removed) - Add updateHiddenSsidDisplay to periodic updates - Improve panel messages when no data available Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
+47
-7
@@ -4366,17 +4366,29 @@
|
|||||||
if (!list) return;
|
if (!list) return;
|
||||||
|
|
||||||
const entries = Object.entries(revealedSsids);
|
const entries = Object.entries(revealedSsids);
|
||||||
|
const hiddenCount = Object.keys(hiddenNetworks).length;
|
||||||
|
|
||||||
if (entries.length === 0) {
|
if (entries.length === 0) {
|
||||||
list.innerHTML = '<div style="color: var(--text-dim);">No hidden SSIDs revealed yet</div>';
|
if (hiddenCount > 0) {
|
||||||
|
list.innerHTML = `<div style="color: var(--text-dim);">Monitoring ${hiddenCount} hidden network${hiddenCount > 1 ? 's' : ''}...</div>`;
|
||||||
|
} else {
|
||||||
|
list.innerHTML = '<div style="color: var(--text-dim);">No hidden networks detected</div>';
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
list.innerHTML = entries.map(([bssid, ssid]) => `
|
let html = entries.map(([bssid, ssid]) => `
|
||||||
<div style="padding: 4px 0; border-bottom: 1px solid var(--border-color);">
|
<div style="padding: 4px 0; border-bottom: 1px solid var(--border-color);">
|
||||||
<span class="hidden-ssid-revealed">"${ssid}"</span>
|
<span style="color: var(--accent-green);">✓ "${escapeHtml(ssid)}"</span>
|
||||||
<span style="color: var(--text-dim); font-size: 9px;"> (${bssid})</span>
|
<span style="color: var(--text-dim); font-size: 9px;"> (${bssid})</span>
|
||||||
</div>
|
</div>
|
||||||
`).join('');
|
`).join('');
|
||||||
|
|
||||||
|
if (hiddenCount > 0) {
|
||||||
|
html += `<div style="color: var(--text-dim); margin-top: 4px; font-size: 10px;">+ ${hiddenCount} hidden still monitoring</div>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
list.innerHTML = html;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Browser Notifications
|
// Browser Notifications
|
||||||
@@ -4417,9 +4429,10 @@
|
|||||||
// Update visualizations periodically
|
// Update visualizations periodically
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
if (currentMode === 'wifi') {
|
if (currentMode === 'wifi') {
|
||||||
drawNetworkGraph();
|
|
||||||
updateChannelRecommendation();
|
updateChannelRecommendation();
|
||||||
correlateDevices();
|
correlateDevices();
|
||||||
|
updateHiddenSsidDisplay();
|
||||||
|
updateProbeAnalysis();
|
||||||
}
|
}
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
|
||||||
@@ -4742,14 +4755,27 @@
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Track networks that were originally hidden
|
||||||
|
let hiddenNetworks = {}; // {bssid: true} for networks first seen with hidden ESSID
|
||||||
|
|
||||||
// Handle discovered WiFi network (called from batched update)
|
// Handle discovered WiFi network (called from batched update)
|
||||||
function handleWifiNetworkImmediate(net) {
|
function handleWifiNetworkImmediate(net) {
|
||||||
const isNew = !wifiNetworks[net.bssid];
|
const isNew = !wifiNetworks[net.bssid];
|
||||||
|
const previousNet = wifiNetworks[net.bssid];
|
||||||
wifiNetworks[net.bssid] = net;
|
wifiNetworks[net.bssid] = net;
|
||||||
|
|
||||||
// Check if this reveals a hidden SSID
|
// Track if this network was originally hidden
|
||||||
if (net.essid && net.essid !== 'Hidden' && net.essid !== '[Hidden]') {
|
if (isNew) {
|
||||||
|
const isHidden = !net.essid || net.essid === '' || net.essid === 'Hidden' || net.essid === '[Hidden]';
|
||||||
|
if (isHidden) {
|
||||||
|
hiddenNetworks[net.bssid] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if a previously hidden network now has a revealed SSID
|
||||||
|
if (hiddenNetworks[net.bssid] && net.essid && net.essid !== '' && net.essid !== 'Hidden' && net.essid !== '[Hidden]') {
|
||||||
revealHiddenSsid(net.bssid, net.essid);
|
revealHiddenSsid(net.bssid, net.essid);
|
||||||
|
delete hiddenNetworks[net.bssid]; // No longer hidden
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isNew) {
|
if (isNew) {
|
||||||
@@ -4803,6 +4829,16 @@
|
|||||||
checkWatchList(client.mac, 'Client');
|
checkWatchList(client.mac, 'Client');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If client is connected to a hidden network and has probes, try to reveal the SSID
|
||||||
|
if (client.bssid && hiddenNetworks[client.bssid] && client.probes) {
|
||||||
|
const probes = client.probes.split(',').map(p => p.trim()).filter(p => p);
|
||||||
|
if (probes.length > 0) {
|
||||||
|
// Use the first probe as the likely SSID for this hidden network
|
||||||
|
revealHiddenSsid(client.bssid, probes[0]);
|
||||||
|
delete hiddenNetworks[client.bssid];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Track in device intelligence with vendor info
|
// Track in device intelligence with vendor info
|
||||||
const vendorInfo = client.vendor && client.vendor !== 'Unknown' ? ` [${client.vendor}]` : '';
|
const vendorInfo = client.vendor && client.vendor !== 'Unknown' ? ` [${client.vendor}]` : '';
|
||||||
trackDevice({
|
trackDevice({
|
||||||
@@ -4812,7 +4848,11 @@
|
|||||||
bssid: client.bssid,
|
bssid: client.bssid,
|
||||||
vendor: client.vendor
|
vendor: client.vendor
|
||||||
});
|
});
|
||||||
// Note: Probe analysis updated separately if needed
|
|
||||||
|
// Update probe analysis when we get client data with probes
|
||||||
|
if (client.probes && client.probes.trim()) {
|
||||||
|
scheduleProbeAnalysisUpdate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Throttled probe analysis (called less frequently)
|
// Throttled probe analysis (called less frequently)
|
||||||
|
|||||||
Reference in New Issue
Block a user