This module exploits an unauthenticated remote code execution vulnerability in Spring Cloud Gateway versions = 3.1.0 and 3.0.0 to 3.0.6. The vulnerability can be exploited when the Gateway Actuator endpoint is enabled, exposed and unsecured. An unauthenticated attacker can use SpEL expressions to execute code and take control of the victim machine.
Linux
x64, cmd
To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':
msf > use exploit/linux/http/spring_cloud_gateway_rce
msf exploit(spring_cloud_gateway_rce) > show targets
...targets...
msf exploit(spring_cloud_gateway_rce) > set TARGET < target-id >
msf exploit(spring_cloud_gateway_rce) > show options
...show and set options...
msf exploit(spring_cloud_gateway_rce) > exploit
Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.
– Jim O’Gorman | President, Offensive Security