Likes Likes:  0
Resultaten 1 tot 3 van de 3
Geen
  1. #1
    jocanor jocanor
    sql injection in phpbb
    Gast
    n/a Berichten
    Berichten zijn liked



    Thread Starter

    sql injection in phpbb



    I found a vulnerability en phpbb 2.0.5 and prior, is probably also affect 2.0.6

    this bug don't affect to version 2.0.7

    phpbb have a list of registereds users, when you click on a memebr of this list, you are requesting data to the database

    for example:

    http://www.example.com/forum/profile...iewprofile&u=2

    this url show the information to the user with the uid = 2, the uid is a number assigned to users in phpbb.

    but it isn't secure, because if you use this url, you can inject sql comands...

    exploit:

    http://www.example.com/profile.php?mode=viewprofile&u='[sqlcode]

    where [sql code] represents the code may be injected.


  2. #2
    Marius Kaase
    sql injection in phpbb
    Gast
    n/a Berichten
    Berichten zijn liked



    Thread Starter

    Re: sql injection in phpbb

    jocanor jocanor wrote:

    >
    > I found a vulnerability en phpbb 2.0.5 and prior, is probably also affect 2.0.6
    >
    > this bug don't affect to version 2.0.7
    >
    > phpbb have a list of registereds users, when you click on a memebr of this list, you are requesting data to the database
    >
    > for example:
    >
    > http://www.example.com/forum/profile...iewprofile&u=2
    >
    > this url show the information to the user with the uid = 2, the uid is a number assigned to users in phpbb.
    >
    > but it isn't secure, because if you use this url, you can inject sql comands...
    >
    > exploit:
    >
    > http://www.example.com/profile.php?mode=viewprofile&u='[sqlcode]
    >
    > where [sql code] represents the code may be injected.
    >


    Does not affect 2.0.6.

    This code prevents it:

    function get_userdata($user, $force_str = false)
    {
    global $db;

    if (intval($user) == 0 || $force_str)
    {
    $user = trim(htmlspecialchars($user));
    $user = substr(str_replace("\\'", "'", $user), 0, 25);
    $user = str_replace("'", "\\'", $user);
    }
    else
    {
    $user = intval($user);
    }

    (Taken from: http://www.phpbb.com/phpBB/viewtopic.php?p=848495)

    --

    Kind Regards
    Marius Kaase

    "If the Phone Doesn't Ring, It's Me"

  3. #3
    Jort Slobbe
    sql injection in phpbb
    Gast
    n/a Berichten
    Berichten zijn liked



    Thread Starter

    Re: sql injection in phpbb

    jocanor jocanor wrote:

    >I found a vulnerability en phpbb 2.0.5 and prior, is probably also affect 2.0.6
    >
    >
    >
    >this bug don't affect to version 2.0.7
    >
    >
    >
    >phpbb have a list of registereds users, when you click on a memebr of this list, you are requesting data to the database
    >
    >
    >
    >for example:
    >
    >
    >
    >http://www.example.com/forum/profile...iewprofile&u=2
    >
    >
    >
    >this url show the information to the user with the uid = 2, the uid is a number assigned to users in phpbb.
    >
    >
    >
    >but it isn't secure, because if you use this url, you can inject sql comands...
    >
    >
    >
    >exploit:
    >
    >
    >
    >http://www.example.com/profile.php?mode=viewprofile&u='[sqlcode]
    >
    >
    >
    >where [sql code] represents the code may be injected.
    >
    >
    >
    >
    >
    >

    I think it doesn't affect on php servers where the magic_quotes are on.
    Because magic_quotes replace ' in \'. And " in \". So it is unsecure
    when you user phpbb 2.0.5 on a server with magic_quotes off.

    Regards,

    Jort



Webhostingtalk.nl

Contact

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