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

Поділитися
Вставка
  • Опубліковано 7 вер 2024

КОМЕНТАРІ • 76

  • @FaultyMuse
    @FaultyMuse 2 роки тому +129

    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 2 роки тому +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 2 роки тому +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

  • @rinzler_d_vicky
    @rinzler_d_vicky 2 роки тому +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 2 роки тому +2

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

    • @rinzler_d_vicky
      @rinzler_d_vicky 2 роки тому +1

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

  • @VLS-Why
    @VLS-Why 2 роки тому +74

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

    • @rinzler_d_vicky
      @rinzler_d_vicky 2 роки тому +6

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

    • @themadichib0d
      @themadichib0d 2 роки тому +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.

  • @D1ndo
    @D1ndo 2 роки тому +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.

  • @EER0000
    @EER0000 2 роки тому +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. 😄

  • @ALZlper
    @ALZlper 2 роки тому +5

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

  • @j3r3miasmg
    @j3r3miasmg 2 роки тому

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

  • @ee79bb3a7
    @ee79bb3a7 2 роки тому +3

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

  • @user-ko7oo2qg1g
    @user-ko7oo2qg1g 2 роки тому +1

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

  • @ThistleBlue
    @ThistleBlue 2 роки тому +2

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

  • @logiciananimal
    @logiciananimal 2 роки тому +2

    Jazzer looks neat - thanks for the reference.

  • @MuhammadBinZafar1
    @MuhammadBinZafar1 Рік тому

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

  • @PavelTimofeev
    @PavelTimofeev 2 роки тому +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 2 роки тому +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

  • @TheDeadNorth
    @TheDeadNorth 2 роки тому +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'..

  • @yuvalid4156
    @yuvalid4156 2 роки тому +3

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

  • @mushenji
    @mushenji 2 роки тому +1

    This is extremely awesome

  • @superhero1
    @superhero1 2 роки тому +1

    Thanks for another video! 😎

  • @doktoracula7017
    @doktoracula7017 2 роки тому +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 2 роки тому +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 2 роки тому +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 2 роки тому +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 2 роки тому

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

  • @frozzie8949
    @frozzie8949 2 роки тому

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

  • @jonathanvorster8621
    @jonathanvorster8621 2 роки тому

    I really enjoyed this! Good video.

  • @Meskalin_
    @Meskalin_ 2 роки тому

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

  • @baderelhayah7961
    @baderelhayah7961 2 роки тому

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

  • @MasterLJ
    @MasterLJ 2 роки тому

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

  • @wagyourtai1
    @wagyourtai1 2 роки тому

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

  • @Zedoy
    @Zedoy 2 роки тому

    thanks for a new video ❤️❤️

  • @greob
    @greob 2 роки тому

    Nice video, very interesting! :)

  • @Hexcede
    @Hexcede 2 роки тому +1

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

  • @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.

  • @mohamedjames9427
    @mohamedjames9427 2 роки тому

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

  • @ahmedkazeka
    @ahmedkazeka 2 роки тому

    best man

  • @krzysztoflewandowski8262
    @krzysztoflewandowski8262 2 роки тому

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

  • @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

  • @cperception
    @cperception 2 роки тому

    didnt know michael cera is into programming

  • @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

  • @victortruong2538
    @victortruong2538 2 роки тому

    I thought this was Micheal Cera on the thumbnail

  • @ZelenoJabko
    @ZelenoJabko 2 роки тому +10

    4j is always pronounced as for-j

  • @cybersecurity3523
    @cybersecurity3523 2 роки тому

    Good job bro 👍👍👍

  • @koti2547
    @koti2547 2 роки тому

    Awesome👍

  • @BlueBloxKraft
    @BlueBloxKraft 2 роки тому +1

    Since when was log4j pronounced as log forge?

  • @TimLF
    @TimLF 2 роки тому

    Comment for the algorithm.

  • @gcm4312
    @gcm4312 2 роки тому +2

    Logforge, what? :D

  • @sihmy9870
    @sihmy9870 2 роки тому +3

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

  • @reastle1307
    @reastle1307 2 роки тому +1

    linux pwnkit what about it ?

  • @marian_f1704
    @marian_f1704 2 роки тому

    Yo, Michael Cera, what up?

  • @giangonzalez3283
    @giangonzalez3283 2 роки тому

    Hey Michael Cera

  • @Deveyus
    @Deveyus 2 роки тому

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

  • @AbdelrahmanRashed
    @AbdelrahmanRashed 2 роки тому +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 2 роки тому

      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 2 роки тому

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

  • @georgehammond867
    @georgehammond867 2 роки тому

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

  • @somMelon
    @somMelon 2 роки тому +1

    11:51 which IDE is that?

  • @akashsrivastava279
    @akashsrivastava279 2 роки тому

    i want to learn from you

  • @gilesanderson4860
    @gilesanderson4860 2 роки тому

    fuzzing router

  • @ceilingfun2182
    @ceilingfun2182 2 роки тому

    Hi

  • @cipher32k
    @cipher32k 2 роки тому +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

  • @maximilian19931
    @maximilian19931 2 роки тому

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

  • @GeneralAutustoPepechet
    @GeneralAutustoPepechet 2 роки тому +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.

  • @5Breaker
    @5Breaker 2 роки тому

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

    • @tomysshadow
      @tomysshadow 2 роки тому

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