PDA

View Full Version : Administrative and Maintenance Tools - Check If Your Forum Was Hacked


SEOvB
11-04-2013, 11:00 PM
//////////////////////////////////
// This Script is Brought To You By: SEOvB | Affordable vBulletin Services (http://seovb.com)
//////////////////////////////////

As most of us know, a vulnerability in the install directory was recently found in vBulletin. Due to this vulnerability, thousands of vBulletin-powered sites got hacked; hackers managed to gain access to the AdminCP to inject malicious content.

When a forum is first hacked, hackers create admin accounts for themselves, and that's actually the time where cleanup is most required, to fence off the hackers and enhance security. But, majority of forum owners don't even know they actually got hacked until Google puts a veil on their forum with malware warning page.

At that point, removing the install directory, the main point of entry for hackers, won't help because the forum has already been compromised, and a more thorough checkup is needed to ensure that no malicious code has been injected.


- What This Script Does ?
This script will scan forum templates, plugins, phrases, announcements and forum titles and descriptions to detect potential and confirmed malicious code. It will give you the information you need to determine whether or not your forum has been hacked, and a recommendation on what action to take next.

- Demo Link
You can view a live demo of the script here (http://demo.seovb.com/SEOvB_Hack_Checker.php).

- How to Upload:
Upload SEOvB_Hack_Checker.php in root of forum files on server (Within public_html if forum is installed on root, upload in any other directory if forum is installed on /public_html/exampledirectory)

- How to Access the Script:
Point your browser's address bar to open www.YOURFORUMURL.com/forum/SEOvB_Hack_Checker.php (Case sensitive and suppose if forum is installed into /forum/ directory on server.)

- New Templates
None.

- Database Changes
None.

- Setup Instructions
No setup is needed.

- What does it do?
It tests for potential and confirmed malicious code in certain sections of your forum database, and it arranges the test results in an easy-to-read table.

If you receive a 'Warning' message, it means that the script detects some code or recent change to your forum that may be cause for concern, but isn't for certain a hack. The script scans for changes made within the last 3 months, so if you have made many changes to your forum skin or mod assortment within the past 3 months, there may be some false positives.

You can review the extra information in the test results section to determine whether or not your forum needs further cleaning. However, even with just one 'Warning', we highly recommend a full investigation and cleanup process to make sure that your forum is safe.

If you receive a 'Hacked' message, it means that your forum has definitely been compromised, and a thorough cleanup needs to be performed ASAP.

If you receive only 'All Clear' messages, it means that your forum has not been hacked.

- Requirements
Should work on all vBulletin versions of 4.x.x

- Uninstall Instructions
Delete SEOvB_Hack_Checker.php file from root of forum files.

- FAQs

- After I remove malicious items from my forum, what this script will do ?
It will say 'All Clear' for the cleared items.

- Some of the items are coming with 'All Clear' except 1, what does it mean ?
Your forum may require cleanup.

- Will it tell me which items are containing warning ?
Yes, it will. It will let you know, if templates are infected, with the template name and last modified by whom.

ForceHSS
11-05-2013, 03:03 PM
I tested this on a fresh install test site that has only been up a day and have not logged into it from the time I installed it and that was only 20 hrs ago and it shows i have malicious code warnings. Sorry to say your code finds nothing

NarutoFTW
11-05-2013, 03:06 PM
I have warning on every single one lol.

Disco_Dave
11-05-2013, 03:09 PM
Hi

I installed this on a test database just to see what it came up with, it is showing some errors. But this opens up a whole new ball game for me, because I/we use the things that where showing up as an error or warning.

Dave

SEOvB
11-05-2013, 03:29 PM
I tested this on a fresh install test site that has only been up a day and have not logged into it from the time I installed it and that was only 20 hrs ago and it shows i have malicious code warnings. Sorry to say your code finds nothing

Hello there,

Could you please send us the URL in private message where the script is uploaded ? We will look into it.

Hi

I installed this on a test database just to see what it came up with, it is showing some errors. But this opens up a whole new ball game for me, because I/we use the things that where showing up as an error or warning.

Dave

Hello Dave,

Please, send us the URL through private message where that script is uploaded. We will check the errors you are having.

ForceHSS
11-05-2013, 03:33 PM
Hello there,

Could you please send us the URL in private message where the script is uploaded ? We will look into it.
.
Its a test site that has .htaccess to get into it as per vb rules of setting up a test site. Trust me the site is clean why don't you put a test site up yourself and test it u will see

puertoblack2003
11-05-2013, 04:43 PM
good concept. But every single one that was flagged is the one's i customized in template.:confused:

Max Taxable
11-05-2013, 04:45 PM
I mean, this is a nice idea and all but how is it any more useful than the native vBulletin file and folder checker?

SEOvB
11-06-2013, 02:46 AM
Hey All,

The reason the script is spitting out so many warnings is because the searching criteria for some of the tests err on the side of caution, which is why we added all of the extra test information in the Details column, to give the user the ability to judge for himself what needs attention.

Basically, the script is not for use on a fresh install of vBulletin because some of the tests only check for changes made (e.g. templates) in the past 3 months, and freshly installed vB forums will have templates modified past that threshold.

Sorry for the confusion, we've modified the mod description to more accurately reflect what the script does.

Thanks,
Nick - Chief vB Developer @ SEOvB

SEOvB
11-06-2013, 02:48 AM
I mean, this is a nice idea and all but how is it any more useful than the native vBulletin file and folder checker?

Hey Max,

This script is actually a perfect companion tool to the native vB file and folder checker. That tool addresses issues with the filesystem, while our script addresses issues with the database.

Thanks,
Nick - Chief vB Developer @ SEOvB

winky8300
11-06-2013, 01:37 PM
hello

thank you very much concerned about the safety of our forums

scottct1
11-06-2013, 04:54 PM
I try running it and I get the following message..

Access denied.

SEOvB
11-07-2013, 01:02 AM
I try running it and I get the following message..

Access denied.

Hi Scott,

Is that the entirety of the message? This may be an issue with the file permissions on the script or with your webserver configuration. Try to set the file permission on the script to 755 and run it again. If that doesn't solve the issue, please send us a PM with a link to the script on your site, and we can take a look.

Thanks
Nick - Chief vB Developer @ SEOvB

AK47-
11-07-2013, 09:20 AM
Malicous hooks to inject with are
Ajax_complete
init_startup
global_start
A new method which will remain private.

Hope i helped

ozzy47
11-07-2013, 11:10 AM
IMO this seems to have potential. What I think would be the best way to see this workin is the following.

1. Change it from 3 months to 24 hrs. Due to the fact that the report will contain way to many false positives to try and sift through when you run it.

2. Create a table in the DB to store the report info.

3. Create a cron job that runs once a day. When it runs store the info in the previously created table. Maybe also add user id and IP info to the table, may make it easier to identify if it was a valid change to something, or from a hacker.

4. Set up a page in the acp that you can view the daily reports from. Have the ability to prune the entries in the table there by date.

Wolver2
11-08-2013, 01:20 PM
I appreicate this mod very much. I was wondering what if there were malicious things that happened around 6 months ago? should I still use this plugin?

SEOvB
11-08-2013, 01:44 PM
I appreicate this mod very much. I was wondering what if there were malicious things that happened around 6 months ago? should I still use this plugin?

If you're familiar with php then you can just adjust this line:

$threshold = $curtime - (60 * 60 * 24 * 30 * 3);

Change the last "3" to "6" then it'll cover the last 6 months.

Hope that it helps.

Disasterpiece
11-18-2013, 02:52 PM
I think this scripts output is generally misleading and causes panic where not necessary.

Either you should seriously refine your script and add A LOT more conditions to reduce false positives (and as it seems right now, 95% seems to be only false positives) or discontinue the mod.

Determining if a forum was hacked should be left to specialists. If you let someone who doesn't have a clue run your script, nothing good will come from it.

SEOvB
11-20-2013, 02:19 AM
I think this scripts output is generally misleading and causes panic where not necessary.

Either you should seriously refine your script and add A LOT more conditions to reduce false positives (and as it seems right now, 95% seems to be only false positives) or discontinue the mod.

Determining if a forum was hacked should be left to specialists. If you let someone who doesn't have a clue run your script, nothing good will come from it.

Hi Disasterpiece,

We understand where you are coming from; the script errs on the side of caution, perhaps too much. This was originally an in-house tool that we used to quickly determine which commonly exploited sets of data needed investigating for forums that had been recently hacked. If time allows, we can refine and update the scan criteria of the script to be more precise.

However, we do disagree that the current script output is misleading and we disagree that it causes unnecessary panic. If a forum owner is concerned that his forum was hacked, which is highly likely given the recent mass attacks on vBulletin forums, we believe that this script is a good starting point for investigation and diagnosis, if the script description and instructions are carefully read and followed.

The script does not stop with a simple 'warning', but provides additional, useful information about what was modified and by whom. More information is better than less, and caution is better than carelessness, so the script provides as much information as it can, for those forum owners with some vBulletin knowledge who can understand the script output, and it also provides the most careful recommendation, for those with less vBulletin knowledge.

We do realize that this script alone is not enough for a diagnosis, which is why we recommend professional help. Speaking of which, we are happy to take a look at your script output via PM, if you have concerns, to clarify your results; we've done this a few times already.

Thanks,
Nick - Chief vB Developer @ SEOvB