安全矩阵

 找回密码
 立即注册
搜索
查看: 708|回复: 0

实战|记一次bc站实战

[复制链接]

417

主题

417

帖子

2391

积分

金牌会员

Rank: 6Rank: 6

积分
2391
发表于 2023-12-7 20:46:18 | 显示全部楼层 |阅读模式
smile_r HACK之道 2023-12-04 03:01 发表于重庆

初遇难题
发现一个bc站先尝试打一下主站



先尝试目录扫描看能不能发现一些后台之类的,这里我用的是dirsearch。



但是很遗憾,没有什么有价值的目录,连后台也扫不出来,但是这是在意料之中,毕竟大部分菠菜网站防护都做的挺好的。
接下里尝试注册一个账号看看




尝试注入,发现加密,不会逆向的我只能暂时放弃。




注册成功后发现一个上传接口



上传成功但是查看后发现他是以id的形式存储,无法形成上传漏洞放弃。



这个网站拿不下来转换思路尝试对整个ip进行渗透,首先要对这个ip的全端口进行扫描,尽量获取到比较全的信息。
获得了两个web页面。
rocketmq,这个有最新版漏洞爆出来尝试




找到工具尝试攻击,但是失败不能执行命令。



还有另外一个登录界面



发现存在shiro框架



尝试爆破但是未发现秘钥。



柳暗花明
突破点:
他有一个8888端口,访问都会跳转非法ip



看了一下burp发现他会访问登录页面再进行跳转


眉头一皱发现事情并不简单,在ip后随便加了一点,导致其报错,发现其使用的是spring框架。


Actuator 是 Spring Boot 提供的用来对应用系统进行自省和监控的功能模块,借助于 Actuator 开发者可以很方便地对应用系统某些监控指标进行查看、统计等。

Actuator 的核心是端点 Endpoint,它用来监视应用程序及交互,spring-boot-actuator 中已经内置了非常多的 Endpoint(health、info、beans、metrics、httptrace、shutdown等等),同时也允许我们自己扩展自己的 Endpoints。每个 Endpoint 都可以启用和禁用。

要远程访问 Endpoint,还必须通过 JMX 或 HTTP 进行暴露,大部分应用选择HTTP。

  
路径
  
是否默认启用
功能描述
/auditevents
显示当前应用程序的审计事件信息
/beans
显示一个应用中所有Spring Beans的完整列表
/conditions
显示配置类和自动配置类的状态及它们被应用或未被应用的原因
/configprops
显示一个所有@ConfigurationProperties的集合列表
/env
显示来自Spring的 ConfigurableEnvironment的属性
/flyway
显示数据库迁移路径(如果存在)
/health
显示应用的健康信息(当使用一个未认证连接访问时显示一个简单的’status’,使用认证连接访问则显示全部信息详情)
/info
显示任意的应用信息
/liquibase
展示任何Liquibase数据库迁移路径(如果存在)
/metrics
展示当前应用的metrics信息
/mappings
显示一个所有@RequestMapping路径的集合列表
/scheduledtasks
显示应用程序中的计划任务
/sessions
允许从Spring会话支持的会话存储中检索和删除用户会话
/shutdown
允许应用以优雅的方式关闭(默认情况下不启用)
/threaddump
执行一个线程dump
/heapdump
返回一个GZip压缩的hprof堆dump文件
/jolokia
通过HTTP暴露JMX beans(当Jolokia在类路径上时,WebFlux不可用)
/logfile
返回日志文件内容(如果设置了logging.file或logging.path属性的话),支持使用HTTP Range头接收日志文件内容的部分信息
/prometheus
以可以被Prometheus服务器抓取的格式显示metrics信息
直接用spring收集好的目录进行目录扫描。
  1. actuator
  2. actuator/auditLog
  3. actuator/auditevents
  4. actuator/autoconfig
  5. actuator/beans
  6. actuator/caches
  7. actuator/conditions
  8. actuator/configurationMetadata
  9. actuator/configprops
  10. actuator/dump
  11. actuator/env
  12. actuator/events
  13. actuator/exportRegisteredServices
  14. actuator/features
  15. actuator/flyway
  16. actuator/health
  17. actuator/heapdump
  18. actuator/healthcheck
  19. actuator/heapdump
  20. actuator/httptrace
  21. actuator/hystrix.stream
  22. actuator/info
  23. actuator/integrationgraph
  24. actuator/jolokia
  25. actuator/logfile
  26. actuator/loggers
  27. actuator/loggingConfig
  28. actuator/liquibase
  29. actuator/metrics
  30. actuator/mappings
  31. actuator/scheduledtasks
  32. actuator/swagger-ui.html
  33. actuator/prometheus
  34. actuator/refresh
  35. actuator/registeredServices
  36. actuator/releaseAttributes
  37. actuator/resolveAttributes
  38. actuator/scheduledtasks
  39. actuator/sessions
  40. actuator/springWebflow
  41. actuator/shutdown
  42. actuator/sso
  43. actuator/ssoSessions
  44. actuator/statistics
  45. actuator/status
  46. actuator/threaddump
  47. actuator/trace
  48. auditevents
  49. autoconfig
  50. api.html
  51. api/index.html
  52. api/swagger-ui.html
  53. api/v2/api-docs
  54. api-docs
  55. beans
  56. caches
  57. cloudfoundryapplication
  58. conditions
  59. configprops
  60. distv2/index.html
  61. docs
  62. druid/index.html
  63. druid/login.html
  64. druid/websession.html
  65. dubbo-provider/distv2/index.html
  66. dump
  67. entity/all
  68. env
  69. env/(name)
  70. eureka
  71. flyway
  72. gateway/actuator
  73. gateway/actuator/auditevents
  74. gateway/actuator/beans
  75. gateway/actuator/conditions
  76. gateway/actuator/configprops
  77. gateway/actuator/env
  78. gateway/actuator/health
  79. gateway/actuator/heapdump
  80. gateway/actuator/httptrace
  81. gateway/actuator/hystrix.stream
  82. gateway/actuator/info
  83. gateway/actuator/jolokia
  84. gateway/actuator/logfile
  85. gateway/actuator/loggers
  86. gateway/actuator/mappings
  87. gateway/actuator/metrics
  88. gateway/actuator/scheduledtasks
  89. gateway/actuator/swagger-ui.html
  90. gateway/actuator/threaddump
  91. gateway/actuator/trace
  92. health
  93. heapdump
  94. heapdump.json
  95. httptrace
  96. hystrix
  97. hystrix.stream
  98. info
  99. integrationgraph
  100. jolokia
  101. jolokia/list
  102. liquibase
  103. list
  104. logfile
  105. loggers
  106. liquibase
  107. metrics
  108. mappings
  109. monitor
  110. prometheus
  111. refresh
  112. scheduledtasks
  113. sessions
  114. shutdown
  115. spring-security-oauth-resource/swagger-ui.html
  116. spring-security-rest/api/swagger-ui.html
  117. static/swagger.json
  118. sw/swagger-ui.html
  119. swagger
  120. swagger/codes
  121. swagger/index.html
  122. swagger/static/index.html
  123. swagger/swagger-ui.html
  124. swagger-dubbo/api-docs
  125. swagger-ui
  126. swagger-ui.html
  127. swagger-ui/html
  128. swagger-ui/index.html
  129. system/druid/index.html
  130. threaddump
  131. template/swagger-ui.html
  132. trace
  133. user/swagger-ui.html
  134. version
  135. v1.1/swagger-ui.html
  136. v1.2/swagger-ui.html
  137. v1.3/swagger-ui.html
  138. v1.4/swagger-ui.html
  139. v1.5/swagger-ui.html
  140. v1.6/swagger-ui.html
  141. v1.7/swagger-ui.html
  142. /v1.8/swagger-ui.html
  143. /v1.9/swagger-ui.html
  144. /v2.0/swagger-ui.html
  145. v2.1/swagger-ui.html
  146. v2.2/swagger-ui.html
  147. v2.3/swagger-ui.html
  148. v2/swagger.json
  149. webpage/system/druid/index.html
  150. %20/swagger-ui.html
复制代码

开始扫描



并发现其中存在heapdump,下载下来。
Heap Dump也叫堆转储文件,是一个Java进程在某个时间点上的内存快照。
可以通过Eclipse MemoryAnalyzer工具对泄露的heapdump文件进行分析,查询加载到内存中的明文密码信息,比如redis密码,mysql数据库账号和密码。
这里我用的是whwlsfb师傅的JDumpSpider
https://github.com/whwlsfb/JDumpSpider




成功获取shiro的key



打入内存马。


获取管理员权限


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|安全矩阵

GMT+8, 2024-7-27 10:37 , Processed in 0.016186 second(s), 19 queries .

Powered by Discuz! X4.0

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表