Web Security

Data Integrity Failures

Risk: Code and infrastructure without integrity verification. Demonstrated through insecure file uploads and lack of integrity checks.

WEB-UPLOAD-01Module ID
Hands-onLab Type
IntermediateLevel

Overview

Validate uploads beyond MIME type, enforce content checks, and ensure storage isolation and antivirus scanning.

Learning Outcomes

  • Enforce allowlists for file types and size
  • Verify content with magic bytes and scanners
  • Store outside web root with randomized names
  • Use async scanning and quarantine flows
  • Add integrity metadata and checksums

Hands-on Labs

Break naive filters, then implement robust validation and isolated storage.

Defenses

Content Security Policy for preview, virus scanning, and strict download handling.