vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Integration with vBulletin - vB Bad Behavior (vB4) (https://vborg.vbsupport.ru/showthread.php?t=261498)

Eric 04-05-2011 10:00 PM

vB Bad Behavior (vB4)
 
1 Attachment(s)
/**
* vB Bad Behavior is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 3 of the License, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*/


What is vB Bad Behavior?
This is an integration of the Bad Behavior software with vBulletin.

What is Bad Behavior?
Bad Behavior is a PHP-based solution for blocking link spam and the robots which deliver it. Bad Behavior complements other link spam solutions by acting as a gatekeeper, preventing spammers from ever delivering their junk, and in many cases, from ever reading your site in the first place. This keeps your site's load down, makes your site logs cleaner, and can help prevent denial of service conditions caused by spammers.

Visit http://bad-behavior.ioerror.us/ for more.

Features
For more information on the features of Bad Behavior (and subsequently this mod) please go to Bad Behavior's site:

http://bad-behavior.ioerror.us/documentation/benefits/

For features related to the mod itself, please take a look at the screenshots.

This mod should work with vB 4.x, it was tested on 4.1.2/4.1.3. Screenshots are from vB 3.x, but it should still look relatively the same with vB4.

Installation
1. Extract the contents of the zip file.
2. Upload the contents of the `upload` folder to your forum root.
3. Enter your AdminCP and go to Plugins & Products > Manage Products > [Add/Import Product]
4. Import the product using the `product-vb_badbehavior.xml` file.
5. Configure the mod in AdminCP -> Settings -> Options -> vB Bad Behavior Options

Upgrading

vB Bad Behavior
In many cases, all you'll need to do to upgrade is follow the installation instructions above.

The only difference, will be you'll need to allow the files to overwrite. Also, when re-importing the product file, you'll need to set "Allow Overwrite" to "Yes".

Bad Behavior
Bad Behavior's files are at `/includes/bad-behavior/`. If you wish to update manually go to:

http://bad-behavior.ioerror.us/download/

And download the latest development version. Extract the zip, and upload the contents of `bad-behavior` to `/includes/bad-behavior/` allowing the files to overwrite.

Versions
The current version of Bad Behavior this mod is using is: v2.2.16
The current version of Bad Behavior (development) is: v2.2.16

Changelog
Version 1.0.14, 09/22/2015
  • Bad Behavior upgraded to 2.2.16

Version 1.0.13, 04/23/2013
  • Bad Behavior upgraded to 2.2.14

Version 1.0.12, 12/21/2012 -- Released: 02/05/2013
  • Bad Behavior upgraded to 2.2.13
  • Added some more ranges to whitelist.ini

Version 1.0.10, 09/09/2012
  • Bad Behavior upgraded to 2.2.10

Version 1.0.9, 06/17/2012
  • Bad Behavior upgraded to 2.2.7

Version 1.0.8, 06/12/2012
  • Bad Behavior upgraded to 2.2.6
  • New Setting: EU Cookie

Version 1.0.7, 05/04/2012
  • Bad Behavior upgraded to 2.2.3
  • Cron/Scheduled Task for automatic log pruning added.

Version 1.0.6, 01/04/2012
  • Bad Behavior upgraded to 2.1.15

Version 1.0.5, 05/26/2011
  • Added option for bypassing users/members.
  • If the visitor is a user, and is in usergroup 5, 6, or 7 (admin/mod/super mod) - Bad Behavior is bypassed.
  • Modified bad-behavior core to check for Google Web Preview
    • file edited: /includes/bad-behavior/core.inc.php
  • Added a link beside the IP address in the log for WhoIs.

Version 1.0.4, 04/28/2011
  • Bad Behavior upgraded to 2.1.13 (fixes search engine block issues)
  • Added Paypal/Paypal IPN IP address to the whitelist.
  • Added payment gateway file names to the whitelist.

Version 1.0.3, 04/21/2011
  • Fix #1: Pruning log doesn't work.
  • Fix #3: POST more than two days after GET (added support for BB's javascript)
  • Fix #5: Cannot modify header information error (suppressed error in BB's function)
  • Implemented #6: Filter per key (new admincp option to list keys not to be shown in log)
  • Implemented #9: Show link to member profile (if userid is found in headers, link to profile)

Version 1.0.2, 04/10/2011
  • Updated /includes/functions_vb_badbehavior.php to:
    • disable Reverse Proxy if Reverse Proxy Addresses are empty
    • distinguish SQL queries using "SET", for example: SET @@session.wait_timeout = 90 - which is used by BB
    • set "offsite_forms" to false by default, as it's not really needed in vB IMHO, and it can cause problems with certain setups
    • cleaned up the bb2_read_settings() function and fixed a typo in one of the vbulletin options calls
  • Updated /includes/whitelist.ini to include the following GOOGLE ranges:
    • 74.125.0.0/16
    • 216.239.32.0/19
    • 209.85.128.0/17
    • 66.102.0.0/20
  • Updated /admincp/vb_badbehavior.php
    • Log pruning was pruning all logs, despite what was entered for number of days

Version 1.0.1, 04/06/2011
  • Bad Behavior upgraded to 2.1.12
  • Changed files:
    • /includes/bad-behavior/core.inc.php
    • /includes/bad-behavior/searchengine.inc.php
  • "Verbose" admin option now set to "No" by default.

Version 1.0.0, 04/05/2011
  • Initial release.


Screenshots
Screenshots can now be seen at: http://www.secondversion.com/images/vb/vb_badbehavior/

I was running out of room for attachments here on vB.org


Development

https://github.com/ericsizemore/vb_b...ree/master/vb4


Only those who "Mark As Installed" will receive support for this modification.

Eric 04-05-2011 10:22 PM

Reserved for future use.

Eric 04-06-2011 08:31 PM

An update will be coming soon, since a new version of Bad Behavior was released.

Eric 04-06-2011 09:25 PM

Version 1.0.1, 04/06/2011
- Bad Behavior upgraded to 2.1.12
- Changed files:
o /includes/bad-behavior/core.inc.php
o /includes/bad-behavior/searchengine.inc.php
- "Verbose" admin option now set to "No" by default.

I've reached the max. number of attachments for this thread - so I'll have to move the screenshots elsewhere. I will do this soon.

Mark.B 04-06-2011 11:04 PM

Thanks for this, I'm going to have a play with it at the weekend.

baghdad4ever 04-07-2011 09:12 AM

installed

plz can you tell me

i had high load in my server, can i get some benefit from this?

Gemma 04-07-2011 09:36 AM

Thanks for this :)

