From what I know that database is not stored in the MySQL database. Its stored within the ModSecurity itself they just call it a database is its a list of things.fail2ban can parse all manner of text from a log. It isn't limited to failed logins. If there's a pattern (such as a "[security2:error]") and an IP address, that's all you need to get the address blocked at the operating system level (extremely efficient).
Getting the database involved extends the DOS attack to the database.
Here is a look at warnings and attacks.
Code:
[Thu May 02 12:42:34.783512 2024] [security2:error] [pid 304485:tid 23447536985856] [client 87.121.69.52:50276] [client 87.121.69.52] ModSecurity: Warning. Match of "rx ^(?i:(?:[a-z]{3,10}\\\\s+(?:\\\\w{3,7}?://[\\\\w\\\\-\\\\./]*(?::\\\\d+)?)?/[^?#]*(?:\\\\?[^#\\\\s]*)?(?:#[\\\\S]*)?|connect (?:\\\\d{1,3}\\\\.){3}\\\\d{1,3}\\\\.?(?::\\\\d+)?|options \\\\*)\\\\s+[\\\\w\\\\./]+|get /[^?#]*(?:\\\\?[^#\\\\s]*)?(?:#[\\\\S]*)?)$" against "REQUEST_LINE" required. [file "/etc/apache2/conf.d/modsec_vendor_configs/OWASP3/rules/REQUEST-920-PROTOCOL-ENFORCEMENT.conf"] [line "47"] [id "920100"] [rev "2"] [msg "Invalid HTTP Request Line"] [data "CONNECT google.com:443 HTTP/1.1"] [severity "WARNING"] [ver "OWASP_CRS/3.0.0"] [maturity "9"] [accuracy "9"] [tag "application-multi"] [tag "language-multi"] [tag "platform-multi"] [tag "attack-protocol"] [tag "OWASP_CRS/PROTOCOL_VIOLATION/INVALID_REQ"] [tag "CAPEC-272"] [hostname "google.com"] [uri "/"] [unique_id "ZjPCekGBSwD4nUIAxBLr-QAAAQs"]
[Thu May 02 12:44:14.841972 2024] [security2:error] [pid 305046:tid 23447587415808] [remote 45.8.227.175:47724] [client 45.8.227.175] ModSecurity: Warning. Operator EQ matched 0 at REQUEST_HEADERS. [file "/etc/apache2/conf.d/modsec_vendor_configs/OWASP3/rules/REQUEST-920-PROTOCOL-ENFORCEMENT.conf"] [line "157"] [id "920180"] [rev "1"] [msg "POST request missing Content-Length Header."] [data "0"] [severity "WARNING"] [ver "OWASP_CRS/3.0.0"] [maturity "9"] [accuracy "9"] [tag "application-multi"] [tag "language-multi"] [tag "platform-multi"] [tag "attack-protocol"] [tag "OWASP_CRS/PROTOCOL_VIOLATION/INVALID_HREQ"] [tag "CAPEC-272"] [hostname "www.satelliteguys.us"] [uri "/xen/"] [unique_id "ZjPC3r7ndAQvjnG_WIqr3QADhA0"]
[Thu May 02 12:46:00.448709 2024] [proxy_fcgi:error] [pid 305046:tid 23447509669632] [client 17.241.227.221:59316] AH01071: Got error 'Primary script unknown'
[Thu May 02 12:56:13.952462 2024] [security2:error] [pid 292846:tid 23447547492096] [client 14.215.163.132:48184] [client 14.215.163.132] ModSecurity: Warning. Pattern match "\\\\b(keep-alive|close),\\\\s?(keep-alive|close)\\\\b" at REQUEST_HEADERS:Connection. [file "/etc/apache2/conf.d/modsec_vendor_configs/OWASP3/rules/REQUEST-920-PROTOCOL-ENFORCEMENT.conf"] [line "198"] [id "920210"] [rev "2"] [msg "Multiple/Conflicting Connection Header Data Found."] [data "keep-alive, close"] [severity "WARNING"] [ver "OWASP_CRS/3.0.0"] [maturity "6"] [accuracy "8"] [tag "application-multi"] [tag "language-multi"] [tag "platform-multi"] [tag "attack-protocol"] [tag "OWASP_CRS/PROTOCOL_VIOLATION/INVALID_HREQ"] [hostname "154.38.162.185"] [uri "/"] [unique_id "ZjPFrWWzP8b3C7KDm9AeOQAAAEY"]
[Thu May 02 13:02:32.253476 2024] [security2:error] [pid 292846:tid 23447536985856] [client 17.246.19.207:38694] [client 17.246.19.207] ModSecurity: Warning. Pattern match "(?i:(?:[\\\\s()]case\\\\s*?\\\\()|(?:\\\\)\\\\s*?like\\\\s*?\\\\()|(?:having\\\\s*?[^\\\\s]+\\\\s*?[^\\\\w\\\\s])|(?:if\\\\s?\\\\([\\\\d\\\\w]\\\\s*?[=<>~]))" at ARGS:_xfRequestUri. [file "/etc/apache2/conf.d/modsec_vendor_configs/OWASP3/rules/REQUEST-942-APPLICATION-ATTACK-SQLI.conf"] [line "65"] [id "942230"] [rev "2"] [msg "Detects conditional SQL injection attempts"] [data "Matched Data: having-same-problem.338790/ found within ARGS:_xfRequestUri: /xen/threads/replaced-hopper-with-sling-and-having-same-problem.338790/"] [severity "CRITICAL"] [ver "OWASP_CRS/3.0.0"] [maturity "9"] [accuracy "8"] [tag "application-multi"] [tag "language-multi"] [tag "platform-multi"] [tag "attack-sqli"] [tag "OWASP_CRS/WEB_ATTACK/SQL_INJECTION"] [tag "WASCTC/WASC-19"] [tag "OWASP_TOP_10/A1"] [tag "OWASP_AppSensor/CIE1"] [tag "PCI/6.5.2"] [hostname "www.satelliteguys.us"] [uri "/xen/index.php"] [unique_id "ZjPHKGWzP8b3C7KDm9Af4gAAAEs"], referer: https://www.satelliteguys.us/xen/threads/replaced-hopper-with-sling-and-having-same-problem.338790/
[Thu May 02 13:02:32.256735 2024] [security2:error] [pid 292846:tid 23447536985856] [client 17.246.19.207:38694] [client 17.246.19.207] ModSecurity: Access denied with code 403 (phase 2). Operator GE matched 5 at TX:anomaly_score. [file "/etc/apache2/conf.d/modsec_vendor_configs/OWASP3/rules/REQUEST-949-BLOCKING-EVALUATION.conf"] [line "30"] [id "949110"] [msg "Inbound Anomaly Score Exceeded (Total Score: 5)"] [severity "CRITICAL"] [tag "application-multi"] [tag "language-multi"] [tag "platform-multi"] [tag "attack-generic"] [hostname "www.satelliteguys.us"] [uri "/xen/index.php"] [unique_id "ZjPHKGWzP8b3C7KDm9Af4gAAAEs"], referer: https://www.satelliteguys.us/xen/threads/replaced-hopper-with-sling-and-having-same-problem.338790/
[Thu May 02 13:02:32.257174 2024] [security2:error] [pid 292846:tid 23447536985856] [client 17.246.19.207:38694] [client 17.246.19.207] ModSecurity: Warning. Operator GE matched 5 at TX:inbound_anomaly_score. [file "/etc/apache2/conf.d/modsec_vendor_configs/OWASP3/rules/RESPONSE-980-CORRELATION.conf"] [line "37"] [id "980130"] [msg "Inbound Anomaly Score Exceeded (Total Inbound Score: 5 - SQLI=5,XSS=0,RFI=0,LFI=0,RCE=0,PHPI=0,HTTP=0,SESS=0): Detects conditional SQL injection attempts"] [tag "event-correlation"] [hostname "www.satelliteguys.us"] [uri "/xen/index.php"] [unique_id "ZjPHKGWzP8b3C7KDm9Af4gAAAEs"], referer: https://www.satelliteguys.us/xen/threads/replaced-hopper-with-sling-and-having-same-problem.338790/
[Thu May 02 13:02:32.759008 2024] [security2:error] [pid 304937:tid 23447541188352] [client 17.246.19.28:43864] [client 17.246.19.28] ModSecurity: Warning. Pattern match "(?i:(?:[\\\\s()]case\\\\s*?\\\\()|(?:\\\\)\\\\s*?like\\\\s*?\\\\()|(?:having\\\\s*?[^\\\\s]+\\\\s*?[^\\\\w\\\\s])|(?:if\\\\s?\\\\([\\\\d\\\\w]\\\\s*?[=<>~]))" at ARGS:_xfRequestUri. [file "/etc/apache2/conf.d/modsec_vendor_configs/OWASP3/rules/REQUEST-942-APPLICATION-ATTACK-SQLI.conf"] [line "65"] [id "942230"] [rev "2"] [msg "Detects conditional SQL injection attempts"] [data "Matched Data: having-same-problem.338790/ found within ARGS:_xfRequestUri: /xen/threads/replaced-hopper-with-sling-and-having-same-problem.338790/"] [severity "CRITICAL"] [ver "OWASP_CRS/3.0.0"] [maturity "9"] [accuracy "8"] [tag "application-multi"] [tag "language-multi"] [tag "platform-multi"] [tag "attack-sqli"] [tag "OWASP_CRS/WEB_ATTACK/SQL_INJECTION"] [tag "WASCTC/WASC-19"] [tag "OWASP_TOP_10/A1"] [tag "OWASP_AppSensor/CIE1"] [tag "PCI/6.5.2"] [hostname "www.satelliteguys.us"] [uri "/xen/index.php"] [unique_id "ZjPHKHqfSzvk8YgV5pejGQAAAwk"], referer: https://www.satelliteguys.us/xen/threads/replaced-hopper-with-sling-and-having-same-problem.338790/
[Thu May 02 13:02:32.759372 2024] [security2:error] [pid 304937:tid 23447541188352] [client 17.246.19.28:43864] [client 17.246.19.28] ModSecurity: Access denied with code 403 (phase 2). Operator GE matched 5 at TX:anomaly_score. [file "/etc/apache2/conf.d/modsec_vendor_configs/OWASP3/rules/REQUEST-949-BLOCKING-EVALUATION.conf"] [line "30"] [id "949110"] [msg "Inbound Anomaly Score Exceeded (Total Score: 5)"] [severity "CRITICAL"] [tag "application-multi"] [tag "language-multi"] [tag "platform-multi"] [tag "attack-generic"] [hostname "www.satelliteguys.us"] [uri "/xen/index.php"] [unique_id "ZjPHKHqfSzvk8YgV5pejGQAAAwk"], referer: https://www.satelliteguys.us/xen/threads/replaced-hopper-with-sling-and-having-same-problem.338790/
[Thu May 02 13:02:32.759617 2024] [security2:error] [pid 304937:tid 23447541188352] [client 17.246.19.28:43864] [client 17.246.19.28] ModSecurity: Warning. Operator GE matched 5 at TX:inbound_anomaly_score. [file "/etc/apache2/conf.d/modsec_vendor_configs/OWASP3/rules/RESPONSE-980-CORRELATION.conf"] [line "37"] [id "980130"] [msg "Inbound Anomaly Score Exceeded (Total Inbound Score: 5 - SQLI=5,XSS=0,RFI=0,LFI=0,RCE=0,PHPI=0,HTTP=0,SESS=0): Detects conditional SQL injection attempts"] [tag "event-correlation"] [hostname "www.satelliteguys.us"] [uri "/xen/index.php"] [unique_id "ZjPHKHqfSzvk8YgV5pejGQAAAwk"], referer: https://www.satelliteguys.us/xen/threads/replaced-hopper-with-sling-and-having-same-problem.338790/
[Thu May 02 13:02:33.286451 2024] [security2:error] [pid 304861:tid 23447534884608] [client 17.246.23.107:37974] [client 17.246.23.107] ModSecurity: Warning. Pattern match "(?i:(?:[\\\\s()]case\\\\s*?\\\\()|(?:\\\\)\\\\s*?like\\\\s*?\\\\()|(?:having\\\\s*?[^\\\\s]+\\\\s*?[^\\\\w\\\\s])|(?:if\\\\s?\\\\([\\\\d\\\\w]\\\\s*?[=<>~]))" at ARGS:_xfRequestUri. [file "/etc/apache2/conf.d/modsec_vendor_configs/OWASP3/rules/REQUEST-942-APPLICATION-ATTACK-SQLI.conf"] [line "65"] [id "942230"] [rev "2"] [msg "Detects conditional SQL injection attempts"] [data "Matched Data: having-same-problem.338790/ found within ARGS:_xfRequestUri: /xen/threads/replaced-hopper-with-sling-and-having-same-problem.338790/"] [severity "CRITICAL"] [ver "OWASP_CRS/3.0.0"] [maturity "9"] [accuracy "8"] [tag "application-multi"] [tag "language-multi"] [tag "platform-multi"] [tag "attack-sqli"] [tag "OWASP_CRS/WEB_ATTACK/SQL_INJECTION"] [tag "WASCTC/WASC-19"] [tag "OWASP_TOP_10/A1"] [tag "OWASP_AppSensor/CIE1"] [tag "PCI/6.5.2"] [hostname "www.satelliteguys.us"] [uri "/xen/index.php"] [unique_id "ZjPHKScItfrHDHUl3Lr1rQAAAsw"], referer: https://www.satelliteguys.us/xen/threads/replaced-hopper-with-sling-and-having-same-problem.338790/
[Thu May 02 13:02:33.286922 2024] [security2:error] [pid 304861:tid 23447534884608] [client 17.246.23.107:37974] [client 17.246.23.107] ModSecurity: Access denied with code 403 (phase 2). Operator GE matched 5 at TX:anomaly_score. [file "/etc/apache2/conf.d/modsec_vendor_configs/OWASP3/rules/REQUEST-949-BLOCKING-EVALUATION.conf"] [line "30"] [id "949110"] [msg "Inbound Anomaly Score Exceeded (Total Score: 5)"] [severity "CRITICAL"] [tag "application-multi"] [tag "language-multi"] [tag "platform-multi"] [tag "attack-generic"] [hostname "www.satelliteguys.us"] [uri "/xen/index.php"] [unique_id "ZjPHKScItfrHDHUl3Lr1rQAAAsw"], referer: https://www.satelliteguys.us/xen/threads/replaced-hopper-with-sling-and-having-same-problem.338790/
[Thu May 02 13:02:33.287273 2024] [security2:error] [pid 304861:tid 23447534884608] [client 17.246.23.107:37974] [client 17.246.23.107] ModSecurity: Warning. Operator GE matched 5 at TX:inbound_anomaly_score. [file "/etc/apache2/conf.d/modsec_vendor_configs/OWASP3/rules/RESPONSE-980-CORRELATION.conf"] [line "37"] [id "980130"] [msg "Inbound Anomaly Score Exceeded (Total Inbound Score: 5 - SQLI=5,XSS=0,RFI=0,LFI=0,RCE=0,PHPI=0,HTTP=0,SESS=0): Detects conditional SQL injection attempts"] [tag "event-correlation"] [hostname "www.satelliteguys.us"] [uri "/xen/index.php"] [unique_id "ZjPHKScItfrHDHUl3Lr1rQAAAsw"], referer: https://www.satelliteguys.us/xen/threads/replaced-hopper-with-sling-and-having-same-problem.338790/