Python Cybersecurity — Brute Force FTP

Vinsloev
3 min readFeb 27, 2022

Learn how to build a simple Python script that can be used to brute force a FTP user. This tutorial covers the implementation steps needed to build the script using Python Programming. In case you’re new to Python and need a formal introduction to the language, I have made a full Python course on Youtube: https://youtu.be/L3v5tu_ang4

The content of this article is also available in video format on the Vinsloev Academy YouTube page: https://youtu.be/0tZhMZn78Yw

Learn the skills needed to get a career within Cybersecurity. Vinsloev Academy provide educational content from around the web: https://vinsloev.com

Book — Violent Python: A Cookbook for Hackers, Forensic Analysts, Penetration Testers and Security Engineers: https://amzn.to/3RWAjyY

Before we get started with the code, we need to import the ftplib Python library. With the right import in place we can create the two needed methods for this script to work.

Brute Force

A brute-force attack consists of an attacker submitting many passwords or passphrases with the hope of eventually guessing correctly. The first method we will create is the bruteForceLogin which will take two input parameters, namly hostname of the FTP we would like to attack and passwordFile which contains a list of Passwords…

--

--

Vinsloev
Vinsloev

Written by Vinsloev

At Vinsloev Academy we strive to change the world by making software development skills available to all who wish to learn and evolve.