Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Check 4 Hack - Finds infected Datastore Entries Details »»
Check 4 Hack - Finds infected Datastore Entries
Version: 1.00, by Hoffi Hoffi is offline
Developer Last Online: Mar 2016 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 4.1.4 Rating:
Released: 06-26-2011 Last Update: Never Installs: 152
Uses Plugins
Additional Files Translations  
No support by the author.

Many Users have Problems with infected Webservers.

I wrote a small Cron-Job that searches the datastore for possible infects and tried to repair them.

1.0 Initial relase with one check:
Checks if a base64 Code resists in the Datastore. If it's found in the pluginlist, the Datastore will be rebuild.

For more Checks, tell them. I'll add them.

The Cron Job will be started every 20 Min, and sends a Mail to the entered Mailadress, or if non entered, to the webmaster eMail-adress.

Install:

Upload the upload Directory and install the XML File.

German Version is also integrated.

If you want to check the Plugin, enable the Demo-Plugin which is installed, too. Only if it's enabled, the Check will find this.

If this Mod detects an infect, please do not lean back! Research it, and fix your security Hole!

Download Now

File Type: zip c4h.zip (2.8 KB, 1147 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
8 благодарности(ей) от:
djbaxter, fahris, furnival, Lee G, strudinox, TheLastSuperman, Toxic2

Comments
  #112  
Old 03-20-2014, 03:45 AM
whodah whodah is offline
 
Join Date: Feb 2004
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looks like there are two legit base64 in 4.2.2 PL1 -- ya?

Code:
if ((!$message = base64_decode($vbulletin->GPC['pm_message']))) {
and

Code:
!($pagetext = base64_decode($vbulletin->GPC['html']))
everyone agree?
Reply With Quote
  #113  
Old 03-24-2014, 06:59 PM
Andy.H Andy.H is offline
 
Join Date: Feb 2013
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm... we're running 4.2.0 PL4 with the scheduled task running and it's not detecting those lines? Maybe they don't appear in 4.2.0?

Which files did you find them in?

PS: nice addition with the detection
Reply With Quote
  #114  
Old 03-24-2014, 08:10 PM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by whodah View Post
Looks like there are two legit base64 in 4.2.2 PL1 -- ya?

Code:
if ((!$message = base64_decode($vbulletin->GPC['pm_message']))) {
and

Code:
!($pagetext = base64_decode($vbulletin->GPC['html']))
everyone agree?
This is not in the code by default if you have this then you have an infection
Reply With Quote
  #115  
Old 03-24-2014, 08:51 PM
whodah whodah is offline
 
Join Date: Feb 2004
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Andy.H and ForceHSS,

Interesting... Digging deeper. The thing that makes me suspect is that I have a backup install on another server, different pw's, that is 100% .htaccess protected (front end and admin end) which has those same two lines...

Digging, will report back...
Reply With Quote
  #116  
Old 03-24-2014, 09:10 PM
whodah whodah is offline
 
Join Date: Feb 2004
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ForceHSS:

Are you sure you are 4.2.2 PL1 ? If so, do your install files fresh from vB not have this?
Code:
includes/xml/product-panjo.xml:         if ((!$message = base64_decode($vbulletin->GPC['pm_message']))) {
includes/xml/product-panjo.xml:                 !($pagetext = base64_decode($vbulletin->GPC['html']))
BTW: I thought it might be interesting to note the other base64_(encode|decode) stuff off a fresh 4.2.2PL1 download:

Code:
[root@hurley upload]# grep -RIi base64_decode *
asset.php:      $filedata = vb_base64_decode('STRING_REPLACED_BY_WHODAH==');
attachment.php:         $filedata = vb_base64_decode('STRING_REPLACED_BY_WHODAH==');
blog_attachment.php:    $filedata = vb_base64_decode('STRING_REPLACED_BY_WHODAH==');
cron.php:$filedata = vb_base64_decode('STRING_REPLACED_BY_WHODAH==');
includes/adminfunctions_template.php:                           $vbulletin->db->escape_string(vb_base64_decode($stylevardfn['validation'])) . "', '" .
includes/adminfunctions_template.php:                           $vbulletin->db->escape_string(vb_base64_decode($stylevardfn['failsafe'])) . "', 0, 0
includes/adminfunctions_template.php:           $value = vb_base64_decode($stylevar['value'][0]);
includes/adminfunctions_template.php:           $decode[$stylevars['name']] = vb_base64_decode($stylevars['value'][0]);
includes/facebook/base_facebook.php:    return base64_decode(strtr($input, '-_', '+/'));
includes/functions.php:function vb_base64_decode($string)
includes/functions.php: if (function_exists('base64_decode'))
includes/functions.php:         return base64_decode($string);
includes/functions.php:         return ($decode ? vb_base64_decode($return) : $return);
includes/xml/product-panjo.xml:         if ((!$message = base64_decode($vbulletin->GPC['pm_message']))) {
includes/xml/product-panjo.xml:                 !($pagetext = base64_decode($vbulletin->GPC['html']))
picture.php:    $filedata = vb_base64_decode('STRING_REPLACED_BY_WHODAH==');
[root@hurley upload]# grep -RIi base64_encode *
admincp/navigation.php: $name .= '_' . strtolower(substr(vb_base64_encode(TIMENOW),4,4));
forumrunner/push.php:    $msgargs = array(base64_encode(prepare_utf8_string($vbulletin->options['bbtitle'])));
forumrunner/push.php:       $msgargs[] = base64_encode(count($pms));
forumrunner/push.php:       $msgargs[] = base64_encode(prepare_utf8_string($first_pm['fromusername']));
forumrunner/push.php:       $msgargs[] = base64_encode(count($subs));
forumrunner/push.php:       $msgargs[] = base64_encode(prepare_utf8_string($first_sub['title']));
forumrunner/support/Snoopy.class.php:                   $headers .= "Authorization: Basic ".base64_encode($this->user.":".$this->pass)."\r\n";
forumrunner/support/Snoopy.class.php:                   $headers .= 'Proxy-Authorization: ' . 'Basic ' . base64_encode($this->proxy_user . ':' . $this->proxy_pass)."\r\n";
forumrunner/support/Snoopy.class.php:                   $headers[] = "Authorization: BASIC ".base64_encode($this->user.":".$this->pass);
includes/adminfunctions_plugin.php:                                     'validation' => vb_base64_encode($stylevar['validation']),
includes/adminfunctions_plugin.php:                                     'failsafe'   => vb_base64_encode($stylevar['failsafe'])
includes/adminfunctions_plugin.php:                             'value' => vb_base64_encode($stylevar['value'])
includes/adminfunctions_plugin.php:                                             'validation' => vb_base64_encode($stylevar['validation']),
includes/adminfunctions_plugin.php:                                             'failsafe'   => vb_base64_encode($stylevar['failsafe'])
includes/adminfunctions_plugin.php:                                     'value' => vb_base64_encode($stylevar['value'])
includes/adminfunctions_template.php:                                   'validation' => vb_base64_encode($stylevar['validation']),
includes/adminfunctions_template.php:                                   'failsafe'   => vb_base64_encode($stylevar['failsafe'])
includes/adminfunctions_template.php:                           'value' => vb_base64_encode($stylevar['value'])
includes/adminfunctions_template.php:                                   'value' => vb_base64_encode($stylevar)
includes/class_mail.php:                                        if (!$this->sendMessage(vb_base64_encode($this->smtpUser), 334) OR !$this->sendMessage(vb_base64_encode($this->smtpPass), 235))
includes/facebook/base_facebook.php:   * Exactly the same as base64_encode except it uses
includes/facebook/base_facebook.php:   * Exactly the same as base64_encode except it uses
includes/facebook/base_facebook.php:    $str = strtr(base64_encode($input), '+/', '-_');
includes/functions.php:function vb_base64_encode($string)
includes/functions.php: if (function_exists('base64_encode'))
includes/functions.php:         return base64_encode($string);
includes/functions.php:         $string = vb_base64_encode($string);
vb/verticalresponse.php:                    'contents'  => vb_base64_encode($members),
[root@hurley upload]#
Reply With Quote
  #117  
Old 03-24-2014, 09:24 PM
whodah whodah is offline
 
Join Date: Feb 2004
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Andy.H: for completness, I checked out 4.2.0PL4, and it looks like those lines are not in there:

Code:
[root@hurley upload]# grep -RIi base64_decode *
asset.php:      $filedata = vb_base64_decode('STRING_REPLACED_BY_WHODAH==');
includes/adminfunctions_template.php:                           $vbulletin->db->escape_string(vb_base64_decode($stylevardfn['validation'])) . "', '" .
includes/adminfunctions_template.php:                           $vbulletin->db->escape_string(vb_base64_decode($stylevardfn['failsafe'])) . "', 0, 0
includes/adminfunctions_template.php:           $value = vb_base64_decode($stylevar['value'][0]);
includes/adminfunctions_template.php:           $decode[$stylevars['name']] = vb_base64_decode($stylevars['value'][0]);
includes/facebook/base_facebook.php:    return base64_decode(strtr($input, '-_', '+/'));
includes/functions.php:function vb_base64_decode($string)
includes/functions.php: if (function_exists('base64_decode'))
includes/functions.php:         return base64_decode($string);
includes/functions.php:         return ($decode ? vb_base64_decode($return) : $return);
[root@hurley upload]# grep -RIi base64_encode *
admincp/navigation.php: $name .= '_' . strtolower(substr(vb_base64_encode(TIMENOW),4,4));
includes/adminfunctions_plugin.php:                                     'validation' => vb_base64_encode($stylevar['validation']),
includes/adminfunctions_plugin.php:                                     'failsafe'   => vb_base64_encode($stylevar['failsafe'])
includes/adminfunctions_plugin.php:                             'value' => vb_base64_encode($stylevar['value'])
includes/adminfunctions_plugin.php:                                             'validation' => vb_base64_encode($stylevar['validation']),
includes/adminfunctions_plugin.php:                                             'failsafe'   => vb_base64_encode($stylevar['failsafe'])
includes/adminfunctions_plugin.php:                                     'value' => vb_base64_encode($stylevar['value'])
includes/adminfunctions_template.php:                                   'validation' => vb_base64_encode($stylevar['validation']),
includes/adminfunctions_template.php:                                   'failsafe'   => vb_base64_encode($stylevar['failsafe'])
includes/adminfunctions_template.php:                           'value' => vb_base64_encode($stylevar['value'])
includes/adminfunctions_template.php:                                   'value' => vb_base64_encode($stylevar)
includes/class_mail.php:                                        if (!$this->sendMessage(vb_base64_encode($this->smtpUser), 334) OR !$this->sendMessage(vb_base64_encode($this->smtpPass), 235))
includes/facebook/base_facebook.php:   * Exactly the same as base64_encode except it uses
includes/functions.php:function vb_base64_encode($string)
includes/functions.php: if (function_exists('base64_encode'))
includes/functions.php:         return base64_encode($string);
includes/functions.php:         $string = vb_base64_encode($string);
vb/verticalresponse.php:                    'contents'  => vb_base64_encode($members),
[root@hurley upload]#
Reply With Quote
  #118  
Old 03-24-2014, 09:34 PM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes I have them in default files as well not sure if all as I have not checked all of them but I am sure if it is a problem vb would post about it so don't worry about it
Reply With Quote
  #119  
Old 03-24-2014, 09:44 PM
Andy.H Andy.H is offline
 
Join Date: Feb 2013
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by whodah View Post
Andy.H: for completness, I checked out 4.2.0PL4, and it looks like those lines are not in there:
That would explain it then. It does leave you in a bit of a quandary if you're running 4.2.2 though. Does it generate any false positives when you run the task manually?
Reply With Quote
  #120  
Old 03-24-2014, 11:24 PM
whodah whodah is offline
 
Join Date: Feb 2004
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ForceHSS: roger that.

Andy.H: yup yup, false positives as of now. Did you see my post #110 above? I haven't had time to write a replace string for these two yet, but I'm thinking a similar notion would work here too. Thanks for the inspiration for that idea again. But really, we could keep whittling out false positives when they come up that way. (I think.)
Reply With Quote
  #121  
Old 05-08-2016, 07:39 PM
Azonaco Azonaco is offline
 
Join Date: Aug 2008
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This isn't working on version 4.2.2 for me. Any plans to update this mod?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:30 AM.


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.08236 seconds
  • Memory Usage 2,357KB
  • Queries Executed 28 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (7)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (7)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete