WebOTG Security Testing Library ● Public reference
WebOTG
WEBOTG SECURITY TESTING PROCEDURE

WebOTG-CR-001 — Cryptographic Failures Review

A structured procedure for identifying inappropriate protection of sensitive data, weak or obsolete cryptographic mechanisms, insecure transport configurations, exposed secrets and weaknesses in cryptographic key management.

WebOTG ID CR-001 OWASP A04:2025 Type Cryptographic Review Method Manual + Tool-Assisted Version 1.0
01 / OBJECTIVE

Objective

What are we verifying?

Verify that sensitive data is identified and protected throughout its lifecycle using cryptographic mechanisms that are appropriate for the data, threat model, application architecture and regulatory requirements.

Cryptographic failures occur when an application does not adequately protect information that requires confidentiality, integrity, authenticity or non-repudiation.

The review should cover more than simply checking whether HTTPS is enabled. It should consider data classification, encryption at rest and in transit, algorithms, protocols, certificates, password storage, secret handling, key generation, key storage, rotation and lifecycle management.

02 / SCOPE

Scope

Review cryptographic protection across:

Browser-to-server communication
Server-to-server communication
Databases and persistent storage
Backups and exported data
Password storage
Authentication and session secrets
Application encryption keys
API credentials and tokens
TLS certificates and private keys
Logs containing sensitive information
Third-party integrations
Development and deployment environments
03 / PREREQUISITES

Prerequisites

Authorization Confirm authorization to inspect application configuration, network communication and cryptographic implementation.
Data classification Identify sensitive and regulated data processed, stored or transmitted by the application.
Architecture Understand application components, trust boundaries, storage systems and external integrations.
Cryptographic inventory Obtain available information about algorithms, protocols, certificates, keys and cryptographic libraries.
04 / METHODOLOGY

Methodology

The assessment should begin with the information being protected rather than with a particular cryptographic algorithm.

Review area Primary question
Data classification What information requires protection?
Data lifecycle Where is sensitive information created, transmitted, stored and destroyed?
Cryptographic mechanism Is an appropriate cryptographic control used for the required security property?
Algorithm and protocol Are approved and appropriately configured algorithms and protocols being used?
Key management Are keys generated, stored, accessed, rotated and revoked securely?
Implementation Does the implementation avoid exposing secrets or bypassing the intended cryptographic control?
05 / PROCEDURE

Test procedure

01
Identify sensitive information Determine which information requires confidentiality, integrity or authenticity protection.
02
Map the data lifecycle Identify where sensitive information is collected, transmitted, processed, stored, backed up and eventually destroyed.
03
Identify cryptographic controls Record the encryption, hashing, signing and transport mechanisms protecting each relevant data flow or storage location.
04
Review algorithms and protocols Identify obsolete, weak, incorrectly configured or inappropriate cryptographic mechanisms.
05
Review key management Determine where cryptographic keys are generated, stored, accessed, rotated and revoked.
06
Inspect implementation Review source code and configuration for hardcoded secrets, insecure defaults, inappropriate APIs or accidental disclosure of cryptographic material.
07
Test actual behavior Verify network connections, storage behavior, certificate validation and other applicable cryptographic controls.
08
Determine security impact Establish whether the weakness can expose, modify or undermine the confidentiality or integrity of protected information.
06 / SENSITIVE DATA

Sensitive data protection

The organization should explicitly identify information that requires protection. Cryptographic requirements should then be derived from the sensitivity and security requirements of that information.

PERSONAL DATA

Information about identifiable individuals, according to the applicable legal and organizational classification.

AUTHENTICATION DATA

Passwords, authentication secrets, recovery secrets, session credentials and similar data.

FINANCIAL DATA

Payment, transaction or financial information requiring protection.

SECURITY SECRETS

API keys, encryption keys, signing keys, tokens and other credentials.

GOVERNMENT / REGULATED DATA

Information subject to specific statutory, regulatory or organizational protection requirements.

BUSINESS-SENSITIVE DATA

Confidential organizational information requiring controlled access and protection.

Encryption is not automatically required for every field

The requirement should be based on data classification, threat model, architecture and applicable requirements. Encrypting everything without a key-management strategy can create complexity without providing meaningful security.

07 / CRYPTOGRAPHY

Cryptographic mechanism review

Mechanism Review focus
Encryption Determine whether an appropriate authenticated encryption or other approved mechanism is used for the required purpose.
Password storage Verify that passwords are stored using an appropriate password hashing or password-based key derivation mechanism, rather than reversible encryption or unsalted fast hashes.
Hashing Verify that hashing is used only where appropriate and that unsuitable legacy algorithms are not used for security purposes.
Digital signatures Review signing algorithms, key protection, verification and trust-chain behavior.
Randomness Security-sensitive values should use a cryptographically secure random number generator appropriate to the platform.

Example of an insecure implementation

Insecure pattern DO NOT USE
// Example only

$passwordHash = md5($password);

// Hardcoded encryption key
$key = "my-secret-key";

// Sensitive data transmitted without transport protection
http://example.invalid/api/account
Do not use examples from this section in production

The code above intentionally demonstrates insecure patterns for recognition during testing. It is not a remediation example.

08 / TRANSPORT SECURITY

Transport security

Verify that sensitive information is protected while crossing untrusted or partially trusted networks.

Sensitive application traffic is transmitted through appropriately protected transport.
HTTPS is consistently used for applicable browser-facing application traffic.
Certificate validation is correctly implemented.
Weak or obsolete protocol configurations are not unnecessarily enabled.
Sensitive resources are not silently downgraded to insecure transport.
Internal service communication is protected where required by the trust model.

Example request

HTTPS request EXPECTED PATTERN
GET /account/profile HTTP/2
Host: application.example
Cookie: [redacted]

Response:
HTTP/2 200
Content-Type: application/json
TLS configuration alone does not solve storage failures

HTTPS protects an applicable network connection. It does not protect sensitive information that is subsequently stored insecurely, logged, backed up without protection or exposed through application interfaces.

09 / KEY MANAGEMENT

Cryptographic key management

Strong algorithms cannot compensate for poor key management. Review the entire lifecycle of cryptographic keys.

Lifecycle stage Verification question
Generation Are keys generated using appropriate cryptographic mechanisms?
Storage Are keys protected from unauthorized access and accidental disclosure?
Access Is access restricted according to least privilege?
Rotation Is there a practical process for replacing keys when required?
Revocation Can compromised or obsolete keys be invalidated?
Destruction Are retired keys handled according to organizational requirements?
Hardcoded secrets are a critical design smell

Cryptographic keys, API credentials and other sensitive secrets should not be embedded directly into source code or committed to public repositories. Use an appropriate secret-management mechanism and restrict access according to the application's requirements.

Example secret exposure

Application configuration INSECURE
ENCRYPTION_KEY="production-secret-key"
API_TOKEN="production-api-token"
DATABASE_PASSWORD="production-password"
10 / ASSESSMENT

Assessment

Condition Assessment consideration
Appropriate protection The sensitive information has appropriate protection throughout the relevant lifecycle.
Missing protection Sensitive information is transmitted or stored without a required security control.
Weak cryptography An obsolete, weak or inappropriate cryptographic mechanism is used.
Key exposure Cryptographic keys or secrets can be accessed by unauthorized parties.
Poor key lifecycle Keys cannot be appropriately rotated, revoked or replaced.
Insecure transport Sensitive traffic can be transmitted without appropriate transport protection.
11 / FAILURE CRITERIA

Failure criteria

Sensitive information requiring protection is transmitted without appropriate cryptographic protection.
Sensitive information requiring encryption is stored without appropriate protection.
Passwords are stored using reversible encryption, plaintext storage or inappropriate fast hashing.
Obsolete or unsuitable cryptographic mechanisms are used for security-sensitive purposes.
Cryptographic keys or secrets are hardcoded or otherwise unnecessarily exposed.
Key access is not sufficiently restricted.
Compromised or obsolete keys cannot be appropriately revoked or replaced.
TLS or other transport security is materially weaker than required by the application's threat model.
Example finding CRYPTOGRAPHIC FAILURE

