Prometheus targets API endpoint
ID: prometheus-targets
Severity: info
Author: geeknik
Tags: prometheus,misconfig
Description
Section titled “Description”The targets endpoint exposes services belonging to the infrastructure, including their roles and labels. In addition to showing the target machine addresses, the endpoint also exposes metadata labels that are added by the target provider. These labels are intended to contain non-sensitive values, like the name of the server or its description, but various cloud platforms may automatically expose sensitive data in these labels, oftentimes without the developer’s knowledge.
YAML Source
Section titled “YAML Source”id: prometheus-targets
info: name: Prometheus targets API endpoint author: geeknik severity: info description: The targets endpoint exposes services belonging to the infrastructure, including their roles and labels. In addition to showing the target machine addresses, the endpoint also exposes metadata labels that are added by the target provider. These labels are intended to contain non-sensitive values, like the name of the server or its description, but various cloud platforms may automatically expose sensitive data in these labels, oftentimes without the developer's knowledge. reference: - https://jfrog.com/blog/dont-let-prometheus-steal-your-fire/ metadata: max-request: 1 tags: prometheus,misconfig
http: - method: GET path: - "{{BaseURL}}/api/v1/targets"
matchers-condition: and matchers: - type: status status: - 200
- type: word part: body words: - '"status": "success"' - '"data":' - '"labels":' condition: and
- type: word part: header words: - 'application/json'# digest: 4a0a00473045022100c32a02f40d130f63e4d6a2335164ede22c57d39ad70f65597b0617bbf5e64f4f0220256d807113ba436cad20d21fce6805de0539ed67ef3203a9c0d0ef354b2c271b:922c64590222798bb761d5b6d8e72950Guide to check the vulnerabilities
Section titled “Guide to check the vulnerabilities”This template is used to detect vulnerabilities in web applications. It can be used with the Nuclei tool to scan for specific patterns or behaviors.
$ nuclei -u "URL" -t "http/misconfiguration/prometheus/prometheus-targets.yaml"