BadgerDog 04-07-2011 11:35 AM

Installed with thanks for testing on 4.04pl1 of vBulletin ... :)

Regards,
Doug

Eric 04-08-2011 07:33 PM

Screenshots can now be seen at: http://www.secondversion.com/images/vb_badbehavior/

I was running out of room for attachments here on vB.org - Also, to lower the size of the download... removed the screenshots from the zip files.

Eric 04-09-2011 06:41 PM

Quote:

Originally Posted by baghdad4ever (Post 2181901)
installed

plz can you tell me

i had high load in my server, can i get some benefit from this?

Yes, you could. Malicious bots can result in part of that load, if not most of it - with Bad Behavior blocking them, most folks do see a decrease in load.

Eric 04-10-2011 03:15 PM

Version 1.0.2, 04/10/2011
  • Updated /includes/functions_vb_badbehavior.php to:
    • disable Reverse Proxy if Reverse Proxy Addresses are empty
    • distinguish SQL queries using "SET", for example: SET @@session.wait_timeout = 90 - which is used by BB
    • set "offsite_forms" to false by default, as it's not really needed in vB IMHO, and it can cause problems with certain setups
    • cleaned up the bb2_read_settings() function and fixed a typo in one of the vbulletin options calls
  • Updated /includes/whitelist.ini to include the following GOOGLE ranges:
    • 74.125.0.0/16
    • 216.239.32.0/19
    • 209.85.128.0/17
    • 66.102.0.0/20
  • Updated /admincp/vb_badbehavior.php
    • Log pruning was pruning all logs, despite what was entered for number of days

