diff --git a/ChangeLog b/ChangeLog index e2bcca61..9c375379 100644 --- a/ChangeLog +++ b/ChangeLog @@ -39,6 +39,9 @@ code-review and minor additions from Yaroslav Halchenko. Daniel Black and John Thoe * Multiline regex for Disconnecting: Too many authentication failures for root [preauth]\nConnection closed by 6X.XXX.XXX.XXX [preauth] + Daniel Black + * Added action xarf-login-attack to report formatted attack messages + according to the XARF standard (v0.2). Close gh-105 - Enhancements Steven Hiscocks diff --git a/config/action.d/xarf-login-attack.conf b/config/action.d/xarf-login-attack.conf new file mode 100644 index 00000000..b4e2ffcb --- /dev/null +++ b/config/action.d/xarf-login-attack.conf @@ -0,0 +1,126 @@ +# Fail2Ban action for sending xarf Login-Attack messages to IP owner +# +# IMPORTANT: +# +# Emailing a IP owner of abuse is a serious complain. Make sure that it is +# serious. Fail2ban developers and network owners recommend you only use this +# action for: +# * The recidive where the IP has been banned multiple times +# * Where maxretry has been set quite high, beyond the normal user typing +# password incorrectly. +# * For filters that have a low likelyhood of receiving human errors +# +# DEPENDANCIES: +# +# This requires the dig command from bind-utils +# +# This uses the https://abusix.com/contactdb.html to lookup abuse contacts. +# +# XARF is a specification for sending a formatted response +# for non-messaging based abuse including: +# +# Login-Attack, Malware-Attack, Fraud (Phishing, etc.), Info DNSBL +# +# For details see: +# https://github.com/abusix/xarf-specification +# http://www.x-arf.org/schemata.html +# +# Author: Daniel Black +# Based on complain written by Russell Odom +# +# + +[Definition] + +actionstart = + +actionstop = + +actioncheck = + +actionban = oifs=${IFS}; IFS=.;SEP_IP=( ); set -- ${SEP_IP} ;ADDRESSES=$(dig +short -t txt -q $4.$3.$2.$1.abuse-contacts.abusix.org); IFS=${oifs} + IP= + FROM= + SERVICE= + FAILURES= + MATCHES= + REPORTID=