Vulnerable phpBB : Find and Disable.

Here’s a little script I wrote that attempts to find and disable old phpBB instances that may be vulnerable to the recent phpBB Worm in the wild.


#!/usr/bin/perl
# Name: Augie Schwer
# File: find-vuln.pl
# Date: 18, July 2005
# Purpose: Find vulnerable phpBBs and disable them.

use strict;

my ($line,$location,$user,$this_version,$newest_version);

$newest_version = '2005/06/26';

# where to search.
my $webdir = '/home/WWW_pages/';

# spawn sub shell and find the viewtopic.php and capture its version and location.
my @output = `find $webdir -type f -name viewtopic.php -print | xargs --verbose grep '\$Id: viewtopic.php,v' 2>&1`;

# parse out location and version.
foreach $line (@output)
{
if($line =~ /(.+?): .+ \$Id: viewtopic.php,v .+ (\d{4}\/\d{2}\/\d{2}) .+/)
{
$location = $1;
$this_version = $2;

# old phpBB, disable it.
if($this_version ne $newest_version)
{ print "OLD PHPBB\n" ; `chmod 000 $location`; }

print "Location: $location \n";
print "This V : $this_version \n";
print "New V : $newest_version \n";
}
}

This entry was posted in General, work and tagged , , , , . Bookmark the permalink.

6 Responses to Vulnerable phpBB : Find and Disable.

  1. Nat says:

    Yay Augie! You kill those viruses. Show them whose boss (though this really only finds those vulnerable, so its sorta like going up to someone and saying, ” you sir, can catch a cold. Just so you know”) Anyway, thats very cool, nice job

  2. augie says:

    You missed this part then:

    `chmod 000 $location`;

    which will rid them of the cold… :)

  3. Nat says:

    lol. Very clever, very clever indeed

  4. aladavlis says:

    Hello,
    I am having trouble with my Internet explorer.It is doing some very odd things.Sometimes it will completely close the page i am visiting for no reason or it will be very slow loading pages and when i say slow i mean very very very slow for eg i tried to google something and after 10 minutes of the page trying to load i gave up.I thought that it was perhaps the topic i was searching so i tried putting in random things to see if that made any difference but it didn’t.Another problem i had was when i was on a forum and clicked on a link and nothing happened i tried to open a new tab and that wouldn’t work either and it would let me access any options that are in my tools menu.i had to restart my computer.Just to let you know i have high speed Internet connection.Thanks in advance to anyone that helps me with this problem.

  5. er.by.ru says:

    Hack again?!

  6. HSCharles says:

    I have a flash site
    i’m looking for the script who shows google adsense with flash.
    how can i get it?

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>