One simple way to hack into a password protected website is by using injection SQL. This works on some non-protected websites written in .asp or .aspx and using Microsoft SQL databases.
They use a statement similar to the following to determine if the username and password are authentic based on values stored in the SQL database:
SELECT count(*) FROM useraccounts WHERE username = <inputed username> AND password = <inputed password>
At the username and password prompt you simply type in the password: ' 1 or 1=1' in the password field and any username in the username field and bam your inside the restricted area.
When you enter in the password of ' 1 or 1=1' the SQL interprets it as follows:
SELECT count(*) FROM useraccounts WHERE username = anything AND password = 1 or 1=1
Since 1 always equals 1 this statement will always return true.
This was a relatively simple security vulnerability that was exploited by many hackers. It allowed people to gain access to restricted sites.


Reply With Quote
