views:

33

answers:

0

Hi all,

I have come across a theory on Auth protocol hacking vulnerability which can be found in http://www.owasp.org/index.php/Reflection_attack_in_an_auth_protocol. I understand how this vulnerability causes problems in exchanging the messages and how to bypass validation to become a logged-in and to be a valid user. The following code given as an example in that page does not convey the idea to me.

String command = new String("some cmd to execute & the password")
MessageDigest encer = MessageDigest.getInstance("SHA");
encer.update(command.getBytes("UTF-8"));
byte[] digest = encer.digest();

What is this cmd(command) in the string and it doesn't even use the Secret key to encrypt(to get the hash like in HMAC algorithm), instead it seems to encrypt only a string. Can anyone explain me how this vulnerability is achieved through this code please ?

Note: I am studying this for my degree and not for any unethical purpose..