Insecure Management Interface
Actuator endpoints let you monitor and interact with your application.
Spring Boot includes a number of built-in endpoints and lets you add your own.
For example, the
/health endpoint provides basic application health information.
Some of them contains sensitive info such as :
/trace- Displays trace information (by default the last 100 HTTP requests with headers).
/env- Displays the current environment properties (from Spring’s ConfigurableEnvironment).
/heapdump- Builds and returns a heap dump from the JVM used by our application.
/dump- Displays a dump of threads (including a stack trace).
/logfile- Outputs the contents of the log file.
/mappings- Shows all of the MVC controller mappings.
These endpoints are enabled by default in Springboot 1.X. Note: Sensitive endpoints will require a username/password when they are accessed over HTTP.
Since Springboot 2.X only
/info are enabled by default.
Remote Code Execution via
Spring is able to load external configurations in the YAML format. The YAML config is parsed with the SnakeYAML library, which is susceptible to deserialization attacks. In other words, an attacker can gain remote code execution by loading a malicious config file.
Generate a payload of SnakeYAML deserialization gadget.
Build malicious jar
- Create a malicious yaml config (yaml-payload.yml)
Host the malicious files on your server.
spring.cloud.bootstrap.locationto your server.
- Reload the configuration.