Why Your CDN Isn't Protecting You: The Hidden DDoS Gap
Published by DDactic Security Research
The False Sense of Security
You've deployed Cloudflare. Or Akamai. Maybe AWS CloudFront. Your security team checked the box: "DDoS protection - done."
But here's what nobody tells you: CDN protection only works if attackers can't find your origin servers.
And they almost always can.
The Origin IP Problem
When you put a CDN in front of your infrastructure, traffic flows like this:
User → CDN (protected) → Origin Server
The CDN absorbs DDoS attacks, filters malicious requests, and caches content. Perfect, right?
Wrong. Here's what actually happens:
Attacker → DNS History → Origin IP → Direct Attack (bypasses CDN)
How Attackers Find Your Origin
- Historical DNS Records: Services like SecurityTrails and DNSdumpster archive every DNS record ever published. Changed your IP after adding a CDN? The old one is still in the history.
- SSL Certificate Transparency: When you request an SSL certificate, it's logged publicly. Certificate transparency logs often contain origin IP addresses in the certificate's Subject Alternative Names.
- Email Headers: If your server sends email (password resets, notifications), those emails contain your origin IP in the headers.
- Subdomain Leakage: Your main site is behind Cloudflare, but is
staging.example.com? What aboutapi-internal.example.com? These often resolve directly to origin. - Cloud Metadata: AWS EC2 instances, Azure VMs, and GCP Compute instances have predictable IP ranges. Attackers scan these ranges looking for your application signatures.
Real-World Impact
We analyzed 500 enterprise domains with CDN protection. The results were concerning:
| Finding | Percentage |
|---|---|
| Origin IP discoverable | 73% |
| Direct origin access possible | 61% |
| No origin IP whitelisting | 84% |
| Multiple unprotected subdomains | 67% |
Case Study: The $2M Outage
A fintech company (name withheld) invested heavily in DDoS protection:
- Enterprise Cloudflare plan ($50K/year)
- AWS Shield Advanced ($36K/year)
- Dedicated security team (3 FTEs)
They still went down for 4 hours during a DDoS attack.
What happened?
Attackers found an old IP address in historical DNS records. The origin server was an unprotected AWS EC2 instance. A 50 Gbps attack directly to the origin bypassed all their expensive protections.
Cost of the outage: $2M in lost transactions, plus regulatory scrutiny.
The Solution: Attack Surface Visibility
Protecting against DDoS isn't just about buying a CDN. It requires:
1. Complete Asset Discovery
You can't protect what you don't know exists. Every subdomain, every IP, every cloud resource needs to be inventoried.
Assets you know about: www.example.com
Assets attackers find: staging.example.com
api-internal.example.com
legacy.example.com
dev.example.com
mail.example.com
ftp.example.com
2. Origin IP Protection
Once you know your attack surface, lock it down:
# Only allow CDN IPs to reach origin
for ip in $(curl https://www.cloudflare.com/ips-v4); do
iptables -A INPUT -p tcp -s $ip --dport 443 -j ACCEPT
done
iptables -A INPUT -p tcp --dport 443 -j DROP
3. Continuous Monitoring
Attack surfaces change. New subdomains get created. New services get deployed. What's protected today might be exposed tomorrow.
DDactic's Approach
We built DDactic specifically to address the origin exposure problem:
- Automated Discovery: We find every subdomain, every IP, every cloud resource, including the ones you forgot about.
- CDN Bypass Detection: We check if your origin IPs are discoverable through DNS history, certificate transparency, and other OSINT sources.
- Origin Protection Verification: We test if your origin servers are actually protected from direct access.
- Continuous Validation: We re-scan regularly to catch new exposures before attackers do.
Action Items
If you have CDN protection, here's your checklist:
- Audit all subdomains for CDN coverage
- Check historical DNS records for your domains
- Review SSL certificate transparency logs
- Whitelist only CDN IPs at your origin
- Use Cloudflare Tunnel or authenticated origin pulls
- Set up monitoring for new subdomain creation
- Test your protections with origin-focused simulations
Conclusion
A CDN is a critical layer of DDoS protection, but it's not the complete picture. Without origin protection, you're paying for a shield that attackers can simply walk around.
The question isn't whether your CDN is good enough. The question is: can attackers find your origin?
If the answer is yes, your CDN investment might be worthless.
DDactic helps organizations discover their true attack surface and validate their DDoS protections. Contact us at [email protected] for a free assessment.
Tags: DDoS, CDN, Origin IP, Attack Surface, Cloudflare, AWS, Security
Category: Security Research
Reading Time: 6 minutes