Application of a Simple Port Scanner for Security Detection in Small Local Area Networks
Application of a Simple Port Scanner for Security Detection in Small Local Area Networks
Ruiyang Liu
Abstract
Small Local Area Networks (LANs), such as those in educational institutions, small businesses, and branch offices, often lack dedicated security teams and enterprise-grade monitoring tools, making them vulnerable to service exposure and configuration-based attacks. To address this gap, this study designs and implements a lightweight, Python-based port scanning tool tailored for security assessment in resource-constrained environments. The tool employs optimized SYN-style connect scanning to efficiently detect open TCP ports within the wellknown range (1−1024), with a 2-second timeout to balance accuracy and performance. Deployed in a campus network testbed, the scanner successfully identified five high-risk service exposures, including cleartext protocols (FTP on port 21, Telnet on port 23), unsecured web services (HTTP on port 80), and improperly exposed database services (MySQL on port 3306). Based on these findings, targeted security hardening measures-such as protocol migration to encrypted alternatives, service minimization, configuration hardening, and firewall-based access control-were implemented, reducing the number of high-risk ports from five to one. The results demonstrate that systematic port scanning, when integrated into routine network hygiene, serves as an effective first-line defense for exposure mapping and attack surface reduction. This lightweight scanner features easy deployment, low resource consumption and ease of use, making it particularly valuable for small networks without advanced security infrastructure. We recommend regular scans (for example, weekly or biweekly) combined with active configuration management to enhance overall network resilience.
