The page allows you to discover whether an account exists, which is info leakage.
The username case doesn't seem to matter, admin, Admin, aDmIn are all treated the same.
Single quote in username field:
Query: SELECT username FROM accounts WHERE username='''; (0) [Exception]
Single quote in password field:
Query: SELECT * FROM accounts WHERE username='' AND password=''' (0) [Exception]
It also shows that MySQL is being used. An application should not be giving this kind of information away when an error happens.
Presumably if a row is returned, the app takes this as a successful auth, so let's try:
' or true;#
There are likely other accounts... and returning more than one row should have resulted in an expectations violation, but it didn't.
' or true limit 1,1;#
Not knowing Python at all (and wanting to learn it instead of using bash), it took me a while to write a satisfactory script to enumerate accounts:
Result:The username case doesn't seem to matter, admin, Admin, aDmIn are all treated the same.
Single quote in username field:
Query: SELECT username FROM accounts WHERE username='''; (0) [Exception]
Single quote in password field:
Query: SELECT * FROM accounts WHERE username='' AND password=''' (0) [Exception]
It also shows that MySQL is being used. An application should not be giving this kind of information away when an error happens.
Presumably if a row is returned, the app takes this as a successful auth, so let's try:
' or true;#
There are likely other accounts... and returning more than one row should have resulted in an expectations violation, but it didn't.
' or true limit 1,1;#
Not knowing Python at all (and wanting to learn it instead of using bash), it took me a while to write a satisfactory script to enumerate accounts:
{'bryce', 'dave', 'admin', 'cal', 'patches', 'jeremy', 'PPan', 'dreveil', 'samurai', 'scotty', 'jim', 'kevin', 'adrian', 'bobby', 'james', 'simba', 'john', 'rocky', 'ed', 'tim', 'ABaker', 'CHook'}
22 accounts
Or we could have just gunned straight for any user we know the name of, etc:
' or username = 'kevin';#
No comments:
Post a Comment