Hi,
Today i noticed alot of traffic to several sites - Apache status showed
POST /xmlrpc.php HTTP/1.0
so it was obviously part of or the target of some WP botnet using the XML RPC request.
i thought id block this easily at the server level with mod_security and the rules below
SecRule REQUEST_FILENAME "^/xmlrpc.php" "deny,log,auditlog,status:403,msg:'xmlrpc TOM FOOLERY',id:'1337',severity:'2'"
SecRule REQUEST_URI "xmlrpc*" "deny,log,auditlog,status:403,msg:'xmlrpc TOM FOOLERY',id:'1338',severity:'2'"
However i found that even though mod_security would log the request, (and CSF would block it after 5 times) it wasn't generating a 403 error page or even 500 error page when i changed the status to 500.
It would just seem to trigger a 404 in the customers CMS both on wordpress (where the xmlrpc.php exists) and another where its not wordpress and (doesn't actually contain a xmlrpc.php).
Id prefer it to not load the CMS 404 page, and use the default 403 page, that is text only and loads minimal resources.
I found If I then created a 403.html through cpanels custom error pages, it wouldn't show the customers 404 page it would correctly show the custom 403 page. however id rather use the default page and not a custom one as i would have to add this page to every customers account.
Is this possible? i thought mod security in the past was able to intercept before the customers CMS and send its internal server error or 403?
Today i noticed alot of traffic to several sites - Apache status showed
POST /xmlrpc.php HTTP/1.0
so it was obviously part of or the target of some WP botnet using the XML RPC request.
i thought id block this easily at the server level with mod_security and the rules below
SecRule REQUEST_FILENAME "^/xmlrpc.php" "deny,log,auditlog,status:403,msg:'xmlrpc TOM FOOLERY',id:'1337',severity:'2'"
SecRule REQUEST_URI "xmlrpc*" "deny,log,auditlog,status:403,msg:'xmlrpc TOM FOOLERY',id:'1338',severity:'2'"
However i found that even though mod_security would log the request, (and CSF would block it after 5 times) it wasn't generating a 403 error page or even 500 error page when i changed the status to 500.
It would just seem to trigger a 404 in the customers CMS both on wordpress (where the xmlrpc.php exists) and another where its not wordpress and (doesn't actually contain a xmlrpc.php).
Id prefer it to not load the CMS 404 page, and use the default 403 page, that is text only and loads minimal resources.
I found If I then created a 403.html through cpanels custom error pages, it wouldn't show the customers 404 page it would correctly show the custom 403 page. however id rather use the default page and not a custom one as i would have to add this page to every customers account.
Is this possible? i thought mod security in the past was able to intercept before the customers CMS and send its internal server error or 403?