ozaydin.dev

Open to long-term internships

Writing

A port scanner for my home network: async-vuln-scanner

I wrote an asyncio-based scanner that finds open ports, works out service versions and looks up known vulnerabilities.

async-vuln-scanner is a TCP port scanner written with asyncio. It connects to open ports, reads the service's banner, works out which product and version is running, and looks the result up in the NVD database. It turns the result into a report.

It was written to be used only on the owner's own network or on systems with permission to test. The tool enforces this too: it refuses to scan public addresses unless permission is explicitly confirmed. To try it out, the repo includes a Docker lab set up with deliberately old versions.

Splitting it into stages

I split the work into three stages. First comes the port scan, which is cheap, over all targets. Then service detection only on the ports that turned out open, and last, one NVD query for each distinct product and version. That way the slow, rate-limited part does as little work as possible.

Looking at the difference

A single scan matters less than the difference between two scans. So the diff command lists new devices, ports that opened or closed, and new CVEs. It suits a cron job that runs at night.

Related project · 101 Async Vuln Scanner A port scanner I wrote with asyncio. It finds the version of the service on each open port and looks up known vulnerabilities in NVD.