I am a pentester en found a HQL injection point. I can extract the password hashes of the users, but I have to do that with more or less a blind select statement where I put an extra parameter in the where:
select count(userName) from DB where userName='admin' AND Password like 'INJECT%' AND '1'='1
The INJECT I just loop through all possibilities and get a yes or no response if he can find password that starts with something. The bold part is the input that I have full control over.
Now my problem is that this like query is case insensitive, while a hash is case sensitive. SO is there anyway that I can make sure the like query is executed case sensitive from only this injection point? (so I cannot do actuall HQL or SQL queries besides from this).