3 ms·
It uses the Log4Shell exploit to load some Java bytecode (read through this[0] blog post for context on Log4Shell). Then, once it loads that code, it scans the
by freeqaz 5y ago
It uses the Log4Shell exploit to load some Java bytecode (read through this[0] blog post for context on Log4Shell).
Then, once it loads that code, it scans the memory of the system and rewrites the various log4j classes that are loaded in memory. The code for that is this[1] Java file.
There is a good talk on JNDI exploits in that[0] blog post if you want more details. :)
0: https://www.lunasec.io/docs/blog/log4j-zero-day/#how-the-exploit-works https://www.lunasec.io/docs/blog/log4j-zero-day/#how-the-exp...
1: https://github.com/lunasec-io/lunasec/blob/master/tools/log4shell/payloads/hotpatch-payload/src/main/java/Log4ShellHotpatch.java https://github.com/lunasec-io/lunasec/blob/master/tools/log4...
- avodonosov 5y agoMore precisely, it does not rewrite classes, but just changes log4j configuration programmatically.
- blondin 5y agouses the exploit to mitigate the exploit. brilliant!
- indigodaddy 5y agoInteresting.. kind of like a vaccine!