Course Overview

XSS attacks are among the top ten most common exploits in web applications. To prevent XSS attacks, many mitigations can be used. One of the most useful mitigations is the implementation of a Content Security Policy or CSP.  

This course will introduce you to CSP. You will learn how to use CSP to reduce or eliminate the ability to trigger XSS. You will understand when to use CSP and when not to use it. The course will teach you how you can create and test a basic CSP. Moreover, with the use of various use cases, you will learn how to write CSPs in your applications.

By the end of this course, you will learn how CSP policies work when to use CSP policies, as well as various ways to implement and test a CSP policy.  

What You Will Learn

  • What a Content Security Policy (CSP) is
  • When you should and should not use a CSP
  • How to create and test a basic CSP
  • Various methods for preventing code injection attacks with CSP

Program Curriculum

  • What Is Cross-site Scripting?
  • Building an XSS Test Site
  • How Does CSP Work?
  • How to Use CSP with Node.js?
  • $7 Million Cybersecurity Scholarship by EC-Council
  • Chapter 1 Quiz

  • Fetch Directives
  • Document Directives
  • Navigation Directives
  • Reporting Directives
  • Chapter 2 Quiz

  • Blocking Inline Scripts
  • The script-src Directive
  • The child-src Directive
  • The connect-src Directive
  • The image-src Directive
  • The media-src Directive
  • Sandboxing
  • Chapter 3 Quiz

  • Writing CSPs for XSS Protection
  • Hashes - Demo
  • Nonces - Demo
  • Writing CSPs for Single Page Applications
  • Implementing a CSP
  • Google’s CSP Methodology
  • GitHub’s CSP Implementation
  • Frame-based Attacks
  • CSP to Prevent Frame-based Attacks

  • The Report-to Directive
  • The Report-only Mode
  • CSP Level 3 Updates
  • CSP in Meta Tags
  • Alternative URL Types
  • Further Directive Types
  • Migrating from HTTP to HTTPS
  • Next Steps in Header Security
  • Chapter 5 Quiz
Load more modules

Instructor

Scott Cosentino

Scott Cosentino is a developer and teacher who is passionate about learning. He works primarily in software development and computer security. Aside from this, he has taught students a variety of programming-related topics, and he loves to inspire students to be passionate about the topics that he teaches. He has experience in both large classes and one on one teaching. Scott believes that mathematics and computer science can be approachable and fun topics. he tailors his courses so that they are easy to comprehend, with an exploration of what, why, and how of every topic. He understands that these topics are not a spectator sport, so he provides as many examples and practises problems as possible so that the viewer can follow along and learn!

Join over 1 Million professionals from the most renowned Companies in the world!

certificate

Empower Your Learning with Our Flexible Plans

Invest in your future with our flexible subscription plans. Whether you're just starting out or looking to enhance your expertise, there's a plan tailored to meet your needs. Gain access to in-demand skills and courses for your continuous learning needs.

Monthly Plans
Annual Plans
Save 20% with our annual plans!

Pro

Ideal for continuous learning, offering extensive resources with 600+ courses and diverse Learning Paths to enhance your skills.

$ 499.00
Billed annually or $59.00 billed monthly

What is included

  • 700+ Premium Short Courses
  • 50+ Structured Learning Paths
  • Validation of Completion with all courses and learning paths
  • New Courses added every month
Early Access Offer

Pro +

Experience immersive learning with Practice Labs, CTF Challenges, and exclusive EC-Council certifications for comprehensive skill-building.

$ 599.00
Billed annually or $69.00 billed monthly

Everything in Pro and

  • 800+ Practice Lab exercises with guided instructions
  • 150+ CTF Challenges with detailed walkthroughs
  • New Practice Labs and Challenges added every month
  • 3 Official EC-Council Essentials Certifications¹ (retails at $897!)
    Exclusive Bonus with Annual Plans

¹This plan includes Digital Forensics Essentials (DFE), Ethical Hacking Essentials (EHE), and Network Defense Essentials (NDE) certifications. No other EC-Council certifications are included.

Related Courses

1 of 8