Cloud Infrastructure Detector Skill
Purpose
Detect cloud providers, PaaS platforms, and serverless services from IP attribution, DNS records, HTTP headers, and other signals.
Input
Raw signals from Phase 2:
ip_signals - Cloud provider IP range matches, ASN data
dns_signals - CNAME delegations, TXT verification records
http_signals - Cloud-specific headers
tls_signals - Certificate issuers (ACM, GCP, etc.)
repository_signals - IaC files, CI/CD configs
Technology Categories
Major Cloud Providers
| Provider |
Detection Signals |
Weight |
| AWS |
IP ranges, X-Amz-*, CloudFront headers, ACM certs |
40-45 |
| Google Cloud |
IP ranges, X-Goog-*, GTS certs, cloud.google.com |
40-45 |
| Microsoft Azure |
IP ranges, Azure headers, Azure certs |
40-45 |
| DigitalOcean |
IP ranges (AS14061), do.co CNAME |
35-40 |
| Linode |
IP ranges (AS63949) |
35-40 |
| Vultr |
IP ranges (AS20473) |
35-40 |
| Oracle Cloud |
IP ranges, Oracle headers |
35-40 |
| IBM Cloud |
IP ranges, IBM headers |
35-40 |
PaaS Platforms
| Platform |
Detection Signals |
Implies |
Weight |
| Heroku |
herokuapp.com CNAME, Heroku headers |
AWS |
40 |
| Vercel |
vercel.app CNAME, X-Vercel-Id header |
AWS |
40 |
| Netlify |
netlify.app CNAME, X-NF-* headers |
AWS/GCP |
40 |
| Render |
onrender.com CNAME |
AWS/GCP |
35 |
| Railway |
railway.app CNAME |
GCP |
35 |
| Fly.io |
fly.dev CNAME |
- |
35 |
| Platform.sh |
platform.sh CNAME |
- |
35 |
| Google App Engine |
appspot.com |
GCP |
40 |
| AWS Elastic Beanstalk |
elasticbeanstalk.com |
AWS |
40 |
| Azure App Service |
azurewebsites.net |
Azure |
40 |
Serverless Platforms
| Platform |
Detection Signals |
Implies |
Weight |
| AWS Lambda |
lambda-url headers, API Gateway |
AWS |
35 |
| Cloudflare Workers |
workers.dev, CF-Worker header |
Cloudflare |
40 |
| Vercel Functions |
Vercel + /api/ routes |
Vercel |
35 |
| Netlify Functions |
Netlify + /.netlify/functions/ |
Netlify |
35 |
| Google Cloud Functions |
cloudfunctions.net |
GCP |
35 |
| Azure Functions |
azurewebsites.net/api |
Azure |
35 |
Container Orchestration
| Platform |
Detection Signals |
Weight |
| Kubernetes |
k8s patterns, Helm charts in repo |
30 |
| Amazon EKS |
eks.amazonaws.com |
35 |
| Google GKE |
container.googleapis.com |
35 |
| Azure AKS |
azmk8s.io |
35 |
| Docker Swarm |
docker-compose patterns |
25 |
Managed Services
| Service |
Detection Signals |
Provider |
Weight |
| AWS S3 |
s3.amazonaws.com, X-Amz-* |
AWS |
35 |
| AWS CloudFront |
cloudfront.net CNAME |
AWS |
40 |
| AWS RDS |
rds.amazonaws.com |
AWS |
30 |
| Google Cloud Storage |
storage.googleapis.com |
GCP |
35 |
| Azure Blob |
blob.core.windows.net |
Azure |
35 |
| Firebase |
firebaseapp.com, web.app |
GCP |
40 |
Detection Logic
def detect_cloud_infrastructure(signals):
results = []
# IP-based Cloud Detection
for ip_data in signals.ip_signals:
if ip_data.cloud_provider:
results.append({
"name": ip_data.cloud_provider,
"category": "Cloud Provider",
"signals": [
{
"type": "ip_attribution",
"value": f"IP {ip_data.ip} in {ip_data.cloud_provider} range",
"region": ip_data.region
}
],
"total_weight": 40
})
# CNAME-based PaaS Detection
for cname in signals.dns_signals.cname_records:
for paas in PAAS_PATTERNS:
if paas.pattern in cname.target:
results.append({
"name": paas.name,
"category": "PaaS",
"signals": [
{
"type": "dns_cname",
"value": f"CNAME → {cname.target}"
}
],
"implies": paas.implies,
"total_weight": paas.weight
})
# Header-based Detection
for header, value in signals.http_signals.headers.items():
# AWS Headers
if header.startswith('X-Amz-'):
add_if_not_exists(results, "AWS", "Cloud Provider", {
"type": "http_header",
"value": f"{header}: {value}"
}, 35)
# Vercel Header
if header == 'X-Vercel-Id':
add_if_not_exists(results, "Vercel", "PaaS", {
"type": "http_header",
"value": f"X-Vercel-Id present"
}, 40)
# Netlify Headers
if header.startswith('X-NF-'):
add_if_not_exists(results, "Netlify", "PaaS", {
"type": "http_header",
"value": f"{header} present"
}, 35)
# Certificate Issuer Detection
for cert in signals.tls_signals:
if "Amazon" in cert.issuer:
add_if_not_exists(results, "AWS Certificate Manager", "Managed Service", {
"type": "certificate",
"value": f"Issuer: {cert.issuer}"
}, 35)
add_if_not_exists(results, "AWS", "Cloud Provider", {
"type": "certificate",
"value": "ACM certificate implies AWS infrastructure"
}, 30)
if "Google Trust Services" in cert.issuer:
add_if_not_exists(results, "Google Cloud", "Cloud Provider", {
"type": "certificate",
"value": "GTS certificate implies GCP infrastructure"
}, 30)
# Repository IaC Detection
if signals.repository_signals:
for file in signals.repository_signals.files:
if "terraform" in file.lower():
# Parse terraform for provider
results.append({
"name": "Terraform",
"category": "IaC",
"signals": [{"type": "repository", "value": f"File: {file}"}],
"total_weight": 25
})
if "cloudformation" in file.lower() or file.endswith('.cfn.yml'):
results.append({
"name": "AWS CloudFormation",
"category": "IaC",
"implies": ["AWS"],
"signals": [{"type": "repository", "value": f"File: {file}"}],
"total_weight": 30
})
return results
Output
{
"skill": "cloud_infra_detector",
"results": {
"technologies": [
{
"name": "AWS",
"category": "Cloud Provider",
"signals": [
{
"type": "ip_attribution",
"value": "IP 52.84.123.45 in AWS CloudFront range",
"region": "us-east-1",
"weight": 40
},
{
"type": "certificate",
"value": "ACM certificate detected",
"weight": 30
}
],
"total_weight": 70,
"services_detected": ["CloudFront", "ACM"]
},
{
"name": "Vercel",
"category": "PaaS",
"signals": [
{
"type": "dns_cname",
"value": "CNAME → cname.vercel-dns.com",
"weight": 35
},
{
"type": "http_header",
"value": "X-Vercel-Id header present",
"weight": 40
}
],
"total_weight": 75,
"implies": ["AWS"]
},
{
"name": "Terraform",
"category": "IaC",
"signals": [
{
"type": "repository",
"value": "terraform/ directory found",
"weight": 25
}
],
"total_weight": 25
}
],
"infrastructure_summary": {
"primary_cloud": "AWS",
"hosting_platform": "Vercel",
"cdn": "Vercel Edge Network (AWS-backed)",
"container_orchestration": null,
"infrastructure_as_code": "Terraform"
},
"regions_detected": ["us-east-1", "us-west-2"]
}
}
Cloud-Specific Signals
AWS
Headers: X-Amz-Cf-Id, X-Amz-Request-Id, X-Amz-Bucket-Region
CNAME: cloudfront.net, elasticbeanstalk.com, s3.amazonaws.com
ASN: AS16509, AS14618
Certificate: Amazon, AWS
Google Cloud
Headers: X-Goog-*, X-GUploader-UploadID
CNAME: googleapis.com, appspot.com, run.app
ASN: AS15169, AS396982
Certificate: Google Trust Services
Microsoft Azure
Headers: X-Azure-*, X-MS-*
CNAME: azurewebsites.net, azure-api.net, blob.core.windows.net
ASN: AS8075
Certificate: Microsoft
Error Handling
- Multiple cloud providers: Report all with confidence
- PaaS on cloud: Report both PaaS and underlying cloud
- Uncertain attribution: Lower confidence, flag for correlation
1---2name: cloud-infra-detector3description: Detects cloud providers (AWS, Azure, GCP) and PaaS platforms4---56# Cloud Infrastructure Detector Skill78## Purpose910Detect cloud providers, PaaS platforms, and serverless services from IP attribution, DNS records, HTTP headers, and other signals.1112## Input1314Raw signals from Phase 2:15- `ip_signals` - Cloud provider IP range matches, ASN data16- `dns_signals` - CNAME delegations, TXT verification records17- `http_signals` - Cloud-specific headers18- `tls_signals` - Certificate issuers (ACM, GCP, etc.)19- `repository_signals` - IaC files, CI/CD configs2021## Technology Categories2223### Major Cloud Providers2425| Provider | Detection Signals | Weight |26|----------|-------------------|--------|27| AWS | IP ranges, X-Amz-*, CloudFront headers, ACM certs | 40-45 |28| Google Cloud | IP ranges, X-Goog-*, GTS certs, cloud.google.com | 40-45 |29| Microsoft Azure | IP ranges, Azure headers, Azure certs | 40-45 |30| DigitalOcean | IP ranges (AS14061), do.co CNAME | 35-40 |31| Linode | IP ranges (AS63949) | 35-40 |32| Vultr | IP ranges (AS20473) | 35-40 |33| Oracle Cloud | IP ranges, Oracle headers | 35-40 |34| IBM Cloud | IP ranges, IBM headers | 35-40 |3536### PaaS Platforms3738| Platform | Detection Signals | Implies | Weight |39|----------|-------------------|---------|--------|40| Heroku | herokuapp.com CNAME, Heroku headers | AWS | 40 |41| Vercel | vercel.app CNAME, X-Vercel-Id header | AWS | 40 |42| Netlify | netlify.app CNAME, X-NF-* headers | AWS/GCP | 40 |43| Render | onrender.com CNAME | AWS/GCP | 35 |44| Railway | railway.app CNAME | GCP | 35 |45| Fly.io | fly.dev CNAME | - | 35 |46| Platform.sh | platform.sh CNAME | - | 35 |47| Google App Engine | appspot.com | GCP | 40 |48| AWS Elastic Beanstalk | elasticbeanstalk.com | AWS | 40 |49| Azure App Service | azurewebsites.net | Azure | 40 |5051### Serverless Platforms5253| Platform | Detection Signals | Implies | Weight |54|----------|-------------------|---------|--------|55| AWS Lambda | lambda-url headers, API Gateway | AWS | 35 |56| Cloudflare Workers | workers.dev, CF-Worker header | Cloudflare | 40 |57| Vercel Functions | Vercel + /api/ routes | Vercel | 35 |58| Netlify Functions | Netlify + /.netlify/functions/ | Netlify | 35 |59| Google Cloud Functions | cloudfunctions.net | GCP | 35 |60| Azure Functions | azurewebsites.net/api | Azure | 35 |6162### Container Orchestration6364| Platform | Detection Signals | Weight |65|----------|-------------------|--------|66| Kubernetes | k8s patterns, Helm charts in repo | 30 |67| Amazon EKS | eks.amazonaws.com | 35 |68| Google GKE | container.googleapis.com | 35 |69| Azure AKS | azmk8s.io | 35 |70| Docker Swarm | docker-compose patterns | 25 |7172### Managed Services7374| Service | Detection Signals | Provider | Weight |75|---------|-------------------|----------|--------|76| AWS S3 | s3.amazonaws.com, X-Amz-* | AWS | 35 |77| AWS CloudFront | cloudfront.net CNAME | AWS | 40 |78| AWS RDS | rds.amazonaws.com | AWS | 30 |79| Google Cloud Storage | storage.googleapis.com | GCP | 35 |80| Azure Blob | blob.core.windows.net | Azure | 35 |81| Firebase | firebaseapp.com, web.app | GCP | 40 |8283## Detection Logic8485```python86def detect_cloud_infrastructure(signals):87 results = []8889 # IP-based Cloud Detection90 for ip_data in signals.ip_signals:91 if ip_data.cloud_provider:92 results.append({93 "name": ip_data.cloud_provider,94 "category": "Cloud Provider",95 "signals": [96 {97 "type": "ip_attribution",98 "value": f"IP {ip_data.ip} in {ip_data.cloud_provider} range",99 "region": ip_data.region100 }101 ],102 "total_weight": 40103 })104105 # CNAME-based PaaS Detection106 for cname in signals.dns_signals.cname_records:107 for paas in PAAS_PATTERNS:108 if paas.pattern in cname.target:109 results.append({110 "name": paas.name,111 "category": "PaaS",112 "signals": [113 {114 "type": "dns_cname",115 "value": f"CNAME → {cname.target}"116 }117 ],118 "implies": paas.implies,119 "total_weight": paas.weight120 })121122 # Header-based Detection123 for header, value in signals.http_signals.headers.items():124 # AWS Headers125 if header.startswith('X-Amz-'):126 add_if_not_exists(results, "AWS", "Cloud Provider", {127 "type": "http_header",128 "value": f"{header}: {value}"129 }, 35)130131 # Vercel Header132 if header == 'X-Vercel-Id':133 add_if_not_exists(results, "Vercel", "PaaS", {134 "type": "http_header",135 "value": f"X-Vercel-Id present"136 }, 40)137138 # Netlify Headers139 if header.startswith('X-NF-'):140 add_if_not_exists(results, "Netlify", "PaaS", {141 "type": "http_header",142 "value": f"{header} present"143 }, 35)144145 # Certificate Issuer Detection146 for cert in signals.tls_signals:147 if "Amazon" in cert.issuer:148 add_if_not_exists(results, "AWS Certificate Manager", "Managed Service", {149 "type": "certificate",150 "value": f"Issuer: {cert.issuer}"151 }, 35)152 add_if_not_exists(results, "AWS", "Cloud Provider", {153 "type": "certificate",154 "value": "ACM certificate implies AWS infrastructure"155 }, 30)156157 if "Google Trust Services" in cert.issuer:158 add_if_not_exists(results, "Google Cloud", "Cloud Provider", {159 "type": "certificate",160 "value": "GTS certificate implies GCP infrastructure"161 }, 30)162163 # Repository IaC Detection164 if signals.repository_signals:165 for file in signals.repository_signals.files:166 if "terraform" in file.lower():167 # Parse terraform for provider168 results.append({169 "name": "Terraform",170 "category": "IaC",171 "signals": [{"type": "repository", "value": f"File: {file}"}],172 "total_weight": 25173 })174175 if "cloudformation" in file.lower() or file.endswith('.cfn.yml'):176 results.append({177 "name": "AWS CloudFormation",178 "category": "IaC",179 "implies": ["AWS"],180 "signals": [{"type": "repository", "value": f"File: {file}"}],181 "total_weight": 30182 })183184 return results185```186187## Output188189```json190{191 "skill": "cloud_infra_detector",192 "results": {193 "technologies": [194 {195 "name": "AWS",196 "category": "Cloud Provider",197 "signals": [198 {199 "type": "ip_attribution",200 "value": "IP 52.84.123.45 in AWS CloudFront range",201 "region": "us-east-1",202 "weight": 40203 },204 {205 "type": "certificate",206 "value": "ACM certificate detected",207 "weight": 30208 }209 ],210 "total_weight": 70,211 "services_detected": ["CloudFront", "ACM"]212 },213 {214 "name": "Vercel",215 "category": "PaaS",216 "signals": [217 {218 "type": "dns_cname",219 "value": "CNAME → cname.vercel-dns.com",220 "weight": 35221 },222 {223 "type": "http_header",224 "value": "X-Vercel-Id header present",225 "weight": 40226 }227 ],228 "total_weight": 75,229 "implies": ["AWS"]230 },231 {232 "name": "Terraform",233 "category": "IaC",234 "signals": [235 {236 "type": "repository",237 "value": "terraform/ directory found",238 "weight": 25239 }240 ],241 "total_weight": 25242 }243 ],244 "infrastructure_summary": {245 "primary_cloud": "AWS",246 "hosting_platform": "Vercel",247 "cdn": "Vercel Edge Network (AWS-backed)",248 "container_orchestration": null,249 "infrastructure_as_code": "Terraform"250 },251 "regions_detected": ["us-east-1", "us-west-2"]252 }253}254```255256## Cloud-Specific Signals257258### AWS259```260Headers: X-Amz-Cf-Id, X-Amz-Request-Id, X-Amz-Bucket-Region261CNAME: cloudfront.net, elasticbeanstalk.com, s3.amazonaws.com262ASN: AS16509, AS14618263Certificate: Amazon, AWS264```265266### Google Cloud267```268Headers: X-Goog-*, X-GUploader-UploadID269CNAME: googleapis.com, appspot.com, run.app270ASN: AS15169, AS396982271Certificate: Google Trust Services272```273274### Microsoft Azure275```276Headers: X-Azure-*, X-MS-*277CNAME: azurewebsites.net, azure-api.net, blob.core.windows.net278ASN: AS8075279Certificate: Microsoft280```281282## Error Handling283284- Multiple cloud providers: Report all with confidence285- PaaS on cloud: Report both PaaS and underlying cloud286- Uncertain attribution: Lower confidence, flag for correlation