I Simulated an SSH Brute-Force Attack on My Ubuntu Server — Here’s How Fail2Ban Stopped It
Building a simple attack lab to understand how Fail2Ban detects and blocks repeated SSH login attemp 2026-6-12 07:6:35 Author: infosecwriteups.com(查看原文) 阅读量:8 收藏

Building a simple attack lab to understand how Fail2Ban detects and blocks repeated SSH login attempts.

Handhika Yanuar Pratama

Press enter or click to view image in full size

Photo by Esther Jiao on Unsplash

This time, I wanted to simulate the implementation of one of the most common SSH protection mechanisms: Fail2Ban.

I briefly mentioned Fail2Ban in one of my previous articles [ACCESS IT], but I don’t like stopping at theory. I prefer seeing things in action. So instead of just talking about it, let’s put it to the test.

Setup Lab

For this experiment, I did not use the same lab environment as my penetration testing setup [ACCESS IT]. Instead, I built a simple Ubuntu Server environment and used my own computer as the attacker.

Press enter or click to view image in full size

To make administration easier, I accessed the server through SSH. At this point, the server did not have Fail2Ban installed or configured.

Attacker tool

To make this article more interesting, I created a small tool to support the demonstration. In short, this tool…


文章来源: https://infosecwriteups.com/i-simulated-an-ssh-brute-force-attack-on-my-ubuntu-server-heres-how-fail2ban-stopped-it-c2a65ea22267?source=rss----7b722bfd1b8d---4
如有侵权请联系:admin#unsafe.sh