Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'm not sure this provides any sort of security. If a man-in-the-middle attacker wants to change the parameters, all he must do is change the query string and recompute the SHA-1 hash and send that request along to the server.</p> <p>For example, the URL sent by the browser might be:</p> <p><a href="http://www.example.com/addUser.html?parameterA=foo&amp;hash=SHA1" rel="noreferrer">http://www.example.com/addUser.html?parameterA=foo&amp;hash=SHA1</a>("parameterA=foo")</p> <p>If an attacker intercepts this, he can edit it in this way:</p> <p><a href="http://www.example.com/adduser.html?parameterA=bar&amp;hash=SHA1" rel="noreferrer">http://www.example.com/adduser.html?parameterA=bar&amp;hash=SHA1</a>("parameterA=bar")</p> <p>Really, this boils down to the fact you can trust the hash only as much as the parameters themselves.</p> <p>One way you could fix this would be if the user has a password that only he and the server knows, then it would be impossible for the attacker to recompute the hash if he changes the parameters. For example:</p> <p><a href="http://www.example.com/addUser.html?parameterA=foo&amp;hash=SHA1" rel="noreferrer">http://www.example.com/addUser.html?parameterA=foo&amp;hash=SHA1</a>("parameterA=foo"+"theuserpassword")</p> <p>But don't put the password as one of the parameters in the URL :)</p> <p>It is important to note that this isn't the state of the art for verifying the integrity of messages passed between two parties. What is used today is a form of the Hash-based Message Authenticion Code (HMAC) algorithm, which is pretty well described in <a href="http://en.wikipedia.org/wiki/HMAC" rel="noreferrer">HMAC</a>, and definitively in <a href="http://tools.ietf.org/html/rfc2104" rel="noreferrer">RFC2104</a> and <a href="http://csrc.nist.gov/publications/fips/fips198-1/FIPS-198-1_final.pdf" rel="noreferrer">FIPS Pub 198-1</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload