Hi @webgmclassics ! I’ve not had much luck with captcha solutions. As someone mentioned on this thread, it seems a human is adding items to the cart and checking out, then they unleash some local script to start filling out and submitting card payments to test cards.
For now, we have two pretty good solutions in place, that others might consider looking into.
1) This plugin is really good (it requires PHP 7.4):
https://github.com/BrianHenryIE/bh-wc-checkout-rate-limiter
2) We are definitely not Mod Security experts, and would welcome input to improve this Mod Sec rule, but this is definitely blocking bad guys after 10 posts to checkout, within 10 minutes (it usually only takes 10 seconds or less for them to post 10 times!)
# WordPress WooCommerce Brute Force detection
SecAction phase:1,nolog,pass,initcol:ip=%{REMOTE_ADDR},initcol:user=%{REMOTE_ADDR},id:8000001
<LocationMatch "/">
<If "%{QUERY_STRING} =~ /wc-ajax=checkout/">
SecRule user:wc_bf_block "@gt 0" "deny,status:401,log,id:8000002,msg:'ip address blocked for 1 day, more than 10 wc-ajax=checkout attempts in 3 minutes.'"
SecRule RESPONSE_STATUS "^200" "phase:5,chain,t:none,nolog,pass,setvar:ip.wc_bf_counter=+1,deprecatevar:ip.wc_bf_counter=1/180,id:8000003"
SecRule ip:wc_bf_counter "@gt 10" "t:none,setvar:user.wc_bf_block=1,expirevar:user.wc_bf_block=86400,setvar:ip.wc_bf_counter=0"
</If>
</Locationmatch>
In our environment, this rule was added to “modsec/modsec2.user.conf”
We will definitely look closer at recaptcha as well — maybe we did not implement it correctly, or maybe it does not work on certain cart flows.
– Scott