11.07.2015 Views

Improving Web Application Security: Threats and - CGISecurity

Improving Web Application Security: Threats and - CGISecurity

Improving Web Application Security: Threats and - CGISecurity

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

178 Part III: Building Secure <strong>Web</strong> <strong>Application</strong>sKey ExchangeSome applications require the secure exchange of encryption keys over an insecurenetwork. You may need to verbally communicate the key or send it through securee-mail. A more secure method to exchange a symmetric key is to use public keyencryption. With this approach, you encrypt the symmetric key to be exchanged byusing the other party’s public key from a certificate that can be validated. A certificateis considered valid when:● It is being used within the date ranges as specified in the certificate.● All signatures in the certificate chain can be verified.● It is of the correct type. For example, an e-mail certificate is not being used as a<strong>Web</strong> server certificate.● It can be verified up to a trusted root authority.● It is not on a Certificate Revocation List (CRL) of the issuer.Key Maintenance<strong>Security</strong> is dependent upon keeping the key secure over a prolonged period of time.Apply the following recommendations for key maintenance:● Cycle keys periodically.●Protect exported private keys.Cycle Keys PeriodicallyYou should change your encryption keys from time to time because a static secret ismore likely to be discovered over time. Did you write it down somewhere? Did Bobthe administrator with the secrets change positions in your company or leave thecompany? Are you using the same session key to encrypt communication for a longtime? Do not overuse keys.Key CompromiseKeys can be compromised in a number of ways. For example, you may lose the keyor discover that an attacker has stolen or discovered the key.If your private key used for asymmetric encryption <strong>and</strong> key exchange iscompromised, do not continue to use it, <strong>and</strong> notify the users of the public key that thekey has been compromised. If you used the key to sign documents, they need to bere-signed.If the private key of your certificate is compromised, contact the issuing certificationauthority to have your certificate placed on a certificate revocation list. Also, changethe way your keys are stored to avoid a future compromise.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!