Skip to content

prashantkoirala465/Recona

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Recona

A terminal-based local network scanner and device profiler built in Go. Recona discovers live hosts on your subnet, scans common ports, infers device types, and presents everything in an interactive TUI dashboard.

Built for ethical hacking and local network reconnaissance.

 ____
|  _ \ ___  ___ ___  _ __   __ _
| |_) / _ \/ __/ _ \| '_ \ / _' |
|  _ <  __/ (_| (_) | | | | (_| |
|_| \_\___|\___\___/|_| |_|\__,_|

Features

  • Host Discovery — TCP probes on ports 22, 80, 443 to find alive hosts
  • Port Scanning — Scans 12 common ports (FTP, SSH, Telnet, SMTP, DNS, HTTP, POP3, NetBIOS, IMAP, HTTPS, SMB, RDP)
  • Device Profiling — Infers device types from open port combinations (Linux server, Windows workstation, router, mail server, etc.)
  • Interactive TUI — Two-pane dashboard with host list and detail panel, styled with lipgloss
  • Auto-Detection — Automatically detects your local subnet from network interfaces
  • Concurrent Scanning — Worker pool pattern with 100 discovery workers and 50 port scan workers
  • Pure Go — No external binaries or dependencies like nmap required
  • No Root Required — Runs entirely in userspace using TCP connection attempts

Installation

From Source

git clone https://github.com/prashantkoirala/recona.git
cd recona
go build -o recona ./cmd/recona/

Go Install

go install github.com/prashantkoirala/recona/cmd/recona@latest

Usage

# Auto-detect subnet and scan with defaults
recona

# Specify a subnet manually
recona -subnet 192.168.1.0/24

# Scan custom ports
recona -ports 22,80,443,8080,8443

# Both options together
recona -subnet 10.0.0.0/24 -ports 22,80,443

Keyboard Controls

Key Action
/ k Navigate up
/ j Navigate down
r Rescan the network
q / Ctrl+C Quit

Default Ports

Port Service
21 FTP
22 SSH
23 Telnet
25 SMTP
53 DNS
80 HTTP
110 POP3
139 NetBIOS
143 IMAP
443 HTTPS
445 SMB
3389 RDP

Device Profiling

Recona infers device types based on open port combinations:

Open Ports Inferred Type
SSH + Telnet + HTTP Router/Network Device
SMB + RDP Windows Workstation
SMTP + POP3/IMAP Mail Server
SSH + HTTP/HTTPS Linux/Unix Server
HTTP/HTTPS (no SSH) Web Server
SMB only Windows File Server
RDP only Windows (RDP)
SSH only Linux/Unix Host
DNS DNS Server
FTP FTP Server

Project Structure

cmd/recona/main.go              CLI entry point, flag parsing
internal/
  model/types.go                Host, ScanResult, ScanConfig, DeviceProfile
  network/subnet.go             Subnet auto-detection, CIDR parsing, IP generation
  worker/pool.go                Generic channel-based worker pool
  scanner/
    host.go                     Host discovery via TCP probing
    port.go                     Port scanning with worker pool
    profile.go                  Device type inference from port combinations
  tui/
    app.go                      Bubble Tea model, Init, messages, scan commands
    update.go                   Update logic, key handling, state transitions
    view.go                     Two-pane layout rendering
    styles.go                   Lipgloss color palette and style definitions

How It Works

  1. Subnet Detection — Recona reads your network interfaces and picks the first non-loopback IPv4 interface to determine the subnet (or uses the one you provide via -subnet)
  2. IP Generation — All host addresses in the CIDR range are generated (excluding network and broadcast addresses)
  3. Host Discovery — A pool of 100 workers probe each IP on ports 22, 80, and 443 with a 500ms timeout. If any port responds, the host is marked alive
  4. Port Scanning — Alive hosts are scanned across all 12 default ports using 50 workers with a 1s timeout per connection
  5. Device Profiling — Open port combinations are matched against known patterns to infer the device type
  6. TUI Rendering — Results are displayed in an interactive Bubble Tea interface with host navigation and detail views

Performance

  • Scans a /24 subnet (254 hosts) in under 30 seconds
  • Controlled concurrency prevents "too many open files" errors
  • Timeouts ensure the scan completes even with unresponsive hosts

Tech Stack

Disclaimer

This tool is intended for authorized network scanning and ethical security research only. Only scan networks you own or have explicit permission to test. Unauthorized network scanning may violate laws in your jurisdiction.

Author

Prashant Koirala

License

MIT

About

A terminal-based local network scanner and device profiler built in Go.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages