AdMentor Login Flaw

From: Frank (thran60@hotmail.com)
Date: 02/21/02


Date: 21 Feb 2002 10:25:54 -0000
From: Frank <thran60@hotmail.com>
To: bugtraq@securityfocus.com


('binary' encoding is not supported, stored as-is)

Regarding : AdMentor v2.11 and earlier
Homepage: http://www.aspcode.net

AdMentor allows any user to login as admin.

The base path of the login is usually :

http://www.someserver.com/admentor/admin/admin.a
sp

By using Login : ' or ''=' , and Password : ' or ''='
We create a legal query because it will get appended
as :SELECT row FROM table WHERE login = '' or
''=''

Same goes for the password. This allows us to login
without any trouble as the main admin. Vendor has
been warned of the bug, but has not released a patch
yet. Temporary solution, filter out the bad chars ' " ~ \
/ by using the following piece of javascript :

function RemoveBad(strTemp) {
    strTemp = strTemp.replace(/\<|\>|\"|\'|\%|\;|\(|\)|\&|\+|
\-/g,"");
    return strTemp; }

And calling it from within the asp script :

var login = var TempStr = RemoveBad
(Request.QueryString("login"));

var password = var TempStr = RemoveBad
(Request.QueryString("password"));

Iam not sure about the correct vars set in the form,
you might want to tweak it just a bit. Havent drunk my
coffee yet :)

Credits:

Bug found by thran, thran60@hotmail.com



Relevant Pages

  • Re: Simple Parameter Processing
    ... parameter and then display a message when the page loads. ... have a login page that if the login fails the user is ... solution for parsing the query string, ... var regex = new RegExp; ...
    (comp.lang.javascript)
  • Re: accessing PHP in JS code
    ... > some of hte variables in java script. ... > eg. i'm loading a combo box from the database. ... > login(); ... > var shortcut=document.combowithtext ...
    (comp.lang.php)
  • Re: Webdav & Exchange 2003 on Windows 2003 server
    ... **When the login was successful, you will receive two cookies that you must ... If no cookies are returned, ... var strCookies; ...
    (microsoft.public.exchange2000.development)
  • Re: [PHP] sessions/cookies
    ... session_startshould be called once per request. ... the user's login credentials are checked. ... var $AdminLevel; ... // Update a users access level ...
    (php.general)
  • DHTML setCookie to bypass login page.
    ... I want to bypass the login page ... var cookieValue = dojo.io.cookie.getCookie; ... alert(cookieValue) returns the correct value of the cookie. ...
    (comp.lang.javascript)