Detected exposed Azure Application Insights Instrumentation Keys (classic ikey format) in HTTP responses, which allowed anyone to send telemetry data and, in some older configurations, could enable read access via undocumented or legacy APIs.
PoC
id: azure-instrumentation-key-exposure
info:
name: Azure Instrumentation Key - Exposure
author: pussycat0x
severity: medium
description: |
Detected exposed Azure Application Insights Instrumentation Keys (classic ikey format) in HTTP responses, which allowed anyone to send telemetry data and, in some older configurations, could enable read access via undocumented or legacy APIs.
reference:
- https://learn.microsoft.com/en-us/azure/azure-monitor/app/connection-strings
- http://www.medic-consulting.com/2016/07/10/Share-Asp-Net-Core-appsettings-json-with-Service-Fabric-Microservices/
metadata:
max-request: 2
verified: true
tags: exposure,azure,instrumentation,appinsights,token,vuln
http:
- method: GET
path:
- "{{BaseURL}}"
- "{{BaseURL}}/appsettings.json"
stop-at-first-match: true
matchers-condition: and
matchers:
- type: word
part: body
words:
- 'InstrumentationKey'
- 'instrumentationKey'
- 'APPINSIGHTS_INSTRUMENTATIONKEY'
- '<InstrumentationKey>'
condition: or
- type: regex
part: body
regex:
- 'instrumentationKey:"([0-9a-z-]+)"'
- '<InstrumentationKey>(.*)</InstrumentationKey>'
- 'APPINSIGHTS_INSTRUMENTATIONKEY=([a-z0-9-]+)'
- 'InstrumentationKey": "([0-9a-z-]+)"'
condition: or
- type: status
status:
- 200
extractors:
- type: regex
part: body
group: 1
regex:
- 'instrumentationKey:"([0-9a-z-]+)"'
- '<InstrumentationKey>(.*)</InstrumentationKey>'
- 'APPINSIGHTS_INSTRUMENTATIONKEY=([a-z0-9-]+)'
- 'InstrumentationKey": "([0-9a-z-]+)"'
# digest: 4b0a00483046022100f670f50e16fabf3a4d8ebf3a66d42b54d00b8763f2e827bc485e2f181ae84ab0022100b13982a898fd4e5ca37f6afdc93a4ac87f7bfdf0a7fc90b67f759815060aca48:922c64590222798bb761d5b6d8e72950
# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.