You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NetScan is a network scanning and auditing toolkit built around Nmap. It includes a portable Windows tool with an alternative GUI frontend based on Zenity — deploying Nmap with all its dependencies silently and unattended, and running different scan levels while generating HTML reports —, an equivalent on-demand scan-and-report script for Linux, and NetWatch, a live web dashboard for continuous LAN device and port auditing on Linux.
NetScan es un conjunto de herramientas de escaneo y auditoría de red construido alrededor de Nmap. Incluye una herramienta portable para Windows con un frontend GUI alternativo basado en Zenity — que despliega Nmap con todas sus dependencias de forma silenciosa y desatendida, y ejecuta distintos niveles de escaneo generando reportes en HTML —, un script equivalente de escaneo y reporte bajo demanda para Linux, y NetWatch, un panel web en tiempo real para auditoría continua de dispositivos LAN y puertos en Linux.
Repository Structure
netscan/
├── img/ # Screenshots used throughout this README
│ └── netscan-*.png
├── linux/
│ └── netreport.sh # LINUX — on-demand scan-and-report tool
├── netwatch/ # WEB — live web dashboard
│ ├── netwatchinstall.sh # Installer: --install|--update|--uninstall|--status
│ ├── tools/ # Background daemons for LAN/port scanning
│ │ ├── netwatchlan.sh # LAN discovery daemon (arp-scan)
│ │ └── netwatchports.sh # Port auditing daemon (ss / nmap) + mode CLI
│ └── web/ # Web dashboard front-end (LAN/Ports tabs)
│ ├── index.php # Main page (LAN / Ports tabs)
│ ├── lan.html # LAN devices viewer
│ ├── netwatch.conf # Apache vhost -> /etc/apache2/sites-available/netwatch.conf (:3126/?tab=lan and :3126/?tab=ports)
│ ├── netwatchapi.php # JSON API (devices, ports, mode switch)
│ └── ports.html # Ports viewer + Server/Target mode selector
└── win/ # Windows package metadata (netscan.exe itself is hosted on mega.nz, not in this repo)
├── changelog.txt # Version history
└── netscan.exe.sha256 # Checksum for netscan.exe
Disable your Antivirus, Antimalware, SmartScreen or any other security solution in your Operating System, close all windows and check the date and time of your PC is correct. Unzip netscan.exe (.zip) to your desktop, execute it with double click (accept privileged execution) and follow the instructions on the screen.
Desactive su Antivirus, Antimalware, SmartScreen o cualquier otra solución de seguridad en su Sistema Operativo, cierre todas las ventanas y verifique la fecha y hora de su PC sea la correcta. Descomprima netscan.exe (.zip) en el escritorio, ejecutarlo con doble clic (acepte la ejecución con privilegios) y siga las instrucciones en pantalla.
Note: This is requested because this project uses batch scripts packaged into a .exe, and antivirus software may flag this as a false positive. If in doubt, you can unzip the .exe and audit the scripts, run the packages manually, or choose not to use this project.
Nota: Esto se solicita porque este proyecto usa scripts batch empaquetados en un .exe, y los antivirus pueden detectarlo como falso positivo. Si tiene dudas, puede descomprimir el .exe y auditar los scripts, ejecutar los paquetes manualmente, o no usar este proyecto.
⚠️ WARNING
Before continuing: If you have Nmap or Npcap already installed on your PC, it is recommended to uninstall them before using this tool to avoid version conflicts.
Antes de continuar: Si tiene Nmap o Npcap instalado en su PC, se recomienda desinstalarlo antes de usar esta herramienta para evitar conflictos de versiones.
Start
Upon startup, it will prompt you to connect to your data network before continuing. Press OK to continue or Cancel to abort.
Al iniciar, le pedirá que se conecte a su red de datos antes de continuar. Presione OK para continuar o Cancel para abortar.
Scan Selector
Select the scan mode. Press OK to continue or Cancel to abort.
Seleccione el modo de escaneo. Presione OK para continuar o Cancel para abortar.
Comprehensive single-host audit with OS detection, vulnerability scanning, and detailed service enumeration
Auditoría completa de un host con detección de OS, escaneo de vulnerabilidades y enumeración detallada de servicios
Installation Messages
Message
Description
Descripción
Extracting NetScan content during execution.
Extrayendo contenido de NetScan durante la ejecución.
Installing MS Visual C++ Runtimes.
Instalando MS Visual C++ Runtimes
Scan Messages
Message
Description
Descripción
Option 3: Scanning for a specific IPv4. Ranges are not accepted.
Opción 3: Escaneo de IPv4 específica. No acepta rangos.
Invalid IPv4 address entered.
Introdujo una dirección IPv4 inválida.
Scanning IP address or network.
Escaneando dirección IP o red.
Intense scanning.
Escaneo intenso.
Scan completed successfully.
El escaneo finalizó exitosamente.
Error Messages
Message
Description
Descripción
You pressed the "Cancel" button or an error occurred during installation.
Presionó el botón "Cancelar" u ocurrió un error durante la instalación.
An error occurred during dependency installation.
Ocurrió un error durante la instalación de las dependencias.
No internet connectivity detected.
No se detectó conectividad a internet.
You are using the installer on an incompatible operating system.
Está usando el instalador en un sistema operativo incompatible.
Npcap
NetScan requires Npcap, included in its free version. This dependency is not installed automatically, as it is not an OEM version and does not support silent installation (/S option). You will need to manually complete the Npcap installation when prompted by the installer. Npcap's free version allows use on up to 5 machines. For more information, see Npcap OEM.
NetScan requiere Npcap, incluido en su versión gratuita. La instalación de esta dependencia no es desatendida, ya que al no ser una versión OEM, no acepta instalación silenciosa (opción /S). Deberá completar manualmente la instalación de Npcap cuando el instalador la solicite. La versión gratuita de Npcap permite su uso en hasta 5 equipos. Para más información, consulte Npcap OEM.
Report
NetScan will save the scan reports to the Desktop\Report folder, depending on the scan type, and each file will include a timestamp (date and time the scan was executed).
NetScan guardará los reportes de escaneo en la carpeta Desktop\Report, según el tipo de escaneo, y cada archivo incluirá un timestamp (fecha y hora en que se ejecutó el escaneo).
Telemetry
NetScan sends information to the developer, only for the purpose of verifying that the installation has been completed successfully. This information is used exclusively for statistical purposes and to improve the installer, without collecting personal data or compromising user privacy. Example:
NetScan envía información al desarrollador, únicamente con el propósito de verificar que la instalación se haya completado de manera exitosa. Esta información se utiliza exclusivamente para fines estadísticos y de mejora del instalador, sin recopilar datos personales ni comprometer la privacidad del usuario. Ejemplo:
NetScan can run on Linux with the same scan modes:
1. LAN Scan
2. Advanced LAN Scan
3. IP/Host Scan
NetScan will save scan reports in the /home/$USER/Report folder,
according to the scan type. Each file will include a timestamp
(date and time when the scan was executed).
NetScan puede ejecutarse en Linux con los mismos modos de escaneo:
1. LAN Scan
2. Advanced LAN Scan
3. IP/Host Scan
NetScan guardará los reportes de escaneo en la carpeta /home/$USER/Report,
según el tipo de escaneo. Cada archivo incluirá un timestamp
(fecha y hora en que se ejecutó el escaneo).
Requirements
⚠️ WARNING: Only tested on Ubuntu 24.04 LTS. Other versions or distros not tested, use at your own risk.
NetWatch is a live web dashboard for LAN and port auditing on Linux, independent of the on-demand Windows/Linux scan-and-report tools described above. It runs two background daemons — one discovering LAN devices via periodic arp-scan, another auditing TCP and UDP ports in one of two mutually exclusive modes: Server (default — reads the server's own listening sockets live, no probing) or Target (a chosen external host, scanned in near real time with nmap). Only one ports mode runs at a time, by design, to keep the audit trail free of mixed-source noise. Everything is exposed through a two-tab web interface reachable from localhost: LAN (device inventory with online/offline status) and Ports (server or target ports with open/closed status). History is kept in a local SQLite database.
NetWatch es un panel web en tiempo real para auditoría de LAN y puertos en Linux, independiente de las herramientas de escaneo bajo demanda de Windows/Linux descritas arriba. Ejecuta dos demonios en segundo plano — uno que descubre dispositivos en la LAN vía arp-scan periódico, otro que audita puertos TCP y UDP en uno de dos modos mutuamente excluyentes: Server (por defecto — lee en vivo los sockets en escucha del propio servidor, sin sondear) o Target (un host externo elegido, escaneado casi en tiempo real con nmap). Solo un modo de puertos corre a la vez, a propósito, para mantener el rastro de auditoría libre de ruido de fuentes mezcladas. Todo se expone mediante una interfaz web de dos pestañas accesible desde localhost: LAN (inventario de dispositivos con estado online/offline) y Ports (puertos del servidor o de un target con estado abierto/cerrado). El histórico se guarda en una base de datos SQLite local.
Runtime Files
Files and directories generated at runtime (not included in the repository — see the top-level Repository Structure for the static tree):
Archivos y directorios generados en runtime (no incluidos en el repositorio):
/etc/netwatch/ # Read-only config (750 root:www-data), same model as proxymon's /etc/proxymon
└── netwatch.env # Install config: interfaces, network, server IP, poll intervals
# (640 root:www-data — web reads, never writes)
/var/www/netwatch/data/ # Web-writable state (775 www-data:www-data)
├── netwatch.db # SQLite database (WAL mode)
└── ports_mode.conf # Active ports mode + target IP
# (664 www-data:www-data — web rewrites in place)
/run/ # PID files, used by start/stop/status
├── netwatchlan.pid # netwatchlan.sh
└── netwatchports.pid # netwatchports.sh
/var/log/netwatch.log # Shared by both daemons
/etc/logrotate.d/netwatch # Weekly rotation for the shared log
/var/www/netwatch/backups/ # .bak of web files and tools, one per --update
/etc/bak/crontab/root.bak # Copy of root's crontab, taken before any cron entry is added or removed
netwatchinstall.sh copies root's crontab to /etc/bak/crontab/root.bak before adding or removing any cron entry. It is a single copy, overwritten on every run, shared with every other project that touches the same crontab, and it is never restored automatically. --uninstall does not restore it either: it deletes only its own entries, matched by the full script path, and leaves every other cron job untouched. To roll back, restore the copy by hand with crontab /etc/bak/crontab/root.bak.
netwatchinstall.sh copia el crontab de root en /etc/bak/crontab/root.bak antes de agregar o quitar cualquier entrada de cron. Es una sola copia, sobrescrita en cada ejecución, compartida con cualquier otro proyecto que toque el mismo crontab, y nunca se restaura de forma automática. --uninstall tampoco la restaura: borra únicamente sus propias entradas, identificadas por la ruta completa del script, y deja intactas las demás tareas de cron. Para deshacer un cambio, restaura la copia a mano con crontab /etc/bak/crontab/root.bak.
Requirements
⚠️ WARNING: Only tested on Ubuntu 24.04 LTS. Other versions or distros not tested, use at your own risk.
Apache2 with mod_php (not PHP-FPM — the vhost uses SetHandler application/x-httpd-php)
Optional — avahi-utils (mDNS) and nbtscan (NetBIOS) improve the LAN tab's Hostname column for devices without a reverse-DNS record (most consumer/IoT devices on a home LAN). Neither is required — netwatchlan.sh falls back gracefully to DNS-only resolution if they're not installed.
Opcional — avahi-utils (mDNS) y nbtscan (NetBIOS) mejoran la columna Hostname de la pestaña LAN para dispositivos sin registro DNS reverso (la mayoría de equipos de consumo/IoT en una LAN hogareña). Ninguno es obligatorio — netwatchlan.sh degrada con gracia a resolución solo por DNS si no están instalados.
git clone --depth=1 https://github.com/maravento/vault.git
cd vault/netscan/netwatch
sudo bash netwatchinstall.sh --install
# or
wget -qO gitfolder.py https://raw.githubusercontent.com/maravento/vault/master/scripts/python/gitfolder.py
chmod +x gitfolder.py
python3 gitfolder.py https://github.com/maravento/vault/netscan
cd netscan/netwatch
sudo bash netwatchinstall.sh --install
The installer lists all physical network interfaces with a global IPv4 address (virtual/loopback interfaces are hidden — see below) and prompts twice: first for one or more scan interfaces (comma-separated numbers, e.g. 1,2 — useful on a server with both a LAN and a WAN NIC, since netwatchlan.sh arp-scans every one of them each cycle), then for a single management interface, which is the one the web panel's IP allowlist trusts for access — keep this on your LAN/admin interface, never on WAN. It then deploys the web dashboard and both daemons and starts them automatically — unlike an optional watchdog, these daemons are the dashboard's core, so they run right after install.
El instalador lista todas las interfaces de red físicas con una dirección IPv4 global (las interfaces virtuales/loopback quedan ocultas — ver abajo) y pregunta dos veces: primero por una o más interfaces a escanear (números separados por coma, ej. 1,2 — útil en un servidor con NIC de LAN y de WAN, ya que netwatchlan.sh hace arp-scan de cada una en cada ciclo), luego por una única interfaz de gestión, que es la que la lista blanca de IPs del panel web confía para el acceso — mantenla en tu interfaz LAN/admin, nunca en la WAN. Luego despliega el panel web y ambos demonios y los inicia automáticamente — a diferencia de un watchdog opcional, estos demonios son el núcleo del panel, por lo que se ejecutan justo después de instalar.
Interfaces matching lo, docker*, br-*, veth*, virbr*, tun*, tap* or wg* are excluded from both selectors — they're never useful arp-scan targets and would only clutter the interface list on a server running Docker/libvirt/VPN.
Las interfaces que coinciden con lo, docker*, br-*, veth*, virbr*, tun*, tap* o wg* quedan excluidas de ambos selectores — nunca son objetivos útiles para arp-scan y solo saturarían la lista de interfaces en un servidor con Docker/libvirt/VPN.
Update & Uninstall
cd vault/netscan/netwatch
sudo bash netwatchinstall.sh --update
# or | o
sudo bash netwatchinstall.sh --uninstall
Shows: daemon status (running/stopped), Apache port 3126, last 10 lines of the shared log, active ports mode/target, and device/port counts from the database.
LAN Field Reference
What Vendor/Hostname show when a value couldn't be resolved — both come straight from arp-scan's MAC OUI lookup and the DNS → mDNS → NetBIOS chain, not from netwatch itself:
Lo que muestran Vendor/Hostname cuando no se pudo resolver un valor — ambos vienen directo del lookup OUI de MAC de arp-scan y de la cadena DNS → mDNS → NetBIOS, no de netwatch en sí:
Value
Meaning
(Unknown)
The MAC has a real, manufacturer-assigned OUI, but it isn't in arp-scan's vendor database (ieee-oui.txt).
(Unknown: locally administered)
The MAC's "locally administered" bit is set — it was never assigned by a manufacturer at all (common with Wi-Fi privacy MAC randomization, VMs, containers). There's no vendor to look up.
- (Hostname)
Reverse DNS, mDNS, and NetBIOS (the ones installed) all failed to resolve a name for that IP.
Ports Modes
The Ports tab audits TCP and UDP ports in one of two modes, switchable from the browser (mode selector + Apply) or from the command line. Only one mode is active at a time — switching does not delete the other mode's history, it just stops polling it.
La pestaña Ports audita puertos TCP y UDP en uno de dos modos, intercambiables desde el navegador (selector de modo + Apply) o desde la línea de comandos. Solo un modo está activo a la vez — cambiar de modo no borra el histórico del otro, solo deja de sondearlo.
Mode
Default
What it does
Poll method
Server
✅ yes
Watches this server's own listening TCP and UDP ports
ss -tulnp (reads the kernel's socket table directly — not a scan, always accurate, includes the owning process)
Target
no
Watches a single external host you choose
nmap -Pn -sT -sU -F --host-timeout 60s (top ~100 common TCP + UDP ports, skips host-discovery so a target dropping ICMP still gets scanned) every poll cycle
Switching Modes
sudo /var/www/netwatch/tools/netwatchports.sh mode server
sudo /var/www/netwatch/tools/netwatchports.sh mode target 192.168.1.10
sudo /var/www/netwatch/tools/netwatchports.sh list
Clicking Apply (or running mode target) only writes the new mode/target to ports_mode.conf — it does not scan on the spot. netwatchports.sh is already running as a background loop and only picks up the change on its next cycle (PORT_POLL_INTERVAL, 30s by default), so the table can read empty for up to that long right after switching. What you see refreshing in the browser (Refresh: 15s selector) is a second, independent poll of whatever is already in the database — not the scan itself.
Al hacer clic en Apply (o correr mode target) solo se escribe el nuevo modo/target en ports_mode.conf — no escanea al instante. netwatchports.sh ya está corriendo en background y recién toma el cambio en su siguiente ciclo (PORT_POLL_INTERVAL, 30s por defecto), así que la tabla puede verse vacía hasta ese tiempo justo después de cambiar. Lo que se actualiza en el navegador (selector Refresh: 15s) es un segundo sondeo independiente de lo que ya hay en la base de datos — no el escaneo en sí.
End-to-end timing (Target mode): up to PORT_POLL_INTERVAL (30s default) for the daemon to pick up the new target, plus the nmap scan itself (seconds against a responsive host; the UDP half in particular can take much longer against one that silently drops probes — capped at 60s via --host-timeout, so one cycle can't stall the next), plus up to the browser's refresh interval to display it. Close to two minutes end-to-end isn't unusual against a heavily filtered target.
Tiempo de punta a punta (modo Target): hasta PORT_POLL_INTERVAL (30s por defecto) para que el daemon tome el nuevo target, más el escaneo nmap en sí (segundos contra un host que responde; la mitad UDP en particular puede tardar mucho más contra uno que descarta los probes en silencio — acotado a 60s vía --host-timeout, así que un ciclo no puede estancar al siguiente), más hasta el intervalo de refresco del navegador para mostrarlo. No es raro que sean casi dos minutos de punta a punta contra un target muy filtrado.
ICMP is not required (Target mode). The scan runs with -Pn (skips host-discovery/ping), so the target's firewall does not need to allow ICMP echo for its ports to be detected — the TCP/UDP probes go out directly either way.
No hace falta ICMP (modo Target). El escaneo corre con -Pn (se salta el descubrimiento por ping), así que el firewall del target no necesita permitir ICMP echo para que se detecten sus puertos — los probes TCP/UDP salen directo de todos modos.
Empty-table message
When it shows
Scanning ports. Wait...
Right after clicking Apply, until the first row for the new mode/target arrives.
No ports observed yet in this mode
Table is empty and no mode/target was just applied (e.g. reloading the page on a mode that hasn't been polled yet).
No ports match the current filters
There is data, but the search box or Status/Protocol filters exclude every row.
Ports Displayed
Open ports, plus recently closed:listPorts returns currently open ports plus closed ones from the last 6h — the same window netwatchports.sh uses to purge old closed rows (PURGE_CLOSED_AFTER_HOURS), so the Closed filter in the UI always matches what's actually still in port_scan_state, never an empty or stale result. Without this bound, Server mode's polling can accumulate thousands of one-shot ephemeral ports per day (mDNS/SSDP discovery, browser helper processes, even this project's own nbtscan calls), which is what made the Ports tab take several seconds just to build the table. Anything older stays out of this view but remains queryable in port_events.
Puertos abiertos, más cerrados recientes:listPorts devuelve puertos actualmente abiertos más los cerrados de las últimas 6h — la misma ventana que usa netwatchports.sh para purgar filas cerradas viejas (PURGE_CLOSED_AFTER_HOURS), así el filtro Closed de la interfaz siempre coincide con lo que realmente sigue en port_scan_state, nunca vacío ni desincronizado. Sin este límite, el sondeo del modo Server puede acumular miles de puertos efímeros de un solo uso por día (descubrimiento mDNS/SSDP, procesos auxiliares del navegador, incluso llamadas a nbtscan del propio proyecto), que fue justo lo que hacía que la pestaña Ports tardara varios segundos en construir la tabla. Lo más viejo queda fuera de esta vista pero sigue disponible consultando port_events.
Target Mode Authorization
Target mode is an active port scan. Only point it at hosts you own or are explicitly authorized to audit — the same authorization requirement that applies to the Nmap-based Windows/Linux tools described above.
El modo Target es un escaneo de puertos activo. Apúntalo únicamente a hosts que te pertenezcan o que estés explícitamente autorizado a auditar — el mismo requisito de autorización que aplica a las herramientas basadas en Nmap de Windows/Linux descritas arriba.
⚠️ WARNING: Network Access
NetWatch is designed to run locally and be accessed over a LAN. It is not recommended to expose it to the internet, as it lacks the hardening required for public-facing deployments. If you choose to publish it despite this warning, do so through an on-demand tunnel rather than opening ports directly.
NetWatch está diseñado para ejecutarse localmente y ser accedido en red LAN. No se recomienda exponerlo a internet, ya que no cuenta con el endurecimiento necesario para despliegues públicos. Si decide publicarlo a pesar de esta advertencia, hágalo a través de un túnel bajo demanda en lugar de abrir puertos directamente.
CSRF protection: the Ports tab's mode-switch form has no login by design — guest access for the whole LAN is intentional. What it does have is a per-session CSRF token on the state-changing POST, so a request is only accepted if it was actually loaded from the page first.
Protección CSRF: el formulario de cambio de modo de la pestaña Ports no tiene login por diseño — el acceso de invitado para toda la LAN es intencional. Lo que sí tiene es un token CSRF por sesión en el POST que modifica estado, de modo que una solicitud solo se acepta si realmente se cargó la página antes.
Does not accept Pull Requests. Changes must be proposed via Issues.
Este repositorio
Puede incluir componentes de terceros.
No acepta Pull Requests. Los cambios deben proponerse mediante Issues.
DISCLAIMER
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.