BadgerDog 04-10-2011 04:29 PM

Thanks for the update ... :up:

This mod seems to block a LOT of things .... :eek:

Some of them seem pretty nasty. For example ..

When I click on an item in the log under the key "dfd9b1ad", it says on a pop screen ...

Quote:

HTTP Response: 403
Explanation: You do not have permission to access this server.
Log Message: Request contained a malicious JavaScript or SQL injection attack
I assume this something trying to do something bad to our site?

Also, I've been to project honeypot site and I can't find anywhere to register for an API key?

Regards,
Doug

Carnage 04-10-2011 07:54 PM

looking good so far, its already flagged up a couple of accounts which we had previously banned for being spam bots. If it performs as well on previously unseen spammers, this could be a motm.

Gemma 04-10-2011 08:18 PM

Quote:

Originally Posted by BadgerDog (Post 2183045)
Also, I've been to project honeypot site and I can't find anywhere to register for an API key?
Regards,
Doug

http://www.projecthoneypot.org/httpbl_configure.php

BadgerDog 04-10-2011 08:42 PM

Quote:

Originally Posted by Gemma (Post 2183122)

Thank you ... appreciate that ... :up:

Regards,
Doug

Eric 04-12-2011 07:47 AM

SVN now available at: http://subversion.assembla.com/svn/v...ior/trunk/vb4/
Trac as well: http://trac.assembla.com/vb-bad-behavior/

BadgerDog 04-12-2011 09:56 AM

Quote:

Originally Posted by Eric (Post 2183726)

Sorry ... :confused:

I just updated to 1.0.2 ....

Do I need to do go to that site and do this SVN thing as well?

Also, what is Trac and is it something that goes with Bad Behavior?

Thanks ... add-on seems to be working very well so far and catches an incredible amount of intrusions on the front end, although it does block IE6 users.

Regards,
Doug

Alfa1 04-12-2011 10:12 AM

SVN is just a backup of the latest files.
Trac is a Project Tools for this addon.

You can add the issue with BB blocking IE6 here:
http://trac.assembla.com/vb-bad-behavior/newticket

Eric 04-21-2011 06:24 AM

Version 1.0.3, 04/21/2011
  • Fix #1: Pruning log doesn't work.
  • Fix #3: POST more than two days after GET (added support for BB's javascript)
  • Fix #5: Cannot modify header information error (suppressed error in BB's function)
  • Implemented #6: Filter per key (new admincp option to list keys not to be shown in log)
  • Implemented #9: Show link to member profile (if userid is found in headers, link to profile)
  • Changes: http://trac.assembla.com/vb-bad-beha...%40trunk%2Fvb4

BadgerDog 04-21-2011 09:54 AM

Updated to v1.0.3 with thanks .... :)

Sent PayPal donation previously ... :up:

Regards,
Doug

Boofo 04-22-2011 10:35 AM

Does this work on PHP 5.3.6 without any problems?

Eric 04-22-2011 02:36 PM

Quote:

Originally Posted by Boofo (Post 2187346)
Does this work on PHP 5.3.6 without any problems?

I've been testing on PHP 5.3.6, with no problems.

Eric 04-22-2011 02:47 PM

Quote:

Originally Posted by BadgerDog (Post 2186954)
Updated to v1.0.3 with thanks .... :)

Sent PayPal donation previously ... :up:

Regards,
Doug

Although I don't remember receiving it (admittedly I'm very forgetful), I appreciate it :)

KissOfDeath 04-22-2011 03:25 PM

Very bad mod for anyone interested in search engine traffic as it blocks all search engine spiders,

Uninstalled.

Eric 04-22-2011 03:34 PM

Quote:

Originally Posted by KissOfDeath (Post 2187451)
Very bad mod for anyone interested in search engine traffic as it blocks all search engine spiders,

Uninstalled.

What proof do you have that it does?

