vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   4.2.1 PL1 hacked, what to look for in logs (https://vborg.vbsupport.ru/showthread.php?t=313608)

ifitsmedia 08-10-2014 04:44 PM

4.2.1 PL1 hacked, what to look for in logs
 
Recently I started finding new admin users that appear to be injected into my database. They don't have any associated IP addresses. So far they have not been able to do anything in admincp, presumably because I have the directory password protected. I did an extensive file check and nothing seems to be out of the ordinary.

What can I search for in raw access logs to determine how this is happening?

ozzy47 08-10-2014 04:48 PM

Please read the following two blog posts:
http://www.vbulletin.com/forum/blogs...ve-been-hacked
http://www.vbulletin.com/forum/blogs...vbulletin-site
Also please see these recent security announcements:
vBulletin 4.1.x-4.2.x & All versions of vBulletin 5: http://www.vbulletin.com/forum/forum...-1-vbulletin-5
vBulletin 5.0.x patch released, for a different security issue: http://www.vbulletin.com/forum/forum...d-all-versions

ifitsmedia 08-10-2014 05:03 PM

Thanks ozzy. I'm familiar with those (and also this) but didn't find (or maybe I missed) what to search for in the access logs.

I have already taken all steps in the guide "Fixing your site after you have been hacked" several times, but continue to get admin users injected in my database.

Any help with searching raw access logs to determine how it's being done would be appreciated.

tpearl5 08-10-2014 05:23 PM

It sounds like there is still a backdoor somewhere. Remember that they probably can't access the admincp, but they can still insert data via whatever method they are using to get in. It could be something appended to a plugin or template. I would install the plugin search mod and search plugins and templates for things like base64 and display:none (which is actually used in some templates)

Make sure you look carefully at Maintenance > Diagnostics > Suspect file versions for unexpected contents.

You should update to 4.2.2 pl1.

Also, if you have wordpress installed - I recently restored a hacked vbulletin and found that their WP install even had things inserted into the files/templates. Make sure to take a close look at WP or any other software packages if you have them.

I'm assuming you already removed the install directory...

ifitsmedia 08-10-2014 05:40 PM

Thanks tpearl5. Yes, install dir was already removed.

I also suspect there is a backdoor somewhere, or a file that is vulnerable to sql injection. I'm wondering if there are some strings I can search my apache raw access logs for to identify the culprit.

I thoroughly checked all files identified in Maintenance > Diagnostics > Suspect file versions. I found and removed a number of files that were left over from previous versions of VB and old/uninstalled mods. All the files left (current mods I am using) seem to be ok, I didn't see anything unusual in them. I replaced all VB core files with freshly downloaded copies.

VB 4.2.1 PL1 is not known to have security vulnerabilities as far as I am aware. I'll probably upgrade to 4.2.2 anyway, but I'm not sure it will fix this.

ozzy47 08-10-2014 05:43 PM

If you have a backdoor somewhere, upgrading will not fix it.

Did you happen to check for any unknown plugins?

ifitsmedia 08-10-2014 05:47 PM

I've been keeping an eye on plugins and don't see anything unusual.

ozzy47 08-10-2014 05:54 PM

Then it has to be a file in the folders, a vulnerability in a mod, or a security issue on the server.

Do you happen to have vBSEO installed?

ifitsmedia 08-10-2014 05:57 PM

I did have VBSEO installed the first time this happened. I suspected it might be the culprit so I switched to DBSEO and removed VBSEO and all it's files. Unfortunately it continued after removing VBSEO.

ozzy47 08-10-2014 06:00 PM

Then there might be something lurking around from when you had vBSEO installed.

What other modifications have you got installed?
And are all the modifications from official vB sites?

ForceHSS 08-10-2014 06:02 PM

Check admincp/Plugins & Products/Plugin Manager many people don't look in there so its always over loooked

ifitsmedia 08-10-2014 06:13 PM

I installed Search Plugins and ran a few searches including base64, nothing turned up. Any other terms I should search for?

With the exception of Tapatalk, all mods I am using are from vbulletin.org and DB Tech. They are:

https://vborg.vbsupport.ru/showthread.php?t=228825
https://vborg.vbsupport.ru/misc.php?...id=chgtpowner4
https://vborg.vbsupport.ru/showthread.php?t=256383
https://vborg.vbsupport.ru/misc.php?...=forumtags_vb4
https://vborg.vbsupport.ru/misc.php?...d=ms_fwsfut_40
https://vborg.vbsupport.ru/showthread.php?t=248042
https://vborg.vbsupport.ru/showthrea...237650&page=10
https://vborg.vbsupport.ru/showthread.php?t=235841
https://vborg.vbsupport.ru/showthread.php?t=236127
https://vborg.vbsupport.ru/showthread.php?t=233309

http://www.dragonbyte-tech.com/produ...?dbtech_thanks
http://www.dragonbyte-tech.com/produ...dbtech_usertag
http://www.dragonbyte-tech.com/produ...ch_ajaxthreads
http://www.dragonbyte-tech.com/produ...tech_copyright
http://www.dragonbyte-tech.com/produ...ch_ajaxthreads
http://www.dragonbyte-tech.com/product.php?dbtech_dbseo

--------------- Added [DATE]1407698059[/DATE] at [TIME]1407698059[/TIME] ---------------

Thanks ForceHSS, I did check in plugin manager and don't see anything unusual.

ozzy47 08-10-2014 06:15 PM

Hmmm, none of those mods have any issues that I have ever heard of. :confused:

ozzy47 08-10-2014 06:17 PM

Try installing this mod, and see if it turns up anything, https://vborg.vbsupport.ru/showthread.php?t=304190

ifitsmedia 08-10-2014 06:25 PM

Quote:

Originally Posted by ozzy47 (Post 2510708)
Try installing this mod, and see if it turns up anything, https://vborg.vbsupport.ru/showthread.php?t=304190

That does turn up a number of warnings, but they are not specific as to why.

It seems to check for anything modified within the past 3 months, which happens to be a lot because I have been doing updates recently.

ozzy47 08-10-2014 06:28 PM

Correct, so if you see something that has been modified, and you don't remember modifying it, best to check into it.

ifitsmedia 08-10-2014 06:30 PM

Checking them all now, nothing amiss so far.

ozzy47 08-10-2014 06:32 PM

When is the last time you updated TapaTalk, I remember there was a vulneribility in it back in May or so.

ozzy47 08-10-2014 06:34 PM

Also have you checked your notices to see if there is anything in there?

ifitsmedia 08-10-2014 06:34 PM

Under 'Forums' that mod tells me "4 forums contain potentially malicious code" - but I have no idea why or how to check them. All the other warnings seem to be false positives.

I have scanned all files with ClamAV and Sucuri server side scanner, nothing turned up.

--------------- Added [DATE]1407699424[/DATE] at [TIME]1407699424[/TIME] ---------------

Tapatalk is currently the latest version. I upgraded it a few weeks before any of the problems started. Before that I was running an older version of it for a while.

Nothing unusual in notices, only the ones that I made.

ozzy47 08-10-2014 06:39 PM

Does it happen to list the forums?

ifitsmedia 08-10-2014 06:41 PM

Yea it does list the forums. Checking them, it seems to flag the forums that have an HTML link in the forum description. Nothing harmful, just internal links pointing to rules etc.

ForceHSS 08-10-2014 06:45 PM

If you allow any group to use even the admin group you should never allow html to be used

ozzy47 08-10-2014 06:48 PM

Hmmm, I am at a loss then. Sounds like you might just have to pay someone to clean up your site.

If you decide to go that route, I would suggest, TheLastSuperman, he has done quite a few cleanup's after a hack on boards.

ifitsmedia 08-10-2014 06:50 PM

Quote:

Originally Posted by ForceHSS (Post 2510721)
If you allow any group to use even the admin group you should never allow html to be used

Can you explain this more?

ozzy47 08-10-2014 06:53 PM

He is talking about, ACP --> Forums & Moderators --> Forum Manager, in each forum you have a option, Allow HTML that should always be NO

Which I know is not what you were talking about.

ifitsmedia 08-10-2014 06:54 PM

Quote:

Originally Posted by ozzy47 (Post 2510724)
Hmmm, I am at a loss then. Sounds like you might just have to pay someone to clean up your site.

If you decide to go that route, I would suggest, TheLastSuperman, he has gone quite a few cleanup's after a hack on boards.

Thanks a lot for your time and help ozzy. I'm at a loss as well.

If it were a vulnerability in VB core, I would expect to find more people posting similar stories. How it's happening on my site is eluding me though.

I think searching the Apache raw access logs may reveal the exploit being used, but I don't know what to search for.

ForceHSS 08-10-2014 06:54 PM

There is also a option in each user group that it needs disabled

ozzy47 08-10-2014 06:55 PM

Yeah I would not be sure what to look for either. :(

ifitsmedia 08-10-2014 06:55 PM

Quote:

Originally Posted by ozzy47 (Post 2510732)
He is talking about, ACP --> Forums & Moderators --> Forum Manager, in each forum you have a option, Allow HTML that should always be NO

Which I know is not what you were talking about.

Ok, that is set to NO of course.

ozzy47 08-10-2014 06:56 PM

And I assume the same thing for each usergroup?

ifitsmedia 08-10-2014 06:57 PM

Yes, HTML is disabled in all usergroups as well.

ozzy47 08-10-2014 06:59 PM

And you have went through all the php files in your forum root, and there is nothing there that should not be?

ForceHSS 08-10-2014 07:04 PM

Have you changed all passwords for all admins, FTP and capnel if not it needs done. The next step is to hire someone to find out how you have been hacked

ozzy47 08-10-2014 07:05 PM

How about any erroneous cron jobs? ACP --> Scheduled Tasks --> Scheduled Task Manager

ifitsmedia 08-10-2014 07:07 PM

I ran Maintenance > Diagnostics > Suspect file versions and checked every file that had a notice. Aside from some older files from previous versions of VB and old plugins, nothing was out of place.

I replaced all VB core files with fresh downloads, and replaced most plugin files as well.

Sucuri and ClamAV didn't find anything either.

--------------- Added [DATE]1407701446[/DATE] at [TIME]1407701446[/TIME] ---------------

Quote:

Originally Posted by ozzy47 (Post 2510743)
How about any erroneous cron jobs? ACP --> Scheduled Tasks --> Scheduled Task Manager

Those all seem to be ok as far as I can tell. There's a couple from mods and the rest look like core VB tasks.

tpearl5 08-10-2014 07:16 PM

Quote:

Originally Posted by ifitsmedia (Post 2510693)
Thanks tpearl5. Yes, install dir was already removed.

I also suspect there is a backdoor somewhere, or a file that is vulnerable to sql injection. I'm wondering if there are some strings I can search my apache raw access logs for to identify the culprit.

I'm not sure anything would appear in the access logs, but you may want to look at and sort by the modified dates of any files (not just vbulletin ones).

doctorsexy 08-10-2014 07:18 PM

Why are you on 4.2.1 and not 4.2.2

ifitsmedia 08-10-2014 07:21 PM

It was due to incompatibility with a mod I was using. I'm no longer using it and will be upgrading, but I don't think 4.2.1 PL1 -> 4.2.2 PL1 fixes any security issues.

ozzy47 08-10-2014 09:24 PM

Looks like you may have to resort to paying to have it sorted. :(


All times are GMT. The time now is 04:42 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.01365 seconds
  • Memory Usage 1,820KB
  • 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
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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