The application stores authentication passwords using an unsuitable fast hashing mechanism without an appropriate password-specific protection strategy. The implementation does not provide adequate resistance against offline password recovery if the stored credential data is compromised.

12 / REMEDIATION

Remediation

Remediation should address both the cryptographic mechanism and the surrounding key-management process.

  1. Identify and classify all sensitive information.
  2. Map where sensitive information is transmitted, processed and stored.
  3. Define cryptographic requirements for each relevant data class.
  4. Use current, well-reviewed cryptographic algorithms and protocols appropriate to the use case.
  5. Use established platform or library cryptographic APIs rather than implementing cryptographic primitives manually.
  6. Store passwords using an appropriate password hashing or password-based key derivation mechanism.
  7. Protect cryptographic keys independently from the encrypted data where the architecture requires it.
  8. Remove hardcoded production secrets from source code.
  9. Restrict secret and key access using least privilege.
  10. Establish key rotation and revocation procedures.
  11. Protect sensitive network communication using appropriately configured secure transport.
  12. Review backups, logs, exports and temporary storage for unintended exposure.

Example remediation pattern

Secret management CONCEPTUAL
// Do not embed production secrets directly in source code.

// Application retrieves the required secret from an
// approved secret-management mechanism at runtime.

$encryptionKey = $secretManager->get("application/encryption-key");

// Use the key only for its intended purpose.
// Do not log or expose the key.
Do not invent cryptography

Custom encryption algorithms, custom password hashing schemes and ad-hoc cryptographic protocols are difficult to implement and review correctly. Prefer established, well-maintained cryptographic libraries and platform APIs.

13 / VERIFICATION

Verification

01
Repeat the original test Reproduce the original condition using the same endpoint, application flow or configuration.
02
Confirm the corrected mechanism Verify that the intended cryptographic mechanism is now being used.
03
Verify secret protection Confirm that keys and credentials are no longer unnecessarily exposed through source code, configuration, logs or responses.
04
Verify transport Confirm that applicable sensitive communication uses the intended secure transport.
05
Verify key lifecycle Confirm that the organization can rotate, revoke and replace the relevant cryptographic material.
06
Verify functionality Confirm that encryption, decryption, authentication, signing and other legitimate application functions continue to operate.
PASS

Sensitive information has appropriate protection and the cryptographic implementation satisfies the application's documented requirements.

FAIL

Required cryptographic protection remains absent, weak, improperly implemented or unnecessarily exposed.

NOT TESTED

The cryptographic control could not be adequately evaluated with the available access or evidence.

14 / EVIDENCE

Evidence requirements

Data classification relevant to the finding
Affected data flow or storage location
Relevant cryptographic configuration
Algorithm or protocol information
Certificate or transport evidence where relevant
Key-management evidence where relevant
Reproduction evidence
Remediated configuration
Post-remediation verification
Final PASS / FAIL determination
Never publish cryptographic secrets as evidence

Redact passwords, private keys, encryption keys, API tokens, session secrets and other sensitive cryptographic material from screenshots, logs, source-code excerpts and reports.

15 / CLASSIFICATION

Classification

WebOTG procedure WebOTG-CR-001
OWASP category A04:2025 — Cryptographic Failures
Procedure type Cryptographic protection and sensitive data security review
Assessment result PASS / FAIL / NOT TESTED
Finding severity Determine according to the sensitivity of the affected information, exposure, exploitability, cryptographic weakness and resulting security impact.
WebOTG classification notice

WebOTG-CR-001 is a WebOTG-defined verification procedure. The identifier is not an OWASP-defined test identifier.

16 / REFERENCES

References

Source Relevance
OWASP Top 10:2025 — A04 Primary category definition for Cryptographic Failures.
OWASP Web Security Testing Guide Testing guidance for cryptographic and transport-security assessment.
OWASP Application Security Verification Standard Verification requirements related to cryptography, data protection and secure communication.
NIST Cryptographic Standards Authoritative guidance and standards for cryptographic mechanisms and key management.
TLS protocol specifications Technical reference for secure network transport.

WebOTG should maintain authoritative source URLs, document versions and review dates through its content management system so that references can be updated without modifying the procedure structure.