Jump to content

Large number of login attempts


yorksred

Recommended Posts

I currently have 6400+ people online mostly from he same ip address  all with these failed logins.

I have put the ip into cpanel ipblocker but made no difference and this number is increasing by the minute.  I have had to take my store offline

anyway to stop this ?

Link to comment
Share on other sites

The largest abuser of registering fake accounts makes the registration using the same first and last name. This isn't everyone, but more than 99%. I had to delete almost 50 fake customers a day. Now, about 5 a month.

In index.php, on a new blank line just after the first line, add code so that the two lines look like the following:

<?php
if (isset($_GET['_a']) && $_GET['_a'] == "register" && !empty($_POST['first_name']) && !empty($_POST['last_name']) && ((!empty($_POST['phone']) && $_POST['phone']=="123456") || $_POST['first_name']===$_POST['last_name'])) exit; // Kills PHP leaving browser with white screen

 

I have also added a means to select, in bulk, customers to have their accounts deleted.

However, at 6400+, maybe a SQL query to delete directly from the database. I usually suggest not to do this, as deleting a customer without deleting everything else that is associated with the customer's ID key may cause problems. But fake registrations do not make orders, nor fill out the addressbook.

 

Link to comment
Share on other sites

I have split your posting plus the reply from @bsmither into a new thread.

There are any number of ways at the server / hosting side of things that should already be preventing this type of thing but it sounds like your hosting company doesn't have these configured. A DDoS attack like this coming from a single IP address should never be allowed through the server security.

For clarity, are these customer login attempts or attempts to login to admin ?  What version of CubeCart are you running ?

Ian

Link to comment
Share on other sites

If they are all coming from the same IP, you could try adding a deny statement in your .htaddcess file.

However, this won't stop them coming in from another IP or proxy, so you could end up chasing your own tail.

deny from xx.xxx.xxx.0/24

or

deny from xx.xxx.0.0/16

sorry typo'd htaccess

Link to comment
Share on other sites

thanks for the help.

 

These were just tonnes of failed logins at the customer login page,  it wasn't creating fake accounts just tring to login in with hundreds of different email address

I did manage to block the ip   I tried the deny from in htaccess instantly as I have blocked a few ip addresses already but for some reason  it didn't work.

After googling a bit that deny from wasn;t working I found a few suggestions  so added the following to the htaccess file

SetEnvIf remote_addr ^xxx.xxx.xx.xxx$ block=1
Order allow,deny
allow from all
deny from env=block

and

RewriteCond %{REMOTE_ADDR}                  ^xxx.xxx.xx.xxx    [OR]
RewriteCond %{HTTP:VIA}                     ^xxx.xxx.xx.xxx   [OR]
RewriteCond %{HTTP:FORWARDED}               ^xxx.xxx.xx.xxx    [OR]
RewriteCond %{HTTP:USERAGENT_VIA}           ^xxx.xxx.xx.xxx  [OR]
RewriteCond %{HTTP:X_FORWARDED_FOR}         ^xxx.xxx.xx.xxx    [OR]
RewriteCond %{HTTP:PROXY_CONNECTION}        ^xxx.xxx.xx.xxx   [OR]
RewriteCond %{HTTP:XPROXY_CONNECTION}       ^xxx.xxx.xx.xxx    [OR]
RewriteCond %{HTTP:HTTP_PC_REMOTE_ADDR}     ^xxx.xxx.xx.xxx    [OR]
RewriteCond %{HTTP:HTTP_CLIENT_IP}          ^xxx.xxx.xx.xxx
RewriteRule ^(.*)$ - [F]

Not sure what is means lol but the the login attempts stopped almost instantly

 

 

Edited by yorksred
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...