记一次bc站实战
2023-12-12 08:2:58 Author: 李白你好(查看原文) 阅读量:12 收藏

免责声明:由于传播、利用本公众号李白你好所提供的信息而造成的任何直接或者间接的后果及损失,均由使用者本人负责,公众号李白你好及作者不为此承担任何责任,一旦造成后果请自行承担!如有侵权烦请告知,我们会立即删除并致歉。谢谢!

1

初遇难题

发现一个bc站先尝试打一下主站


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

但是很遗憾,没有什么有价值的目录,连后台也扫不出来,但是这是在意料之中,毕竟大部分菠菜网站防护都做的挺好的。

接下里尝试注册一个账号看看

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

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

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

这个网站拿不下来转换思路尝试对整个ip进行渗透,首先要对这个ip的全端口进行扫描,尽量获取到比较全的信息。

获得了两个web页面。

rocketmq,这个有最新版漏洞爆出来尝试

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

还有另外一个登录界面

发现存在shiro框架

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

2

柳暗花明

突破点:

他有一个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收集好的目录进行目录扫描。

actuatoractuator/auditLogactuator/auditeventsactuator/autoconfigactuator/beansactuator/cachesactuator/conditionsactuator/configurationMetadataactuator/configpropsactuator/dumpactuator/envactuator/eventsactuator/exportRegisteredServicesactuator/featuresactuator/flywayactuator/healthactuator/heapdumpactuator/healthcheckactuator/heapdumpactuator/httptraceactuator/hystrix.streamactuator/infoactuator/integrationgraphactuator/jolokiaactuator/logfileactuator/loggersactuator/loggingConfigactuator/liquibaseactuator/metricsactuator/mappingsactuator/scheduledtasksactuator/swagger-ui.htmlactuator/prometheusactuator/refreshactuator/registeredServicesactuator/releaseAttributesactuator/resolveAttributesactuator/scheduledtasksactuator/sessionsactuator/springWebflowactuator/shutdownactuator/ssoactuator/ssoSessionsactuator/statisticsactuator/statusactuator/threaddumpactuator/traceauditeventsautoconfigapi.htmlapi/index.htmlapi/swagger-ui.htmlapi/v2/api-docsapi-docsbeanscachescloudfoundryapplicationconditionsconfigpropsdistv2/index.htmldocsdruid/index.htmldruid/login.htmldruid/websession.htmldubbo-provider/distv2/index.htmldumpentity/allenvenv/(name)eurekaflywaygateway/actuatorgateway/actuator/auditeventsgateway/actuator/beansgateway/actuator/conditionsgateway/actuator/configpropsgateway/actuator/envgateway/actuator/healthgateway/actuator/heapdumpgateway/actuator/httptracegateway/actuator/hystrix.streamgateway/actuator/infogateway/actuator/jolokiagateway/actuator/logfilegateway/actuator/loggersgateway/actuator/mappingsgateway/actuator/metricsgateway/actuator/scheduledtasksgateway/actuator/swagger-ui.htmlgateway/actuator/threaddumpgateway/actuator/tracehealthheapdumpheapdump.jsonhttptracehystrixhystrix.streaminfointegrationgraphjolokiajolokia/listliquibaselistlogfileloggersliquibasemetricsmappingsmonitorprometheusrefreshscheduledtaskssessionsshutdownspring-security-oauth-resource/swagger-ui.htmlspring-security-rest/api/swagger-ui.htmlstatic/swagger.jsonsw/swagger-ui.htmlswaggerswagger/codesswagger/index.htmlswagger/static/index.htmlswagger/swagger-ui.htmlswagger-dubbo/api-docsswagger-uiswagger-ui.htmlswagger-ui/htmlswagger-ui/index.htmlsystem/druid/index.htmlthreaddumptemplate/swagger-ui.htmltraceuser/swagger-ui.htmlversionv1.1/swagger-ui.htmlv1.2/swagger-ui.htmlv1.3/swagger-ui.htmlv1.4/swagger-ui.htmlv1.5/swagger-ui.htmlv1.6/swagger-ui.htmlv1.7/swagger-ui.html/v1.8/swagger-ui.html/v1.9/swagger-ui.html/v2.0/swagger-ui.htmlv2.1/swagger-ui.htmlv2.2/swagger-ui.htmlv2.3/swagger-ui.htmlv2/swagger.jsonwebpage/system/druid/index.html%20/swagger-ui.html

开始扫描

并发现其中存在heapdump,下载下来。

Heap Dump也叫堆转储文件,是一个Java进程在某个时间点上的内存快照。

可以通过Eclipse MemoryAnalyzer工具对泄露的heapdump文件进行分析,查询加载到内存中的明文密码信息,比如redis密码,mysql数据库账号和密码。

这里我用的是whwlsfb师傅的JDumpSpider

https://github.com/whwlsfb/JDumpSpider

成功获取shiro的key

打入内存马。

获取管理员权限

文章作者:安全牛(smile_r)

文章来源:https://www.anquanke.com/post/id/291169

3

关注我们

一次省HW经历【100w信息泄露+内网沦陷】

Java内存马检测与查杀

一次从子域名接管到RCE的渗透经历


文章来源: http://mp.weixin.qq.com/s?__biz=MzkwMzMwODg2Mw==&mid=2247502530&idx=1&sn=ed74605b9bd802e709653af2cdd16dbc&chksm=c09ab992f7ed30841b12fd69db27f1d65cce4c3ae8bf423bf14f9080875110b925cde68bbfbc&scene=0&xtrack=1#rd
如有侵权请联系:admin#unsafe.sh