Performing Security Headers Audit
Overview
Cybersecurity skill for performing security headers audit. Follows industry best practices and security standards.
When to Use
Trigger phrases:
"performing security headers audit"
"Auditing HTTP security headers including CSP, HSTS, X-Frame-Options, and cookie "
During authorized web application security assessments as a standard configuration review
When evaluating browser-level protections against XSS, clickjacking, and data leakage
For compliance assessments requiring security header implementation (PCI DSS, SOC 2)
When performing initial reconnaissance to identify easy-win security improvements
During CI/CD pipeline security gate checks for new deployments
When NOT to Use
- When you lack proper authorization for testing
- For production systems without change management
- When the task requires legal or compliance expertise beyond technical scope
Prerequisites
- Authorization: Written scope for the target application (header review is low-risk)
- curl: For fetching response headers from target endpoints
- SecurityHeaders.com: Online scanner for quick header assessment
- Mozilla Observatory: Mozilla's web security testing tool
- Burp Suite: For comprehensive header analysis across multiple pages
- Browser DevTools: For examining headers and CSP violations in real-time
Workflow
# Example: IOC detection
import re
IOC_PATTERNS = {
"ip": r"\b(?:\d{1,3}\.){3}\d{1,3}\b",
"domain": r"\b[a-z0-9-]+\.[a-z]{2,}\b",
"hash_md5": r"\b[a-f0-9]{32}\b",
"hash_sha256": r"\b[a-f0-9]{64}\b",
}
def extract_iocs(text: str) -> dict:
return {k: re.findall(v, text) for k, v in IOC_PATTERNS.items()}
- Plan Operations — Define objectives, scope, and success criteria for security headers audit operations.
- Prepare Environment — Set up tools, access, and data sources required for security headers audit.
- Execute Core Workflow — Perform the security headers audit operations following established procedures.
- Validate Results — Verify that results meet quality standards and objectives.
- Report Findings — Document results, observations, and recommendations.
- Follow Up — Track remediation actions and verify fixes where applicable.
Tools
- Analysis Platform — Data processing and visualization
- Collaboration Tools — Team coordination and knowledge sharing
Process
- Reconnaissance — Gather target information, identify attack surface, enumerate services
- Analysis/Exploitation — Execute the technique, analyze results, document findings
- Reporting — Document IOCs, write findings, provide remediation recommendations
Verification
Anti-Rationalization Table
| Rationalization |
Reality |
| "We are too small to be targeted" |
Automated attacks target everyone. Size does not matter. |
| "Security slows us down" |
A breach slows you down 100x more. Build security in from the start. |
| "We will fix it after launch" |
Vulnerabilities in production are exploited within hours. Fix before deploy. |
1---2name: performing-security-headers-audit3description: Use when auditing HTTP security headers including CSP, HSTS, X-Frame-Options,4 and cookie attributes to identify missing or misconfigured browser-level protections.5 Use when working with performing security headers audit.6domain: cybersecurity7tags:8- penetration-testing9- security-headers10- csp11- hsts12- owasp13- web-security14- hardening15subdomain: web-application-security16version: '1.0'17author: oyi7718license: Apache-2.019nist_csf:20- PR.PS-0121- ID.RA-0122- PR.DS-1023- DE.CM-0124category: cybersecurity25metadata:26 source: https://skillmd.com/skills/oyi77/performing-security-headers-audit27---2829# Performing Security Headers Audit3031## Overview3233Cybersecurity skill for performing security headers audit. Follows industry best practices and security standards.3435## When to Use36**Trigger phrases:**37- "performing security headers audit"38- "Auditing HTTP security headers including CSP, HSTS, X-Frame-Options, and cookie "394041- During authorized web application security assessments as a standard configuration review42- When evaluating browser-level protections against XSS, clickjacking, and data leakage43- For compliance assessments requiring security header implementation (PCI DSS, SOC 2)44- When performing initial reconnaissance to identify easy-win security improvements45- During CI/CD pipeline security gate checks for new deployments464748## When NOT to Use4950- When you lack proper authorization for testing51- For production systems without change management52- When the task requires legal or compliance expertise beyond technical scope535455## Prerequisites5657- **Authorization**: Written scope for the target application (header review is low-risk)58- **curl**: For fetching response headers from target endpoints59- **SecurityHeaders.com**: Online scanner for quick header assessment60- **Mozilla Observatory**: Mozilla's web security testing tool61- **Burp Suite**: For comprehensive header analysis across multiple pages62- **Browser DevTools**: For examining headers and CSP violations in real-time6364## Workflow6566```python67# Example: IOC detection68import re6970IOC_PATTERNS = {71 "ip": r"\b(?:\d{1,3}\.){3}\d{1,3}\b",72 "domain": r"\b[a-z0-9-]+\.[a-z]{2,}\b",73 "hash_md5": r"\b[a-f0-9]{32}\b",74 "hash_sha256": r"\b[a-f0-9]{64}\b",75}7677def extract_iocs(text: str) -> dict:78 return {k: re.findall(v, text) for k, v in IOC_PATTERNS.items()}79```80811. **Plan Operations** — Define objectives, scope, and success criteria for security headers audit operations.822. **Prepare Environment** — Set up tools, access, and data sources required for security headers audit.833. **Execute Core Workflow** — Perform the security headers audit operations following established procedures.844. **Validate Results** — Verify that results meet quality standards and objectives.855. **Report Findings** — Document results, observations, and recommendations.866. **Follow Up** — Track remediation actions and verify fixes where applicable.8788## Tools8990- **Analysis Platform** — Data processing and visualization91- **Collaboration Tools** — Team coordination and knowledge sharing929394## Process95961. **Reconnaissance** — Gather target information, identify attack surface, enumerate services971. **Analysis/Exploitation** — Execute the technique, analyze results, document findings981. **Reporting** — Document IOCs, write findings, provide remediation recommendations99100## Verification101102- [ ] All security headers audit procedures executed completely and documented103- [ ] Findings validated against multiple data sources104- [ ] False positives identified and filtered105- [ ] Results documented with evidence and timestamps106- [ ] Recommendations provided with risk-based prioritization107108## Anti-Rationalization Table109110| Rationalization | Reality |111|---|---|112| "We are too small to be targeted" | Automated attacks target everyone. Size does not matter. |113| "Security slows us down" | A breach slows you down 100x more. Build security in from the start. |114| "We will fix it after launch" | Vulnerabilities in production are exploited within hours. Fix before deploy. |