Video failed to load

[Security Tool Vol. 1] Kscan — High-Performance Golang Security Scanner

653 words
3 minutes
[Security Tool Vol. 1] Kscan — High-Performance Golang Security Scanner
  1. 1[Security Tool Vol. 2] testssl — Comprehensive SSL/TLS Security Testing
  2. 2[Security Tool Vol. 1] Kscan — High-Performance Golang Security ScannerThis article
[Security Tool Vol. 1] Kscan — High-Performance Golang Security Scanner

Translation Notice

This article was originally written in Chinese and translated into English with the assistance of AI. The translation has been reviewed and edited for clarity, accuracy, and readability. Please refer to the original source where necessary, especially for technical terms, commands, configuration details, and proper nouns.

Introduction#

This security-tools series selects useful, approachable open-source tools and provides quick practical guides. Use this tool only with explicit authorization or in a lab environment. Unauthorized security testing may violate the law; use it at your own risk.


TL;DR#

Kscan is a lightweight security scanner written in Go. It supports port scanning, fingerprinting, automated brute force, and subnet discovery, with CSV/JSON output. It is suitable for rapid asset discovery and weak-password auditing (authorized scenarios only).

About Kscan#

Kscan is a Golang scanner focused on high concurrency and lightweight operation. Common uses include asset discovery, HTTP fingerprinting, external-service liveness checks, and automated password testing based on hydra. Results can be exported as CSV/JSON for delivery or further processing.

lcvvvv
/
kscan
Kscan是一款纯go开发的全方位扫描器,具备端口扫描、协议检测、指纹识别,暴力破解等功能。支持协议1200+,协议指纹10000+,应用指纹20000+,暴力破解协议10余种。
—
—
GPL-3.0
Go

Feature Overview#

  • Port scanning (single port / range / Top N)
  • Fingerprinting (HTTP banner / service fingerprint)
  • Live-subnet discovery (--spy)
  • Automated brute force (hydra integration, multiple protocols)
  • CSV / JSON output

Use Cases#

  • Rapid security-asset mapping
  • Fingerprint classification for external services (web, databases, common protocols)
  • Weak-password testing and auditing within an authorized scope

Quick Installation (Example)#

Assumes that Go is already installed.

Terminal window
git clone https://github.com/lcvvvv/kscan.git
cd kscan
go build -o kscan ./cmd/kscan
# Or use the release binary provided by the author.

Command Reference#

Common options and brief explanations are listed below:

usage: kscan [-h,--help,--fofa-syntax] (-t,--target,-f,--fofa,--spy) [options]
Common options:
-t, --target target: single IP, range, URL, or file (file:/path)
-f, --fofa obtain targets from FOFA (requires FOFA_EMAIL and FOFA_KEY)
--spy subnet-discovery mode (automatically discover internal subnets)
-p, --port port or port range, default Top400
-o, --output save results to a file (CSV supported)
-oJ save results as JSON
--proxy use a proxy (socks5|socks4|http|https)://IP:Port
--threads thread count, default 100, maximum 2048
--timeout timeout in seconds
--hydra enable automated brute force (with --hydra-user/--hydra-pass)
-Pn skip smart liveness detection (slower but more exhaustive)
-sV full-probe open ports (may affect performance; use carefully)

hydra options:

--hydra-user username (supports file:username.txt)
--hydra-pass password (supports file:password.txt)
--hydra-update append a custom wordlist to the default list
--hydra-mod limit the brute-force module, e.g. rdp, ssh, ftp

Asset mapping (all ports, save results as CSV):

Terminal window
kscan -t targets.txt -p 1-65535 -o output.csv

Credential testing (use a custom wordlist and append it to the default list):

Terminal window
kscan -t targets.txt -p 1-65535 --hydra --hydra-user file:user.txt --hydra-pass file:pass.txt --hydra-update -o output.csv

Subnet reachability discovery (automatically probe standard Class A/B/C private ranges):

Terminal window
kscan --spy all -o output.csv

Fast high-concurrency discovery:

Terminal window
kscan -t 198.51.100.0/24 -p 80,443 --threads 500 -oJ output.json

Usage Recommendations and Performance Tuning#

  • Concurrency and resources: high concurrency (--threads) greatly improves speed but consumes more bandwidth and target/local resources. Increase it gradually while monitoring CPU and network; use the maximum carefully.
  • Timeouts: increase --timeout for unstable networks to avoid misclassifying live hosts.
  • Avoid false positives: test --check against a small number of targets first, observe responses, then run it in bulk.
  • Brute-force strategy: test weak passwords only within an authorized scope. Control the rate and limit the module with --hydra-mod to avoid alerts or account lockouts.
  • Result processing: export JSON and combine it with tools such as ELK or Pandas for aggregation and visualization.

Frequently Asked Questions (FAQ)#

Q: How do I scan only common ports? A: Use --top, for example --top 100 to scan the top 100 common ports.

Q: How do I disable CDN detection? A: Add -Dn (disabling it may affect the efficiency of large-scale scans).

Q: How can I improve web-fingerprint accuracy? A: Use -sV for full probing. It significantly slows scanning, so use it for in-depth confirmation.


Risk and Compliance Reminder#

Use Kscan’s port-scanning and brute-force features only with explicit authorization. Scanning or attacking unauthorized targets may be illegal. This site accepts no responsibility for unlawful use.


Conclusion#

Kscan is a lightweight and efficient asset-discovery tool for rapid mapping and weak-password auditing in authorized environments. With suitable wordlists, rate limits, and post-processing tools (CSV/JSON), it can produce a deliverable asset inventory and alert list quickly.

Support & Share

If this article helped you, please share or support!

Sponsor
[Security Tool Vol. 1] Kscan — High-Performance Golang Security Scanner
https://blog.bytesycn.cn/posts/738bfb49-cd11-4fce-8e9b-aace18dec657/
Author
Ryan Zhang
Published at
2025-10-14

Comments

Profile Image of the Author
Ryan Zhang
Keep building, keep thinking, keep creating.
Announcement
Welcome to my blog!
Categories
Tags
Latest Moments
Site Statistics
Posts
30
Categories
7
Tags
42
Total Words
117,260
Running Days
0 days
Last Activity
0 days ago
Table of Contents