Skip to content

Repository files navigation

sharefinder

Active network shares enumeration tool.

Created by Maksim Radaev/@vflame6


sharefinder is a network share discovery tool that enumerates shares, permissions and files in networks and domains.

Features

sharefinder

Main commands:

  • hunt: hunt network shares inside an Active Directory domain, or across the forest with --forest
  • auth: search for shares with specified credentials
  • guest: search for shares accessible with guest authentication
  • null: search for shares accessible by null session
  • report: write the HTML report of a JSONL scan file
  • diff: show new, removed and changed shares between two JSONL scans
  • matrix: test a null session, a guest session and every given account on each host in one pass, and print who can read and write each share

You can check out a demo HTML report generated by the tool.

Usage

sharefinder -h

Here is the help menu for the tool.

usage: sharefinder [<flags>] <command> [<args> ...]

sharefinder is a network share discovery tool that enumerates shares,
permissions and files in networks and domains.

Flags:
  -h, --[no-]help               Show context-sensitive help (also try
                                --help-long and --help-man).
      --[no-]debug              Enable debug mode, print debug messages
      --[no-]quiet              Enable quiet mode, print only results
  -o, --output=""               Filename to write output in raw format
      --output-xml=""           Filename to write XML formatted output
      --output-json=""          Filename to write JSONL output: one record per
                                line, written as results arrive
      --output-csv=""           Filename to write CSV output: one row per share
      --output-unc=""           Filename to write the readable shares as
                                //host/share lines, for content scanners
      --output-relay-list=""    Filename to write the hosts that do not require
                                SMB signing, one address per line, for NTLM
                                relay tools
      --output-all=""           Filename to write output in all formats
      --output-html=""          Filename to write the HTML report, rendered from
                                the JSONL output
      --[no-]force              Overwrite existing output files
      --resume=SCAN.jsonl       Continue the interrupted scan in this
                                --output-json file: finished hosts and shares
                                are skipped
      --threads=10              Number of threads
      --timeout=5s              Seconds to wait for connection
      --io-timeout=30s          Abort an SMB or LDAP operation when the server
                                sends nothing for this long
      --smb-port=445            Target port of SMB service
      --proxy=""                SOCKS-proxy address to use for connection in
                                format IP:PORT
      --[no-]disable-discovery  Do not probe the SMB port of every target first:
                                enumerate every target
      --discovery-threads=64    Number of concurrent port probes
      --connect-timeout=2s      Time to wait for the SMB port to answer a probe
      --max-auth-failures=0     Stop the scan after this many rejected logons,
                                sending logons one at a time until one succeeds
                                (0 = no limit)
  -e, --exclude="IPC$,NETLOGON,ADMIN$,print$,C$"
                                Exclude list
      --exclude-hosts=""        Skip these targets: IPs, CIDRs, ranges,
                                hostnames (comma-separated) or a file
      --[no-]list               List readable shares
      --[no-]recurse            List readable shares recursively
      --depth=0                 Directory levels to list with --recurse,
                                the share root being 1 (0 = no limit)
      --[no-]disable-follow-links
                                Do not descend into directory symlinks and
                                junctions during --recurse
      --max-files=0             Stop listing a share after this many entries (0
                                = no limit)
      --max-conns-per-host=2    Connections that list the shares of one host in
                                parallel, while --threads allows
      --write-check=file        How to test write access: mask (open the share
                                root with write rights, creates nothing),
                                file (create and delete a temporary file) or off
      --[no-]version            Show application version.

Commands:
  help [<command>...]
  null <target>
  guest [<flags>] <target>
  auth --username=USERNAME [<flags>] <target>
  hunt --username=USERNAME [<flags>] <dc>
  matrix [<flags>] <target>
  report <jsonl>
  diff <old> <new>

Installation

With Go, which needs go1.26 or newer:

go install -v github.com/vflame6/sharefinder@latest

Compiled versions are available on Release Binaries page.

With Homebrew:

brew tap vflame6/sharefinder https://github.com/vflame6/sharefinder
brew install --cask vflame6/sharefinder/sharefinder

Run the container image:

docker run --rm ghcr.io/vflame6/sharefinder -h

To Build:

go build -o sharefinder .

Build with Docker:

docker build -t sharefinder .

Contributing

Feel free to open an issue if something does not work, or if you have any issues. New ideas to improve the tool are much appreciated. See CONTRIBUTING.md for the development workflow and SECURITY.md to report vulnerabilities.

Releases

Sponsor this project

Used by

Contributors

Languages