KissOfDeath 04-22-2011 03:59 PM

Quote:

Originally Posted by Eric (Post 2187453)
What proof do you have that it does?

because i tested it?

use a search engine spider simulator this google one for example:
Code:

http://www.smart-it-consulting.com/internet/google/googlebot-spoofer/
install the mod and search one of your pages it will return a 403, uninstall/disable the mod and it returns to normal,

anyone using google tools can also submit a sitemap and see the full list of urls returned as error pages

Eric 04-22-2011 04:10 PM

Quote:

Originally Posted by KissOfDeath (Post 2187469)
because i tested it?

use a search engine spider simulator this google one for example:
Code:

http://www.smart-it-consulting.com/internet/google/googlebot-spoofer/
install the mod and search one of your pages it will return a 403, uninstall/disable the mod and it returns to normal,

anyone using google tools can also submit a sitemap and see the full list of urls returned as error pages

So... you used something that spoofs the User-Agent? http://whois.domaintools.com/66.115.160.58 is the IP that site sent, obviously not owned by Google - the script checks the IP as well.

As for sitemaps, just checked that as well - no problems here, Google was able to access them just fine.

KissOfDeath 04-22-2011 04:15 PM

Quote:

Originally Posted by Eric (Post 2187477)
So... you used something that spoofs the User-Agent? http://whois.domaintools.com/66.115.160.58 is the IP that site sent, obviously not owned by Google - the script checks the IP as well.

As for sitemaps, just checked that as well - no problems here, Google was able to access them just fine.

my google sitemap is showing a list of errors on every page and adsense adverts are not displaying as the adsense spider can not access the page either,

if you have view spiders enabled on your forums you should notice that no spiders are showing after installing this

could possibly be a conflict with another mod, i'll do some checking

Alfa1 04-22-2011 05:55 PM

Quote:

Originally Posted by KissOfDeath (Post 2187480)
my google sitemap is showing a list of errors on every page and adsense adverts are not displaying as the adsense spider can not access the page either,

if you have view spiders enabled on your forums you should notice that no spiders are showing after installing this

could possibly be a conflict with another mod, i'll do some checking

I have no such issue on my site. What settings do you use?

rob01 04-22-2011 06:18 PM

how this work with vbseo?

i got a ip 74.86.16.2, which it seems it got blocked , not sure :S

Welshy2008 04-22-2011 11:16 PM

*Tagged*

Thank You.

error10 04-25-2011 06:14 AM

Hey all,

For some reason I wasn't getting notifications despite being subscribed to the thread. I went back through the messages to see what I might have missed that needs my attention:

Quote:

Originally Posted by baghdad4ever (Post 2181901)
i had high load in my server, can i get some benefit from this?

Yes. In the thread for the 3.8 version of Bad Behavior. Alfa1 said his server load dropped from 38 to 0.7. I've heard very similar stories over the years, and indeed, this is one of the things that Bad Behavior does well.

Quote:

Originally Posted by KissOfDeath (Post 2187480)
my google sitemap is showing a list of errors on every page and adsense adverts are not displaying as the adsense spider can not access the page either,

Some Google IP addresses were missing from Bad Behavior because Google never used them for crawling before. Apparently they're feeling the crunch from the IP address shortage. All of the remaining Google IP address ranges that I know of will be in the next update, which should be out later today.

BadgerDog 04-25-2011 09:29 AM

Quote:

Originally Posted by KissOfDeath (Post 2187480)
my google sitemap is showing a list of errors on every page and adsense adverts are not displaying as the adsense spider can not access the page either,

if you have view spiders enabled on your forums you should notice that no spiders are showing after installing this

could possibly be a conflict with another mod, i'll do some checking

Seems to be working just fine on our site using 4.04 .... :confused:

Haven't seen any change in spider activity or viewing activity using our Google Analytics software.

Regards,
Doug

Eric 04-25-2011 06:04 PM

Updated Bad Behavior core to 2.1.13, but it may be a little bit before an official release of the mod, as I plan on making further changes. For the time being:

