Improving Web Application Security: Threats and Countermeasures

If your application uses cryptography to provide security, examine what it is used for and the way it is used. Table 5.7 shows the most common vulnerabilities relating to cryptography.

Table 5.7: Common Cryptography Vulnerabilities

Vulnerability

Implications

Using custom cryptography

This is almost certainly less secure than the tried and tested platform-provided cryptography.

Using the wrong algorithm or too small a key size

Newer algorithms increase security. Larger key sizes increase security.

Failing to secure encryption keys

Encrypted data is only as secure as the encryption key.

Using the same key for a prolonged period of time

A static key is more likely to be discovered over time.

Review the following questions to help validate the handling of sensitive data by your application:

Why Do You Use Particular Algorithms?

Cryptography only provides real security if it is used appropriately and the right algorithms are used for the right job. The strength of the algorithm is also important. Review the following questions to review your use of cryptographic algorithms:

For more information about choosing an appropriate algorithm and key size, see the Cryptography section in Chapter 4, "Design Guidelines for Secure Web Applications."

How Do You Secure Encryption Keys?

The encrypted data is only as secure as the key. To decipher encrypted data, an attacker must be able to retrieve the key and the cipher text. Therefore, examine your design to ensure that the encryption keys and the encrypted data are secured. Consider the following review questions:

Категории