# Mass-Bruter | Mass Bruteforce Network Protocols

**URL:** <https://onehack.st/t/mass-bruter-mass-bruteforce-network-protocols/266841>\
**Category:** Tools & Scripts\
**Tags:** hacking, cracking\
**Created:** [December 2, 2023, 9:37pm UTC](https://onehack.st/t/mass-bruter-mass-bruteforce-network-protocols/266841 "2023-12-02T21:37:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prometheus](https://onehack.st/user_avatar/onehack.st/prometheus/32/34950_2.png) [@Prometheus](https://onehack.st/u/Prometheus)\
**Post date:** [December 2, 2023, 9:37pm UTC](https://onehack.st/t/mass-bruter-mass-bruteforce-network-protocols/266841/1 "2023-12-02T21:37:12Z")

</div>

![image](https://onehack.st/uploads/default/original/3X/c/8/c8051962a852164e225370b86ca87af01ca5a1f2.jpeg)

# Mass Bruter

Mass bruteforce network protocols

## Info

Simple POC to quickly mass bruteforce common services in a large scale of network.

It will check for default credentials on ftp, ssh, mysql, mssql…etc.

This was made for authorized penetration testing purpose only.

## How it works

1. Use `masscan`(faster than nmap) to find alive hosts with common ports from network segment.
2. Parse ips and ports from `masscan` result.
3. Craft and run `hydra` commands to automatically bruteforce supported network services on devices.

## Requirements

- `Kali linux` or any preferred linux distribution
- `Python 3.10+`

# Install required tools for the script apt update && apt install seclists masscan hydra # Clone the repo git clone [https://github.com/opabravo/mass-bruter](https://github.com/opabravo/mass-bruter) cd mass-bruter

## How To Use

### 1. Scan for hosts and ports with masscan

For example, target a network segment:

> Private ip range : `10.0.0.0/8`, `192.168.0.0/16`, `172.16.0.0/12`

Scan devices and ports from `172.16.0.0/12`, then save output to `./result/masscan/masscan_<any_name>.<any_ext>`

masscan -p 3306,1433,21,22,23,445,3389,5900,6379,27017,5432,5984,11211,9200,1521 172.16.0.0/12 | tee ./result/masscan/masscan\_test.txt

PS : To resume a previous scan:

masscan --resume paused.conf | tee -a ./result/masscan/masscan\_test.txt

### 2. Run the script

Load masscan result then start bruteforcing:

python3 mass\_bruteforce.py -q -f ~/masscan\_script.txt

[![](https://camo.githubusercontent.com/f07fdbb1ab269e9d2c2e5a8a023b947a34d4379557ee180a9acf97e180e936f8/68747470733a2f2f692e696d6775722e636f6d2f68566249616b692e706e67)](https://camo.githubusercontent.com/f07fdbb1ab269e9d2c2e5a8a023b947a34d4379557ee180a9acf97e180e936f8/68747470733a2f2f692e696d6775722e636f6d2f68566249616b692e706e67)

Fetch cracked credentials:

python3 mass\_bruteforce.py -s

[![](https://camo.githubusercontent.com/79209c6a3e34316d59312a1ff13f58dae759dfc69407eb5d4038933aef3d68d7/68747470733a2f2f692e696d6775722e636f6d2f4650534d4145622e706e67)](https://camo.githubusercontent.com/79209c6a3e34316d59312a1ff13f58dae759dfc69407eb5d4038933aef3d68d7/68747470733a2f2f692e696d6775722e636f6d2f4650534d4145622e706e67)

## Command Options

┌──(root㉿root)-[~/mass-bruter] └─# python3 mass\_bruteforce.py Usage: [OPTIONS] Mass Bruteforce Script Options: -q, --quick Quick mode (Only brute telnet, ssh, ftp , mysql, mssql, postgres, oracle) -a, --all Brute all services(Very Slow) -s, --show Show result with successful login -f, --file-path PATH The directory or file that contains masscan result [default: ./result/masscan/] --help Show this message and exit.

## Todo

- Migrate with `dpl4hydra`
- Optimize the code and functions
- MultiProcessing

Any contributions are welcomed!

## GitHub:

> **[GitHub - opabravo/mass-bruter: Mass bruteforce authentication of common services...](https://github.com/opabravo/mass-bruter)**
>
> Mass bruteforce authentication of common services with common credentials.
