Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - SQL code visible in page?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SQL code visible in page?

 Post Reply Post Reply
Author
craigr View Drop Down
Newbie
Newbie


Joined: 20 October 2006
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote craigr Quote  Post ReplyReply Direct Link To This Post Topic: SQL code visible in page?
    Posted: 13 May 2007 at 3:31am
Hi
 
I have just been notified by one of our more IT savvy users that the login SQL string is visible when they login. The address is www.fishing.net.nz/asp_forums/.
 
I've viewed the code and I cannot see it. Is there some debuging mode or way the SQL code can be captured & displayed?
 
Thanks is advance.
Craig
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2007 at 7:02pm
The connection code will not be displayed.

If there is a problem connecting to the SQL server, they may see an error like:-

Problem connecting to database xxx using username xxx

But this doesn't revel your password and is an error coursed by the server, not the software, the only way to prevent such error messages is to disable detailed ASP error messages in the web server itself, but this can course difficulties in debugging any issues you may have running ASP on your site.
Back to Top
craigr View Drop Down
Newbie
Newbie


Joined: 20 October 2006
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote craigr Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2007 at 8:19pm
Thanks Borg. Thats good to know.
 
However the (disgruntled) user has posted the first query in the login function in its entirety. eg select username...where handle = "" etc.
 
I'm currently trying to get him to let me know how he is doing it and if it's the only one he sees. Once I have his feedback I'll post what he is doing.
 
Cheers
Craig
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2007 at 8:48pm
Your login page looks like it's been modified to use the users email address instead of the username to login.

This would mean that the query your user is seeing to login is something which is not part of the original code and the user is probably using an SQL Injection to make the forum crash and display the SQL Query.

Web Wiz Forums does come with built in protection against SQL Injections, but if you have modified the code you may have accidentally removed the code that protects against SQL Injections from this query used to login users.
Back to Top
craigr View Drop Down
Newbie
Newbie


Joined: 20 October 2006
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote craigr Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2007 at 8:59pm
Thats correct, but we did minimal code changes - as we didn't want to break the security.
 
Can you give me some further pointers on the SQL hack please? eg how I can test it. PM if necessary please
 
Cheers
Craig
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2007 at 9:31pm
The best thing to do is to findout exactly the code the person is using then use the contact us section of this site to contact support with the details of how they are doing this, we will then beable to advise you how to prevent this from happening.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.