http://trac.assembla.com/vb-bad-beha...engine.inc.php
http://trac.assembla.com/vb-bad-beha...r/core.inc.php

You can download those files, then overwrite the corresponding files in: /yourforum/includes/bad-behavior/

BadgerDog 04-25-2011 07:21 PM

Quote:

Originally Posted by Eric (Post 2188556)
Updated Bad Behavior core to 2.1.13

Updated with thanks ... :up:

Regards,
Doug

jsalgado1981 04-26-2011 08:17 AM

Thank you I just installed it

Eric 04-28-2011 09:42 AM

Updated...

Version 1.0.4, 04/28/2011
- Bad Behavior upgraded to 2.1.13 (fixes search engine block issues)
- Added Paypal/Paypal IPN IP address to the whitelist.
- Added payment gateway file names to the whitelist.
- Changes: http://trac.assembla.com/vb-bad-beha...%40trunk%2Fvb4

evilTone 05-09-2011 06:22 PM

installed and ran for a day to test. seems to have issues with members running IE6 (they cannot upgrade them due to corperate policies in place )

snippets from log
Code:

62.25.XXX.XXX UserID:26

2011-05-09 14:17:08        dfd9b1ad

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)

GET        HTTP/1.1

/showthread.php?t=21964&p=236004#post236004

GET /showthread.php?t=21964&p=236004#post236004 HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Accept-Encoding: gzip, deflate
Accept-Language: en-gb
Connection: keep-alive
Cookie: hof_lastvisit=1274088582; hof_lastactivity=0; hof_userid=26; hof_password=7bd4d08dcb9ec682962e66b989a56fd5; hof_thread_rate=0ee4b525f1cf08b89a7e7569f2bc6bd7f4ec7cdca-2-%7Bi-10584_i-5_i-10701_i-5_%7D; hof_; bb2_screener_=1304950617+62.25.109.195; skimlinks_enabled=1
Host: www.hof.org.uk
Pragma: no-cache
Referer: http://www.hof.org.uk/newreply.php?p=236001&noquote=1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)

happening to around 10 people sofar but have disabled while i try to sort out the issue with IE6, if that is indeed the cause

user agents for another two having issues
Code:

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8; .NET4.0C; .NET4.0E)
Code:

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
thanks in advance :)

error10 05-12-2011 05:22 PM

Quote:

Originally Posted by evilTone (Post 2193744)
installed and ran for a day to test. seems to have issues with members running IE6 (they cannot upgrade them due to corperate policies in place )

snippets from log
Code:

62.25.XXX.XXX UserID:26

2011-05-09 14:17:08        dfd9b1ad

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)

GET        HTTP/1.1

/showthread.php?t=21964&p=236004#post236004

GET /showthread.php?t=21964&p=236004#post236004 HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Accept-Encoding: gzip, deflate
Accept-Language: en-gb
Connection: keep-alive
Cookie: hof_lastvisit=1274088582; hof_lastactivity=0; hof_userid=26; hof_password=7bd4d08dcb9ec682962e66b989a56fd5; hof_thread_rate=0ee4b525f1cf08b89a7e7569f2bc6bd7f4ec7cdca-2-%7Bi-10584_i-5_i-10701_i-5_%7D; hof_; bb2_screener_=1304950617+62.25.109.195; skimlinks_enabled=1
Host: www.hof.org.uk
Pragma: no-cache
Referer: http://www.hof.org.uk/newreply.php?p=236001&noquote=1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)

happening to around 10 people sofar but have disabled while i try to sort out the issue with IE6, if that is indeed the cause

user agents for another two having issues
Code:

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8; .NET4.0C; .NET4.0E)
Code:

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
thanks in advance :)

Gawd, I wish IE6 would just die already.

Anyway, I'll take care of this in the next release.

evilTone 05-12-2011 06:03 PM

ok, thanks mate, corperate users are a pain ;-)


All times are GMT. The time now is 01:04 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01629 seconds
  • Memory Usage 1,866KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_code_printable
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete