skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
uphiago/recon-skills52 installs

hunt-metrics-exposure

Hunt public /metrics, /health, and actuator endpoints leaking AI usage, DB pools, and operational intelligence.

How do I install this agent skill?

npx skills add https://github.com/uphiago/recon-skills --skill hunt-metrics-exposure
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    The skill is a security auditing tool designed to discover and analyze exposed observability endpoints. It performs network requests to user-provided targets and processes the responses. The primary security considerations are the ingestion of untrusted data from remote targets and the potential for accessing sensitive environmental information as part of its intended red-teaming function.

  • Socketwarn

    1 alert: gptSecurity

  • Snykwarn

    Risk: MEDIUM · 1 issue

What does this agent skill do?

When to Use

The target uses modern observability tooling (Go, .NET, Java, Node.js). These frameworks often expose /metrics, /health, and /status endpoints that are forgotten behind auth. Unlike application data leaks, metrics leaks reveal the ENTIRE operational profile: which AI models are used, how many users are active, database connection exhaustion, and third-party service dependencies.


Prerequisites

  • Explicit authorization, target boundaries, and rate limits for the target.
  • Tooling: curl, python3.
  • A writable evidence directory: export OUTPUT_DIR="${OUTPUT_DIR:-./output}" && mkdir -p "$OUTPUT_DIR".
  • For any state-changing step (writes, uploads, credential attempts), obtain explicit confirmation immediately before the command.

How to Run

TARGET="https://target.com"

# Common observability paths
for ep in metrics health status ready live readyz healthz \
  actuator/health actuator/metrics actuator/prometheus \
  Telescope telescope horizon debug; do
  code=$(curl --max-time 30 --connect-timeout 10 -sk -o /tmp/metrics_${ep}.txt -w "%{http_code}" \
    "${TARGET}/${ep}" 2>/dev/null)
  if [ "$code" = "200" ]; then
    size=$(wc -c < /tmp/metrics_${ep}.txt)
    echo "  /${ep}: HTTP 200 (${size} bytes)"
  fi
done

Procedure

The phases below are the procedure. Keep each probe bounded (--max-time), record evidence beneath OUTPUT_DIR, and stop at the stop-conditions listed in Pitfalls.

Phase 1 — Discover Metrics Endpoints

TARGET="https://target.com"

# Common observability paths
for ep in metrics health status ready live readyz healthz \
  actuator/health actuator/metrics actuator/prometheus \
  Telescope telescope horizon debug; do
  code=$(curl --max-time 30 --connect-timeout 10 -sk -o /tmp/metrics_${ep}.txt -w "%{http_code}" \
    "${TARGET}/${ep}" 2>/dev/null)
  if [ "$code" = "200" ]; then
    size=$(wc -c < /tmp/metrics_${ep}.txt)
    echo "  /${ep}: HTTP 200 (${size} bytes)"
  fi
done

Phase 2 — Analyze Prometheus Metrics

# Count unique metric families (each reveals a subsystem)
grep -c '^# HELP' /tmp/metrics_metrics.txt

# Extract AI/ML model usage
grep -i 'ai_\|model\|llm\|openai\|gemini\|copilot' /tmp/metrics_metrics.txt

# Extract database pool states
grep -i 'db_pool\|database\|connection' /tmp/metrics_metrics.txt

# Extract third-party dependencies
grep -i 'stripe\|openai\|sendgrid\|twilio\|email' /tmp/metrics_metrics.txt

# Extract request volumes (user activity)
grep -i 'http_request\|api_request\|grpc_request' /tmp/metrics_metrics.txt

# Extract circuit breaker states (service health)
grep -i 'circuit_breaker' /tmp/metrics_metrics.txt

Phase 3 — Analyze Health/Status Endpoints

# Spring Boot Actuator
curl --max-time 30 --connect-timeout 10 -sk "${TARGET}/actuator/health" | python3 -m json.tool
curl --max-time 30 --connect-timeout 10 -sk "${TARGET}/actuator/metrics" | python3 -m json.tool
curl --max-time 30 --connect-timeout 10 -sk "${TARGET}/actuator/env" | python3 -m json.tool  # May leak env vars

# Custom health endpoints
curl --max-time 30 --connect-timeout 10 -sk "${TARGET}/health" | python3 -m json.tool
curl --max-time 30 --connect-timeout 10 -sk "${TARGET}/api/health" | python3 -m json.tool

# Laravel Telescope (if exposed)
curl --max-time 30 --connect-timeout 10 -sk "${TARGET}/telescope/requests" | head -c 500

What Metrics Reveal

MetricIntelligence Gained
ai_analyzer_output_total{model="gpt-5-mini"}Which AI models are used, usage volume
db_pool_idle_connections{pool="api"}Database pool sizing, connection exhaustion risk
circuit_breaker_state{client="stripe"}Third-party dependencies and their health
clinical_copilot_sse_activeReal-time user count for specific features
http_requests_totalRequest volume, peak hours, user activity
app_version / build_infoDeployed version, build timestamps

Pitfalls

  • Prometheus /metrics without secrets — metrics endpoints exposing request counts are informational. Need labels containing PII, internal hostnames, or credentials.
  • Spring Boot Actuator /actuator/metrics — metrics are intentionally exposed for monitoring. Only report if they leak sensitive data (usernames in labels, internal IPs).
  • JMX without auth — JMX exposure without authentication is critical only if write operations (MBean invocation) are possible. Read-only JMX is informational.
  • Health endpoint without sensitive data — /health, /status, /ready endpoints are designed to be public. Need leaked internal data.

Verification

  • Confirmed exposure: /metrics returns Prometheus text format (lines starting with # HELP or # TYPE)
  • Actuator exposure: /actuator/health returns JSON with component statuses
  • False positive: Endpoint returns {"status":"ok"} only (minimal health check, not a metrics leak)
  • Severity upgrade: /actuator/env or /actuator/configprops exposed → HIGH/CRITICAL only if the response contains unredacted secrets (Spring Boot 2.2+ redacts password/secret/key values by default — check the body before scoring)

What Next

  • AI model usage metrics → pivot to hunt-llm-ai (prompt injection on discovered models)
  • DB pool metrics showing overload → DoS attack surface identified
  • Circuit breaker states for Stripe/email → infrastructure dependency map for chained attacks
  • Combine with hunt-schema-enumeration for full target profile

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/uphiago/recon-skills/hunt-metrics-exposure">View hunt-metrics-exposure on skillZs</a>