Fuzzing Java to Find Log4j Vulnerability - CVE-2021-45046

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ม.ค. 2025

ความคิดเห็น • 76

  • @rinzler_d_vicky
    @rinzler_d_vicky 3 ปีที่แล้ว +93

    As a dev I never thought of security in such detail, but after watching this channel I have been practicing to analyse my code for vulnerability and avoid developing features that can be used as vulnerability in combination.
    My favourite approach is to never make a magic function.
    Thank you!

    • @TheBiggreenpig
      @TheBiggreenpig 3 ปีที่แล้ว +2

      Problem is, 3rd party libs are full of magic.

    • @rinzler_d_vicky
      @rinzler_d_vicky 3 ปีที่แล้ว +1

      @@TheBiggreenpig go old school, right things yourself, and curse yourself for being a dev like I do 😂

  • @FaultyMuse
    @FaultyMuse 3 ปีที่แล้ว +131

    As a professional Java developer, I have never once heard someone call log4j "Log Forge". And considering the name literally means "Log for Java", I would argue anyone saying "Log Forge" is wrong. Although i suppose this is probably just another gif situation lol

    • @quinndirks5653
      @quinndirks5653 3 ปีที่แล้ว +2

      Soft g to avoid confusion with gift, context then resolves any other potential confusion. Creator of the word also pronounces with soft g and says it should be a soft g, like the peanut butter. Pronounce with a soft g, and tell your friends.

    • @tijsbeek8590
      @tijsbeek8590 3 ปีที่แล้ว +1

      4J is normal in the Java eco-system, and it means for Java.
      So log4j would be pronounced as log for Java. Unless log4j is weird and uses other naming.
      idk where people got Forge from

    • @wlockuz4467
      @wlockuz4467 2 ปีที่แล้ว

      Yeah its literally Log Four J lol

    • @hikkamorii
      @hikkamorii 2 ปีที่แล้ว

      @@tijsbeek8590 Probably related to Minecraft's Forge modding platform, since Log4j was heavily abused on minecraft servers

  • @D1ndo
    @D1ndo 3 ปีที่แล้ว +18

    For anyone wondering how did they fix this difference in URI parsing behaviours -> They didn't. They just completely removed the whitelisting checks and restricted the whole shebang to only `java` scheme, so no LDAP URIs would pass through.

  • @VLS-Why
    @VLS-Why 3 ปีที่แล้ว +72

    Now you just need to put a sudoedit payload in a log4j injection xD

    • @rinzler_d_vicky
      @rinzler_d_vicky 3 ปีที่แล้ว +5

      This cracked me up, I am still waiting for his sudoedit series to conclude.

    • @themadichib0d
      @themadichib0d 3 ปีที่แล้ว +8

      @Xeno The Strange I mean chaining exploits is a thing. Abusing log4j to get a local user perms and then the sudoedit vuln to escalate to root is a pretty reasonable scenario.

  • @EER0000
    @EER0000 3 ปีที่แล้ว +2

    Great dive into this CVE, since I don’t work with Java I took this one as an FYI so it’s great to come across an easily digestible report on it. 😄

  • @j3r3miasmg
    @j3r3miasmg 3 ปีที่แล้ว

    Missed opportunity to play some jazz while the fuzzer runs. Thanks for the video.

  • @user-ko7oo2qg1g
    @user-ko7oo2qg1g 3 ปีที่แล้ว +1

    It's always worth it.. watching the content you make.

  • @PavelTimofeev
    @PavelTimofeev 3 ปีที่แล้ว +6

    Great video, thank you!
    I feel something is missing in the video - still nor clear why MacOS and alpine are affected? Maybe other operating systems? Why?
    Probably because of different libc implementations that provide DNS resolution functionality.

    • @itskdog
      @itskdog 2 ปีที่แล้ว +1

      From what I took from the video, it's the OS DNS resolver that's causing the issue, and that JNDI is just calling the system DNS resolver rather than using its own, hence it being OS-dependent.

  • @kallocainsynthemesc4172
    @kallocainsynthemesc4172 3 ปีที่แล้ว +3

    Wünsch mir mehr java videos von dir. Weiß du machst nicht viel mit Java, aber es ist relevanter für Programmierer (weil beliebte Sprache). Keep up the good Content junge

  • @MuhammadBinZafar1
    @MuhammadBinZafar1 2 ปีที่แล้ว

    This was a fruitful collaboration. Thanks @liveoverflow for the insights. It's always amazing to see top hackers coming together!

  • @logiciananimal
    @logiciananimal 3 ปีที่แล้ว +2

    Jazzer looks neat - thanks for the reference.

  • @ThistleBlue
    @ThistleBlue 3 ปีที่แล้ว +2

    Training to be a Java SDET and we're covering Log4J tomorrow..time to learn beforehand haha

  • @ee79bb3a7
    @ee79bb3a7 3 ปีที่แล้ว +3

    18:10 'Z'ystems :D 🇩🇪
    continuing the sentence they become system again :D

  • @MVMn
    @MVMn 2 ปีที่แล้ว +1

    How can you inject your code via this localhost# URLs though? You say "the connection worked" for the other dude, but the connection to what? There clearly can't be a doman like localhost# - so how did he actually inject something? What did the DNS resolve and how could it resolve anything at all? o_O

  • @ALZlper
    @ALZlper 3 ปีที่แล้ว +5

    Log(ing) for J(ava)
    U had it right the first time.

  • @KeinNiemand
    @KeinNiemand 2 ปีที่แล้ว

    but woudn't the remote code execution requre that somone actually registers the localhost# domain witch is impossible since it's invalid. Even if someone is running macos and it parses the invalid hostname the dns server shoudn't return anything since the hostname is still invalid. So this is actully not exploitable unless the DNS server is also vunerable or the attacker controls the dns server.

  • @jonathanvorster8621
    @jonathanvorster8621 3 ปีที่แล้ว

    I really enjoyed this! Good video.

  • @krzysztoflewandowski8262
    @krzysztoflewandowski8262 3 ปีที่แล้ว

    Just curious if you have noticed CVE-2017-5645? Probably very early sign of the novadays problems

  • @mushenji
    @mushenji 3 ปีที่แล้ว +1

    This is extremely awesome

  • @Hexcede
    @Hexcede 2 ปีที่แล้ว +1

    So, the bypass was found through a parser differential. But it only works on MacOS... Because of a parser differential 😳

  • @doktoracula7017
    @doktoracula7017 3 ปีที่แล้ว +6

    8:44
    Nah, it doesn't look good, still seems overly complex. Too many nested ifs, this could use the early return pattern. Which you definitely should use whenever you do safety checks, you should return instantly when anything is wrong and do operations only when all is right.

    • @kennichdendenn
      @kennichdendenn 3 ปีที่แล้ว +2

      Except when validating parts of input, i.e. Passwords. Because then you might craft yourself a nice little timing attack vector 😎. But I agree: in most scenarios, this should be the default.

    • @doktoracula7017
      @doktoracula7017 3 ปีที่แล้ว +1

      @@kennichdendenn To be fair I don't remember anytime I needed to check passwords or api keys on my own directly. Always used framework/language builtins for that. But true, that's something to remember.
      Man, writing secure code is hard.

    • @kennichdendenn
      @kennichdendenn 3 ปีที่แล้ว +3

      @@doktoracula7017 it is. When validating passwords, I've always just used a secure string compare function. Sadly, I needed to do so to support an older (but afaik still secure) login system, for which there was no pre-shipped library.

  • @Mayurdusane
    @Mayurdusane 3 ปีที่แล้ว

    Man Man Man !!! You over simplified that initial statement. I understood this in half sleep.

  • @BlueBloxKraft
    @BlueBloxKraft 2 ปีที่แล้ว +1

    Since when was log4j pronounced as log forge?

  • @superhero1
    @superhero1 3 ปีที่แล้ว +1

    Thanks for another video! 😎

  • @TheDeadNorth
    @TheDeadNorth 3 ปีที่แล้ว +4

    Really.. the people saying that you pronounced Log4j wrong are really acting like they didnt miss pronounce it wrong the first time they seen it... I literally see 'Log4j'.. not 'Log Forge'..

  • @reastle1307
    @reastle1307 3 ปีที่แล้ว +1

    linux pwnkit what about it ?

  • @mohamedjames9427
    @mohamedjames9427 3 ปีที่แล้ว

    thank you very much for this asome video .does Anthony Weems has a youtube channel?

  • @sihmy9870
    @sihmy9870 3 ปีที่แล้ว +3

    When can we expect the complete 100% patch for this new log4j?

  • @Meskalin_
    @Meskalin_ 3 ปีที่แล้ว

    ThreadContext Maps are not log4j specific. It is a common concept and std library component in enterprise java developement.

  • @somMelon
    @somMelon 3 ปีที่แล้ว +1

    11:51 which IDE is that?

    • @yusufislek3669
      @yusufislek3669 3 ปีที่แล้ว +3

      Thats not an IDE, its sublime text

  • @baderelhayah7961
    @baderelhayah7961 3 ปีที่แล้ว

    Great video, hopefully you will do the same with the iMessage zero-click exploit

  • @wagyourtai1
    @wagyourtai1 2 ปีที่แล้ว

    9:00 it's that thing that happened in chrome, aka url parsing's jank sometimes

  • @Zedoy
    @Zedoy 3 ปีที่แล้ว

    thanks for a new video ❤️❤️

  • @frozzie8949
    @frozzie8949 2 ปีที่แล้ว

    I didn't know that Michael Cera had a hobby in informatic security

  • @ahmedkazeka
    @ahmedkazeka 3 ปีที่แล้ว

    best man

  • @yuvalid4156
    @yuvalid4156 3 ปีที่แล้ว +3

    Show this to all the apple stans thinking MacOS is safe from hacking

  • @u0000-u2x
    @u0000-u2x 3 ปีที่แล้ว +2

    Logforge, what? :D

  • @cybersecurity3523
    @cybersecurity3523 3 ปีที่แล้ว

    Good job bro 👍👍👍

  • @MasterLJ
    @MasterLJ 3 ปีที่แล้ว

    Imagine having your PRs broadcast and scrutinized all across the web. Glad we're doing it, but that would be a pulse-raiser.

  • @koti2547
    @koti2547 3 ปีที่แล้ว

    Awesome👍

  • @cperception
    @cperception 3 ปีที่แล้ว

    didnt know michael cera is into programming

  • @victortruong2538
    @victortruong2538 3 ปีที่แล้ว

    I thought this was Micheal Cera on the thumbnail

  • @AbdelrahmanRashed
    @AbdelrahmanRashed 3 ปีที่แล้ว +1

    I'm just sad that such Exploits exist, why would anyone want to write their own stupid URI parser instead of using the native/built-in one that Is heavily relied on and tested very well ?

    • @namenlos4198
      @namenlos4198 3 ปีที่แล้ว

      It is about knowledge. If the person implementing the new parser does not know about the URI parser then he needs to find a different route

    • @kennichdendenn
      @kennichdendenn 3 ปีที่แล้ว

      @@namenlos4198 Or maybe about having a much simpler and therfore probably significantly faster parser - logging needs to be very performant after all.

  • @ZelenoJabko
    @ZelenoJabko 3 ปีที่แล้ว +10

    4j is always pronounced as for-j

  • @marian_f1704
    @marian_f1704 2 ปีที่แล้ว

    Yo, Michael Cera, what up?

  • @TimLF
    @TimLF 3 ปีที่แล้ว

    Comment for the algorithm.

  • @riley4252
    @riley4252 2 ปีที่แล้ว +1

    hey thanks for "scanning my minecraft server for a project" aka testing for log4j vulnerability on my private server w/o my permission- which is illegal by the way- i've banned your username X_senpai_ and i'm reporting the droplet you used to Digital Ocean.

    • @riley4252
      @riley4252 2 ปีที่แล้ว +1

      it was kind of you to advertise your youtube channel on the way out /s

  • @Deveyus
    @Deveyus 2 ปีที่แล้ว

    So what I'm hearing is "It's always DNS"
    :)

  • @georgehammond867
    @georgehammond867 3 ปีที่แล้ว

    this is endless loop off breaking by hackers and repairing Log4j by maintainers, 2 hackers are more dangerous together.

  • @giangonzalez3283
    @giangonzalez3283 3 ปีที่แล้ว

    Hey Michael Cera

  • @5Breaker
    @5Breaker 3 ปีที่แล้ว

    You say "hash sign", all I hear is pound key

    • @tomysshadow
      @tomysshadow 3 ปีที่แล้ว

      In this context, it is correct to use the term "hash." It is the name for that part of a URL.

  • @maximilian19931
    @maximilian19931 3 ปีที่แล้ว

    The best fix is just to delete log4j and Blacklist its inclusing.
    Meiß log4j raus und sperr jvm build vom einfügen.

  • @akashsrivastava279
    @akashsrivastava279 3 ปีที่แล้ว

    i want to learn from you

  • @cipher32k
    @cipher32k 3 ปีที่แล้ว +1

    LMAO "Log Forge" they probably say it like that cause it was mostly popularized on minecraft, and the "Forge" mod loader users were affected the most. Still it sounds fucking stupid

  • @ceilingfun2182
    @ceilingfun2182 3 ปีที่แล้ว

    Hi

  • @gilesanderson4860
    @gilesanderson4860 2 ปีที่แล้ว

    fuzzing router

  • @GeneralAutustoPepechet
    @GeneralAutustoPepechet 3 ปีที่แล้ว +6

    If a logging library has capability to parse expressions from log input. Whoever made that should be banned from programing ever again.
    The question lies elsewhere.
    Its a logging library. I expect it to know how write logs to console, file, or to dev null. Why it has lookups? Its clearly bloated.
    I have nothing against additional functionality. But if you really feel like logging library also have to know how to cook pancakes and fix cars make these features disabled by default, or in better case make them as plugins dustributed in separate jars So your stupidity wont even get into my classpath
    If you develop such bloated software you clearly failed as a project manager.

  • @greob
    @greob 3 ปีที่แล้ว

    Nice video, very interesting! :)