Likes Likes:  0
Resultaten 1 tot 2 van de 2
Geen
  1. #1
    admin@majorsecurity.de
    [MajorSecurity Advisory #54]xt:Commerce - Cross Site Scriptingand Session Fixation Issues
    Gast
    n/a Berichten
    Berichten zijn liked



    Thread Starter

    [MajorSecurity Advisory #54]xt:Commerce - Cross Site Scriptingand Session Fixation Issues

    [MajorSecurity Advisory #54]xt:Commerce - Cross Site Scripting and Session Fixation Issues

    Details
    =======
    Product: xt:Commerce
    Security-Risk: moderated
    Remote-Exploit: yes
    Vendor-URL: http://www.xtcommerce-shop.com/
    Vendor-Status: informed
    Advisory-Status: published

    Credits
    ============
    Discovered by: David Vieira-Kurz
    http://www.majorsecurity.de

    Affected Products:
    ----------------------------
    xt:Commerce 3.04 and prior

    Original Advisory:
    ============
    http://www.majorsecurity.de/index_2....ls=major_rls54

    Introduction
    ============
    xt:Commerce is one of the leading webshop systems based on the eCommerce Engine.

    More Details
    ============


    1. Cross Site Scripting:
    ----------------------
    1.1 Input passed directly to the "keywords" parameter in "advanced_search_result.php" is not properly sanitised before being returned to the user.
    This can be exploited to execute arbitrary HTML and script code in a user's browser session in context of an affected site.

    1.2 PoC:
    ============
    /advanced_search_result.php?keywords=/>"<script>alert(15)</script>&x=1&y=1

    1.3 Workaround
    =============
    Edit the source code to ensure that input is properly sanitised.
    You should work with "htmlspecialchars()" or "htmlentities()" php-function to ensure that html tags
    and javascript code are not going to be executed.

    Example:
    $keywords = htmlentities($_POST['keywords']);
    $keywords = htmlspecialchars($_GET('keywords'));
    ?>

    2. session fixation:
    ---------------------
    The "PHPSESSID" parameter can be set to a malicious and arbitrary value.

    2.1 Description:
    In a session fixation attack, the attacker fixes the user's session ID before the user even logs into the target server.
    After a user's session ID has been fixed, the attacker will wait for them to login.
    Once the user does so, the attacker uses the predefined session ID value to assume their online identity.

    2.2 PoC:
    ============
    https://localhost/xtcommerce304/shop...TCsid/15031988

    2.3 Workaround:
    ============
    1. Do not accept session identifiers from GET / POST variables.
    2.Regenerate SID on each request.
    3. Accept only server generated SID:
    One way to improve security is to not accept session identifiers not generated by server.

    if ( !isset( $_SESSION['SERVER_GENERATED_SID'] ) ) {
    session_destroy(); // destroy all data in session
    }
    session_regenerate_id(); // generate a new session identifier
    $_SESSION['SERVER_GENERATED_SID'] = true;

    Solution
    =============
    Edit the source code to ensure that input is properly sanitised.
    You should work with "htmlspecialchars()" or "htmlentities()" php-function to ensure that html tags
    and javascript code are not going to be executed.

    Example:
    $password = htmlentities($_POST['pass']);
    $search = htmlspecialchars($_GET['search']);
    ?>


    MajorSecurity
    ================
    MajorSecurity is a German penetrationtesting and security research company which focuses
    on web application security. We offer professional penetrationtestings and reliable proof
    of concepts.
    You will find more Information about MajorSecurity at
    http://www.majorsecurity.de/


  2. #2
    Philipp Hagemeister
    [MajorSecurity Advisory #54]xt:Commerce - Cross Site Scriptingand Session Fixation Issues
    Gast
    n/a Berichten
    Berichten zijn liked



    Thread Starter

    Re: [MajorSecurity Advisory #54]xt:Commerce - Cross Site Scriptingand Session Fixation Issues

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA512

    admin@majorsecurity.de wrote:
    > (...)
    > 1. Cross Site Scripting:
    > 1.1 Input passed directly to the "keywords" parameter in "advanced_search_result.php" is not properly sanitised before being returned to the user.
    > This can be exploited to execute arbitrary HTML and script code in a user's browser session in context of an affected site.
    >
    > 1.2 PoC:
    > /advanced_search_result.php?keywords=/>"<script>alert(15)</script>&x=1&y=1
    >

    I can't confirm this on xtCommerce 3.0.4. The keywords parameter is
    handled frequently, but never printed (and escaped when integrated in
    database queries). In which line did you find the vulnerability?

    md5sum of my copy (Windows line ending):
    89f73d92a197965f6ac2e7cacb091c44 shop/advanced_search_result.php

    > (..)

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.9 (GNU/Linux)

    iEYEAREKAAYFAkjY920ACgkQ9eq1gvr7CFwjAACfYCmdY2kL0g mc1ogZBI9iBIWn
    IbwAn0w3CYfy7Xvq24zoL747AxBEMiXI
    =p3rQ
    -----END PGP SIGNATURE-----


Webhostingtalk.nl

Contact

  • Rokin 113-115
  • 1012 KP, Amsterdam
  • Nederland
  • Contact
© Copyright 2001-2026 Webhostingtalk.nl.
Web Statistics