goSweep

module
v0.0.0-...-ebfafc5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2025 License: MIT

README

goSweep 🧹

Go Report Card

[!CAUTION] Remember to use responsibly. Let's not accidentally cause a network meltdown, shall we?

GoSweep is a command-line tool written in Go for network scanning.
Note: this tool has not been heavily tested and is not intended (yet) for professional use.

Table of Contents

Features

  • TCP Port Scanning: Concurrently performs SYN (stealth) scan
  • DNS subdomain enumeration: Wordlist-based brute-force subdomain discovery with wildcard support
  • Ping sweeping (host discovery): Detect live hosts within a specified network range using ICMP

Installation

Install via go install

To install goSweep, run the following command:

go install github.com/murrrda/goSweep/cmd/goSweep@latest

This will install the goSweep binary to your $GOPATH/bin (or $HOME/go/bin).


Docker

You can pull a prebuilt Docker image from Docker Hub:

docker pull aleksamrda/gosweep

When using the DNS feature, you will need to mount your wordlist file to the container. For example: -v /path/to/wordlist.txt:/app/wordlist.txt


Build from source

To install goSweep, make sure you have Go installed and set up on your machine. Then:

git clone https://github.com/murrrda/goSweep.git
cd goSweep
go build -ldflags="-s -w" -o goSweep cmd/goSweep/main.go

Usage

GoSweep uses a subcommand-based structure, where the primary command (goSweep) is followed by a specific subcommand (e.g., ps, dns, sweep) to perform different actions. Each subcommand has its own options for detailed control. Check ./goSweep -h for more information.
Please use --no-color flag when piping output to files

Port scanning

To perform a port scan (requires root privileges):

./goSweep ps --target domain --port-range range
  • --target, -t: The IP address or domain of the target.
  • --port-range, -p: The range of ports to scan (e.g., 1:1024).

Note: does not work on Windows yet.

Port scan


Ping sweeping

To perform ping sweep (requires root privileges):

./goSweep sweep --network network
  • --network, -n: The IP range to sweep (e.g., 192.168.1.0/24). Note: network must be provided in CIDR notation

Ping sweep

DNS subdomain enumeration

To perform subdomain enumeration you will need wordlist. Check SecLists lists

./goSweep dns --domain domain --wordlist /path/to/wordlist.txt
  • --domain, -d: The domain of the target
  • --wordlist, -w: Path to newline separated file of subdomains

DNS enumeration

Use verbose flag for detailed output

DNS enumeration verbose

Wildcard detection

DNS enumeration wildcard

Next steps

  • Add CLI flag to allow users to provide a custom list of DNS servers for subdomain enumeration
  • Implement port scan support for Windows
  • Improve detection avoidance algorithm for DNS enumeration
    • Add randomized request timing (50-300ms ± jitter)
    • Implement DNS query type rotation
    • Add DNS-over-HTTPS transport option
    • Insert decoy queries to common legitimate subdomains
    • Add exponential backoff on rate limit detection

Contributing

Your feedback is valuable! If you encounter a bug, have questions, or want to suggest a feature, please open an issue on the repository.

When raising an issue, please provide:

  • A clear description of the problem or idea.
  • Steps to reproduce (if reporting a bug).
  • Any other relevant details, such as logs or screenshots.

Thank you for helping improve this tool!

Directories

Path Synopsis
cmd
goSweep command
pkg
dns
output
pkg/output/formatter.go
pkg/output/formatter.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL