A Python-based brute force tool that supports login attempts for SSH, FTP, and web form authentication. This tool is intended for ethical hacking and penetration testing on systems for which you have explicit permission.
This project provides a multi-protocol brute force tool designed for security researchers and penetration testers. It supports SSH, FTP, and web form authentication brute forcing, with optional Tor integration for anonymizing web form requests. The tool is built for educational purposes and authorized security assessments only.
- SSH Brute Force: Uses
paramikoto attempt SSH logins with a username and password list. - FTP Brute Force: Uses Python's
ftplibto attempt FTP logins. - Web Form Brute Force: Uses
requeststo send POST login forms, with optional Tor network support for anonymization. - Easy-to-Use CLI: Accepts parameters for protocol, target details, and password list file.
- Tor Integration: For web form brute forcing, routes requests through Tor's SOCKS5 proxy to anonymize the origin IP.
- Python 3.x
- Python packages:
paramiko,requests
Install dependencies with:
pip install paramiko requests- For Tor anonymization:
- Install and run Tor.
- On most systems, Tor runs a SOCKS5 proxy listening on
127.0.0.1:9050by default. - For SSH and FTP brute force anonymization via Tor, use external tools like
torsocksorproxychainswhen running the script.
- Copy the Python script into a text editor.
- Save the file as
brute_force.py(ensure the.pyextension). - Prepare a password list file (e.g.,
passwords.txt) with one password per line. - Place the password list in the same directory or provide the absolute file path when running.
Run the script from the command line:
python3 brute_force.py --helpThis displays usage instructions and protocol-specific arguments.
python3 brute_force.py ssh <host> <port> <username> <password_list_file>Example:
python3 brute_force.py ssh 192.168.1.10 22 root passwords.txtTo route SSH over Tor:
torsocks python3 brute_force.py ssh 192.168.1.10 22 root passwords.txtNote: Ensure torsocks and the Tor service are installed and running.
python3 brute_force.py ftp <host> <port> <username> <password_list_file>Example:
python3 brute_force.py ftp 192.168.1.20 21 admin passwords.txtTo route FTP over Tor:
torsocks python3 brute_force.py ftp 192.168.1.20 21 admin passwords.txtpython3 brute_force.py web <url> <username_field> <password_field> <username> <password_list_file>Example:
python3 brute_force.py web http://target.com/login username password admin passwords.txtThis forces HTTP POST requests through Tor’s SOCKS5 proxy at 127.0.0.1:9050. Ensure the Tor service is running:
torVerify Tor usage (optional):
curl --socks5-hostname 127.0.0.1:9050 http://check.torproject.org- Password List Loading: Reads passwords from the specified text file.
- Protocol Selection: Based on CLI arguments, selects SSH, FTP, or web form brute forcing.
- Brute Force Loop: Iterates through each password, attempting login.
- Success/Failure Detection:
- For SSH/FTP: Catches authentication exceptions.
- For web forms: Analyzes HTTP responses.
- Tor Anonymization:
- For web forms: The
requestslibrary is configured to use Tor’s SOCKS5 proxy. - For SSH/FTP: External utilities like
torsocksproxy the entire Python process through Tor.
- For web forms: The
- Only test systems you own or have explicit authorization to test.
- Unauthorized brute forcing or scanning is illegal and unethical.
- Use responsibly for learning or authorized security assessments only.
- Password List Not Found: Ensure the filepath to the password list is correct.
- Web Brute Force Issues: Customize success detection logic based on the target login page’s response.
- Tor Not Working: Verify the Tor service is running locally for web form proxying.
- SSH/FTP over Tor: Ensure
torsocksorproxychainsis installed and configured correctly.
This tool is provided for educational purposes under the MIT License. See the LICENSE file for details.
For questions or improvements, open an issue or pull request on the GitHub repository.
The GitHub repository for this project is:
https://github.com/harriiinnii/TorBruteforce
© 2025 GitHub, Inc.
Thank you for exploring this tool responsibly!