Jump to content

Hacker attck on prestashop 1.5.6.2 - spam


brih

Recommended Posts

Hi all,

 

I have a serious problem currently. I am being bombarded by emails from my own contactform. I can see that this is not new, but I have tried everything.

I have deleted the contactform in the contactform tpl in the theme, so no form or button anymore. It stills comes in.

I trust it is in the contactcontroller somewhere.

I have tried to put this below into the override:

<?php
class ContactController extends ContactControllerCore
{
	public function postProcess()
	{
		if (Tools::isSubmit('submitMessage'))
			{die('Form disabled');}
		else 
			parent::postProcess();
		//return null;

	}
	
}

Doesnt seem to help. It seems that ContactControllerCore is not recognised. Can anyone please guide me in any direction. Can I just delete the contactcontroller. Seems there is nothing to be done about this ??

 

Thanks in advance.

 

Link to comment
Share on other sites

is it the contact form, or perhaps the send to a friend module?  I would highly suggest uninstalling and physically removing the send to a friend module if you have it on your store. 

Note: This is why you don't use software that is very old and no longer maintained.  You really should consider getting off of PS v1.5

Link to comment
Share on other sites

I understand what you're saying as I am using PS 1.6 and I am having the same issue. I've already installed reCAPTCHA on the CONTACT form and the bots are blowing right past it. I'm banning IP Addresses and complete ranges at a rate I would need to hire a full-time 24/7 hour employee just to do it.

I need a way to change or disable the "CONTACT" form URL completely.  This is NOT done by simply going in to PREFERENCES and editing the SEO/URL as the "CONTROLLER=CONTACT" URL still remains the same. Any help with this issue would be great! Thank you in advance.

Example: 

whateversite(dot)com/index.php?controller=contact

Edited To:

whateversite(dot)com/index.php?controller=contact-us

OR

whateversite(dot)com/index.php?controller=

Edited by SlowLearner (see edit history)
Link to comment
Share on other sites

Sounds like you have not properly installed reCaptcha then.  There is the component that you install in the page content that challenges the user, but you also need to server side component that verifies the challenge. 

Sounds like you missed the server side portion, or the spam is not coming from the contact form, but perhaps a broken module like "send to a friend" which has known issues if you did not uninstall and delete it, or update it.

Link to comment
Share on other sites

11 hours ago, bellini13 said:

Sounds like you have not properly installed reCaptcha then.  There is the component that you install in the page content that challenges the user, but you also need to server side component that verifies the challenge. 

Sounds like you missed the server side portion, or the spam is not coming from the contact form, but perhaps a broken module like "send to a friend" which has known issues if you did not uninstall and delete it, or update it.

 

The reCAPTCHA isn't installed incorrectly on the CONTACT page or on the server side. It makes the user checkmark "I'm Not A Robot" and the message SEND will fail if that isn't checked. [Please see the images I have enclosed of this] The bots are still able to send me emails using the CONTACT form even with reCAPTCHA installed. The SPAM coming from the CONTACT page and it's addressed to "WEBMASTER" so I know it's coming from the CONTACT form. [Please see image of CONTACT form SPAM message below] Additionally, I uninstalled the "Send To A Friend" module a long time ago so I know that isn't the problem.

DO YOU KNOW HOW TO MAKE THE EDITS SHOWN BELOW TO CHANGE OR REMOVE THE CONTACT PAGE? ANY HELP WOULD BE GREAT.

I need a way to change or disable the "CONTACT" form URL completely.  This is NOT done by simply going in to PREFERENCES and editing the SEO/URL as the "CONTROLLER=CONTACT" URL still remains the same. Any help with this issue would be great! Thank you in advance.

Example: 

whateversite(dot)com/index.php?controller=contact

Edited To:

whateversite(dot)com/index.php?controller=contact-us

OR

whateversite(dot)com/index.php?controller=

Contact Form reCAPTCHA.jpg

Contact Form reCAPTCHA Validation.jpg

MAIL RU SPAM.jpg

Edited by SlowLearner
Added Additional Information (see edit history)
Link to comment
Share on other sites

So what exactly have you done on the server side to implement recaptcha? 

It is not enough to add the code to the client side form, that only challenges the user.  However that is easily bypassed, and you NEED to implement the server side recaptcha component, which takes the challenge token from the form submission and verifies that it is a valid token.

So again, what have you done server side?

Link to comment
Share on other sites

1 hour ago, bellini13 said:

So what exactly have you done on the server side to implement recaptcha? 

It is not enough to add the code to the client side form, that only challenges the user.  However that is easily bypassed, and you NEED to implement the server side recaptcha component, which takes the challenge token from the form submission and verifies that it is a valid token.

So again, what have you done server side?

 

Server side? I installed the reCAPTCHA in the CONTACT TPL FILE through my cPanel FILE MANAGER. :) I thought that's what you meant?

If what you're saying involves additional steps besides installing the reCAPTCHA in the CONTACT TPL FILE, I have done nothing. :( 

Maybe you can inform me (and others) of what needs to be done on the server side for the reCAPTCHA component to verify the token is valid?

 

 

Link to comment
Share on other sites

feel free to search the forums on how to properly install recaptcha

As I mentioned already, installing the client code in the form does nothing...  You need to install the server side code in the ContactController for it to actually work

Link to comment
Share on other sites

47 minutes ago, bellini13 said:

feel free to search the forums on how to properly install recaptcha

As I mentioned already, installing the client code in the form does nothing...  You need to install the server side code in the ContactController for it to actually work

 

bellini13, Let me start by saying "Thank You" for your continued attempt to help and point us in the correct direction.

I've searched the forums on how to properly install reCAPTCHA and found nothing about installing a code on the "server side" as you say? Everything I have found talks about installing code in the CONTACT-TPL as I have done. I've already spent so much time "searching the forums" that it would have been easier for me to just install another script however, I am trying to remain loyal to the PS script/community as I have been here for many years. I'll be the first one to admit that I am no PS expert and I only get by with the knowledge I have gained using the PS script for years. I had a lot of problems that took me weeks to get resolved when I upgraded my website to PS1.6. The fear of upgrading to PS1.7 and having to start all over from scratch has kept me from upgrading again.  

Maybe you can provide us with a helpful link to what you're saying we should do? When you know what you're looking for, it may be easy for you to find but if you don't know what you're looking for, it can be rather difficult for us to find.

Additionally, we still haven't found an answer to the original question on editing or removing the form completely?

DOES ANYONE KNOW HOW TO MAKE THE EDITS SHOWN BELOW TO CHANGE OR REMOVE THE CONTACT PAGE? ANY HELP WOULD BE GREAT.

I need a way to change or disable the "CONTACT" form URL completely.  This is NOT done by simply going in to PREFERENCES and editing the SEO/URL as the "CONTROLLER=CONTACT" URL still remains the same. Any help with this issue would be great! Thank you in advance.

Example: 

whateversite(dot)com/index.php?controller=contact

Edited To:

whateversite(dot)com/index.php?controller=contact-us

OR

whateversite(dot)com/index.php?controller=

Link to comment
Share on other sites

Hi - thanks for all the good responses. That is perfect. i will rethink what to do, but in order to stop this, I have done the following:

 

I edited the file contact controller.php in controllers/front/

In the beginning of the file:

public function postProcess()
    {
        if (Tools::isSubmit('submitMessage'))
        {

 

I replaced with:

 

public function postProcess()
    {
        if (Tools::isSubmit('submitMessageblablablba'))
        {

It means it will never send anything. That stopped the stream of spam coming in. I have edited the contact page just to include email contact, and no longer by form.

 

Br. Brian

 

 

 

  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...