Content Security Policies (CSPs)
Content Security Policies (CSPs) are a browser-side mechanism designed to prevent malicious code injection attacks, such as cross-site scripting (XSS).
- Define Trusted Sources: CSPs specify which domains and sources are allowed to load scripts, stylesheets, images, and other resources.
- Block Untrusted Content: By restricting content to trusted sources, CSPs block attempts to inject malicious scripts from unknown origins.
- A website sets a CSP that only allows scripts to load from its own domain and a trusted content delivery network (CDN).
- This prevents attackers from injecting harmful scripts from other sources.
Complex Password Policies
Complex password policies enforce the use of strong passwords, making them harder to crack.
- Requirements: Include a mix of uppercase and lowercase letters, numbers, symbols, and a minimum length.
- Additional Measures: Implement password expiration and prevent the reuse of recent passwords.
A company requires employees to use passwords that are at least 12 characters long and include a mix of uppercase, lowercase, numbers, and symbols.
Encrypted Protocols
Encrypted protocols protect data in transit by encrypting communication between devices.
- HTTPS: The secure version of HTTP, encrypting data between web browsers and servers.
- SSL/TLS Certificates: Digital certificates that validate a server's identity and enable encrypted communication.
When you see "https://" in a website's address bar, it indicates that your data is encrypted, protecting it from eavesdropping and man-in-the-middle attacks.
DDoS Mitigation Tools
Distributed Denial of Service (DDoS) mitigation tools are specialized services or software designed to detect and filter out malicious traffic during a DDoS attack.
- Traffic Analysis: Identify and block abnormal traffic patterns.
- Resource Allocation: Ensure legitimate users can access services even during an attack.
A news website under a DDoS attack uses mitigation tools to filter out malicious requests, maintaining availability for legitimate users.
Input Validation
Input validation ensures that user-submitted data is in the correct format and free of malicious code.
- Filtering: Remove unwanted characters.
- Whitelisting: Allow only specific, pre-approved characters or patterns.
Intrusion Detection and Prevention Systems (IDS/IPS)
- Intrusion Detection Systems (IDS): Monitor network activity for suspicious behavior and raise alerts.
- Intrusion Prevention Systems (IPS): Take proactive action to block detected threats.