Penetratietest Spring Boot: Spring4Shell, Log4Shell, Actuator en Java Enterprise Beveiliging
Spring Boot is het dominante Java enterprise framework, maar zijn recente geschiedenis is gemarkeerd door de meest gemediatiseerde vulnerabilities van het decennium: Log4Shell (CVE-2021-44228) en Spring4Shell (CVE-2022-22965). Naast deze grote incidenten exposeren Spring Boot deployments regelmatig Actuator endpoints in productie zonder authenticatie. Matproof Sentinel voert gerichte Spring Boot pentests uit met proof-of-exploit en audit-klaar rapport DORA / NIS2 / ISO 27001 vanaf €149.
Waarom Spring Boot uitzonderlijke pentest aandacht vereist
Spring Boot domineert Java enterprise backend development sinds 2015 — bijzonder sterk bij Nederlandse banken (ING, ABN AMRO, Rabobank) en verzekeraars (Achmea, ASR, NN Group). Log4Shell (CVE-2021-44228, december 2021, CVSS 10.0) trof letterlijk honderden miljoenen blootgestelde Java servers; drie jaar na ontdekking rapporteert Cisco Talos dat 31% van Java servers gescand in 2024 nog steeds vulnerable zijn. Spring4Shell (CVE-2022-22965, maart 2022, CVSS 9.8) buit een defect in Spring Framework uit dat remote RCE toestaat. Daarnaast exposeren Spring Boot deployments frequent Actuator endpoints in productie zonder authenticatie — /actuator/heapdump staat JVM memory dump toe (inclusief secrets), /actuator/env onthult environment variables, /actuator/jolokia staat arbitrary JMX method execution toe.
- CVE-2021-44228 (Log4Shell, CVSS 10.0): RCE via JNDI injection in Log4j 2.x — virtually alle niet-gepatchte Spring Boot applicaties; 31% van gescande Java servers in 2024 nog vulnerable (Cisco Talos).
- CVE-2022-22965 (Spring4Shell, CVSS 9.8): RCE via class attribute manipulatie in Spring Framework < 5.3.18 / < 5.2.20 — publiek exploit beschikbaar.
- CVE-2023-20861 (SpEL DoS, CVSS 5.3): DoS via verkeerd geformatteerde SpEL expressions in Spring Expression — treft Spring 5.2.x tot 5.3.25 / 6.0.x tot 6.0.6.
- CVE-2024-22243 (UriComponentsBuilder, CVSS 8.1): SSRF via verkeerd URI beheer in Spring Framework UriComponentsBuilder.
- Actuator endpoints blootgesteld: /actuator/heapdump (JVM memory dump inclusief secrets), /actuator/env (environment variables), /actuator/jolokia (arbitrary JMX execution) — Veracode rapporteert 18% van gescande Spring Boot applicaties in 2024 exposeren Actuator zonder authenticatie.
- Java native deserialization: ObjectInputStream, XStream, Jackson polymorphic typing — klassieke exploitation chain naar RCE via ysoserial gadgets.
- Nederlandse banken onder DORA Art. 26 TLPT met Spring Boot backends — gedocumenteerde pentest is prerequisite voor DNB compliance.
Wat we specifiek testen in een Spring Boot applicatie
- Log4Shell actieve detectie: tests JNDI injection in alle user fields (HTTP headers, URL parameters, JSON body); detectie vulnerable Log4j versies via JAR fingerprinting.
- Spring4Shell exploitability: POST met class.module.classLoader.* payload om RCE te triggeren; detectie Spring Framework < 5.3.18 / < 5.2.20.
- Actuator endpoints: enumeration van blootgestelde endpoints (/actuator/*), authenticatie verificatie, exploitation van /heapdump voor secret extraction, /env voor configuration disclosure, /jolokia voor arbitrary JMX execution.
- Spring Expression Language (SpEL) injection: tests in alle fields waar SpEL geëvalueerd zou kunnen worden (Spring Boot Actuator, @Value expressions, Spring Data Repository @Query met SpEL).
- Java deserialisatie: identificatie van endpoints die geserialiseerde objects accepteren (Java native, XStream, Jackson @JsonTypeInfo); tests met ysoserial gadgets voor demonstratie.
- Spring Security configuratie: audit van SecurityFilterChain voor rules die authentication bypass toestaan, CSRF status, JWT configuratie, CORS misconfigurations.
- Mass assignment via Spring MVC binding: blootstelling van interne fields via @ModelAttribute, manipulatie van DTO objects voor privilege escalation.
- Spring Data SQL injection: gebruik @Query met parameter concatenation, NativeQuery zonder parameterization, JPQL injection via dynamic Specification.
- Exposure sensitive files: application.properties / application.yml blootgesteld via /actuator/configprops of /actuator/env, plaintext secrets.
- JVM-level vulnerabilities: tests Java EOL versions (Java 8 < 8u391, Java 11 < 11.0.21, Java 17 < 17.0.9) met exploitable JDK CVE's.
Voorbeeldbevinding
Actuator /heapdump endpoint blootgesteld zonder authenticatie — JVM secrets extraction
De Spring Boot applicatie exposeert /actuator/heapdump zonder authenticatie of IP restriction. Een aanvaller kan een volledige JVM heap dump downloaden (typically 500 MB tot 4 GB) met de gehele applicatie memory state. De test maakte extractie mogelijk van: (1) plaintext passwords aanwezig in memory na user authenticatie; (2) Stripe en AWS API keys bewaard in Spring Environment variables; (3) actieve JWT tokens van lopende sessies; (4) DB pool connecties met credentials. Exploitation is triviaal: curl -O https://target.example.com/actuator/heapdump dan analyse met Eclipse MAT of jhat. Exposure window was 8 maanden (per nginx archived logs).
Oplossing: Onmiddellijke actie (prioriteit 1): schakel /actuator/heapdump uit in productie via management.endpoint.heapdump.enabled=false. Volledige actie: restrict alle Actuator endpoints via Spring Security met Basic of OAuth2 authenticatie; beperk exposure tot een separate management port (management.server.port=8081) alleen toegankelijk vanaf internal network; expose alleen strikt noodzakelijke endpoints (typically /health met management.endpoints.web.exposure.include=health); audit alle andere endpoints (/env, /configprops, /beans, /mappings, /metrics) die sensitive informatie kunnen lekken. Onmiddellijke rotation van alle secrets/tokens die mogelijk gecompromitteerd zijn tijdens exposure periode.
Referentie: CVE-2023-20873 (Spring Boot Actuator) · CWE-200 · OWASP A05:2021 · Spring Boot Security Guide 3.x · Veracode State of Software Security 2024
Pentest Spring Boot: opties vergeleken
| — | Gratis scan | Matproof Sentinel | Traditionele consultancy |
|---|---|---|---|
| Geautomatiseerde scan-engine | ✓ (3-min preview) | ✓ Volledige scan | ✗ Alleen handmatig |
| OWASP Top 10 dekking | Gedeeltelijk | ✓ Volledig | ✓ Volledig |
| Proof-of-exploit bewijs | ✗ | ✓ Per bevinding | ✓ Per bevinding |
| Regulatorische mapping (DORA/NIS2/ISO 27001) | ✗ | ✓ Geautomatiseerd | ✓ Handmatig |
| Audit-geschikt PDF-rapport | ✗ | ✓ Direct | ✓ 2–4 weken levertijd |
| Continue / terugkerende scans | ✗ | ✓ Per deploy | ✗ Jaarlijkse opdracht |
| Tijd tot eerste resultaat | ~3 min | ~30 min volledige scan | 2–4 weken |
| Prijs | €0 | Vanaf €149 | €8.000–€25.000 |
| Broncode-review (SAST) | ✗ | ✓ Growth-plan | ✓ In scope |
| API-tests (REST/GraphQL) | ✗ | ✓ Geautomatiseerd | ✓ Handmatig |
Pentest Spring Boot pakketten
- 1 volledige penetratietest-scan
- AI-geprioriteerde bevindingen met CVSS 3.1
- Proof-of-exploit per bevinding
- PDF-rapport (geschikt voor audit)
- Regulatorische mapping (DORA, NIS2, ISO 27001)
- Onbeperkt scannen (tot 3 domeinen)
- Continue monitoring
- CI/CD-integratie (GitHub, GitLab)
- Alle regulatorische mappings
- Prioriteitsondersteuning
- Onbeperkt scannen + domeinen
- Geauthenticeerde / White-Box tests
- API- en cloud-infrastructuurtests
- Dedicated security account manager
- SLA responstijd 24u
Veelgestelde vragen over Spring Boot pentest
Hoe weten we of we nog kwetsbaar zijn voor Log4Shell drie jaar na disclosure?
Wij testen actief met JNDI payloads in alle fields die mogelijk worden gelogged. Wij identificeren ook via JAR fingerprinting de Log4j versies in classpath, inclusief transitive dependencies. Volgens Cisco Talos zijn 31% van Java servers in 2024 nog vulnerable.
Verschil tussen automated Spring scan en manual pentest?
Automated scan (Matproof Sentinel Single Run, €149) detecteert bekende CVE's (Log4Shell, Spring4Shell, CVE-2023-20861), blootgestelde Actuator endpoints, evident Spring Security misconfigurations, OWASP Top 10. Manual pentest (Growth plan) voegt jacht op custom deserialization gadgets, deep analyse van complexe SecurityFilterChain rules, SpEL injection in non-trivial contexts toe.
Testen jullie Actuator endpoints met authenticatie (basic auth, OAuth2)?
Ja, in Starter en Growth plans testen wij Actuator endpoints met test credentials. Wij verifiëren rotation van credentials, sterkte van gebruikte secrets, exposure van sensitive endpoints zelfs achter authenticatie.
Onze applicatie gebruikt WebFlux in plaats van Spring MVC. Zijn de tests van toepassing?
Ja. Spring WebFlux heeft zijn eigen vulnerabilities: WebFilter misconfigurations (reactive equivalent van MVC Filters), backpressure exploitation voor DoS, CORS configurations verschillen tussen WebFlux en MVC. Wij passen de tests aan op uw reactive stack.
Welke andere Java frameworks testen jullie?
Spring Boot (3.x, 2.x), Quarkus, Micronaut, Jakarta EE (voorheen Java EE) op Wildfly/Payara/OpenLiberty, Helidon, Vert.x, Play Framework, Dropwizard.
Is het rapport geaccepteerd voor DORA / DNB audits voor Nederlandse banken?
Ja. Expliciete mapping naar DORA Art. 24/25, DNB Goede Praktijk Informatiebeveiliging 2024. Voor banken onder DORA Art. 26 TLPT vervangt Matproof Sentinel geen ECB-accredited red-team test maar kan het complementeren voor continue coverage tussen triennial tests.
Hoe lang duurt een volledige Spring Boot pentest?
90 minuten voor typische Spring Boot applicatie met 50-100 endpoints. Voor microservices (10+ Spring services): 3-4 uur parallel.
Gerelateerde onderwerpen
Meer lezen — gerelateerde blogartikelen
Bescherm uw Spring Boot applicatie nu
Eerste scan in 3 minuten, volledige Spring Boot pentest in 90 minuten inclusief Log4Shell, Spring4Shell, Actuator audit. Audit-klaar rapport DORA / NIS2 / ISO 27001 vanaf €149.
Start gratis scan