In honor of Cyber Security Awareness Month, here is a challenge for anyone interested in database security, encryption, algorithms, etc. We have a vendor-supplied application which connects to a production database as the owner of its own schema. That is, the application has full access and privileges to select/insert/update/delete any application data. Privileges for application users are controlled within the application itself. This, by the way, is a very common practice for database applications.
One problem with this particular application, however, is that for some reason it stores a copy of the login credentials for the database for each application user. These are the same credentials the application itself uses to connect to the production database, so the username and password fields for each application user should be the same. Obviously it would be better to store a single copy of those credentials and reference them for each user.
That isn’t the big problem, however! The big problem is that anyone with access to that table can retrieve the encrypted passwords and decrypt them if they can figure out the algorithm. Once decrypted, they can then connect as the application (schema owner) and wreak all sorts of havoc. I am posting this as a caution — even “read-only” access can be dangerous if users can use that information to get a higher level of access. Keep in mind that most attacks come from inside a company!
So, the challenge here is to find the algorithm to decrypt the passwords. Here is a list of some of the encrypted values:
109113112117108059101107
053081051100104120120122119128
057081102100123119121118123
To help you along, I will give you up to twenty-five encrypted values for strings that you provide. That should be more than double the number you need. The strings you choose are a vital part of the solution, so choose wisely! You may leave them in a comment. Comments are moderated, so nobody else will get a hint by seeing the strings you’ve chosen and I will send the encrypted values to you via e-mail, so please use a real e-mail address if you want to participate.
Your task is to describe an algorithm to decrypt the passwords, write code (in any language you wish) to decrypt them, and successfully decrypt the passwords above plus three more I will provide after you successfully decrypt those.
I was able to crack this pretty easily and will post my code (written in PL/SQL) once some others have had a chance to play. Good luck!