performing-content-security-policy-bypass

Featured

Analyze and bypass Content Security Policy implementations to achieve cross-site scripting by exploiting misconfigurations, JSONP endpoints, unsafe directives, and policy injection techniques.

AI & Automation 36,355 stars 4443 forks Updated 2 months ago Apache-2.0

Install

View on GitHub

Quality Score: 94/100

Stars 20%
100
Recency 20%
75
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Performing Content Security Policy Bypass ## When to Use - When XSS is found but execution is blocked by Content Security Policy - During web application security assessments to evaluate CSP effectiveness - When testing the robustness of CSP against known bypass techniques - During bug bounty hunting where CSP prevents direct XSS exploitation - When auditing CSP header configuration for security weaknesses ## Prerequisites - Burp Suite for intercepting responses and analyzing CSP headers - CSP Evaluator (Google) for automated policy analysis - Understanding of CSP directives (script-src, default-src, style-src, etc.) - Knowledge of CSP bypass techniques (JSONP, base-uri, object-src) - Browser developer tools for CSP violation monitoring - Collection of whitelisted domain JSONP endpoints ## Workflow ### Step 1 — Analyze the CSP Policy ```bash # Extract CSP from response headers curl -sI http://target.com | grep -i "content-security-policy" # Check for CSP in meta tags curl -s http://target.com | grep -i "content-security-policy" # Analyze CSP with Google CSP Evaluator # Visit: https://csp-evaluator.withgoogle.com/ # Paste the CSP policy for automated analysis # Check for report-only mode (not enforced) curl -sI http://target.com | grep -i "content-security-policy-report-only" # If only report-only exists, CSP is NOT enforced - XSS works directly # Parse directive values # Example CSP: # script-src 'self' 'unsafe-inline' https://cdn.example.com; # default-src 'self'; ...

Details

Author
mukul975
Repository
mukul975/Anthropic-Cybersecurity-Skills
Created
8 months ago
Last Updated
2 months ago
Language
Python
License
Apache-2.0

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category