Let’s play a game: what is the deadly bug here?

Sdílet
Vložit
  • čas přidán 25. 01. 2018
  • This short php code contains a critical vulnerability. In this video I will explain in detail what I think while analysing it.
    Original source of challenge: www.securify.nl/en/blog/SFY20...
    Link to tweet: / 951499972582703104
    =[ ❤️ Support ]=
    → per Video: / liveoverflow
    → per Month: / @liveoverflow
    =[ 🐕 Social ]=
    → Twitter: / liveoverflow
    → Website: liveoverflow.com/
    → Subreddit: / liveoverflow
    → Facebook: / liveoverflow
    =[ 📄 P.S. ]=
    All links with "*" are affiliate links.
    LiveOverflow / Security Flag GmbH is part of the Amazon Affiliate Partner Programm.
    #CodeAudit #WebSecurity

Komentáře • 665

  • @ColinRichardson
    @ColinRichardson Před 6 lety +1184

    Note to self.. Check types of incoming information, not just that it exists.

    • @96shahab
      @96shahab Před 6 lety +32

      Note to self.. Do that too

    • @donwald3436
      @donwald3436 Před 6 lety +14

      That is called type checking, where have you heard of this before?

    • @-eurosplitsofficalclanchan6057
      @-eurosplitsofficalclanchan6057 Před 6 lety +4

      Just real escape sting chill

    • @donwald3436
      @donwald3436 Před 6 lety +1

      「ᗴᔕ」- EuroSplits Offical Clan Channel
      real escape 2 mysql i, couldn't even get escaping right after two attempts.

    • @MatthijsvanDuin
      @MatthijsvanDuin Před 6 lety +32

      Only in PHP though, since no other language would be stupid enough to implicitly decode HTTP POST variables into structured data types, thereby burdening all programmers by having to type-check incoming POST variables. :P

  • @dunste123
    @dunste123 Před 3 lety +104

    Fun fact: in PHP 8 these warnings for incorrect types passed to functions kill the script with an error instead

    • @edgeeffect
      @edgeeffect Před 2 lety +4

      AT LAST! I've waited through 5 major versions of PHP for them to get rid of this truly awful excuse for an error system.

    • @TheStiepen
      @TheStiepen Před 2 lety +19

      Ah that's why so much PHP code isn't compatible with PHP 8 :D

    • @sebastiangudino9377
      @sebastiangudino9377 Před rokem +3

      ​@@TheStiepenThat also why PHP8 is actually a useful programing language where you don't have to worry about this type of things

  • @MichaelButlerC
    @MichaelButlerC Před 6 lety +376

    this is why every production php application should hard crash on warnings

    • @inx1819
      @inx1819 Před 5 lety +10

      try{...} catch (...) {echo "Error!"}; ???????????

    • @rogercruz1547
      @rogercruz1547 Před 5 lety +20

      @@inx1819 Warnings don't throw exceptions...
      You would have to make a plugin/extension of some sorts or call an output checking function after every potentially dangerous call.
      Or checking for null on those hmacs...

    • @SpareSomeChange8080
      @SpareSomeChange8080 Před 5 lety +7

      @@rogercruz1547 Easy to get this setup with set_error_handler and having that handler throw an ErrorException based on what error number is triggered.

    • @edgeeffect
      @edgeeffect Před 2 lety +1

      Speaking as a PHP developer of many many years.... warnings are a CURSE! ........ PHP is a curse

  • @ZeroUm_
    @ZeroUm_ Před 5 lety +53

    "Let's craft a cryptographic function which is very likely to be used in security contexts, and let's not fail when unexpected things are passed to us. What could go wrong." I'm livid.

  • @toddkfisher
    @toddkfisher Před 6 lety +1925

    The deadly bug is PHP itself.

    • @logs
      @logs Před 6 lety +40

      Your face seems to be a bigger bug.

    • @MarcoMorelos
      @MarcoMorelos Před 6 lety +47

      Every time I hear of PHP I hear about all these attacks and insecurities. It makes me nervous

    • @logs
      @logs Před 6 lety +45

      Meh, that's bullshit. PHP is the most used web language.
      Even Facebook is made with PHP.

    • @camwhite1697
      @camwhite1697 Před 6 lety +16

      MusicAddiction Although Facebook uses their own modified version of PHP, it is the same. Much of their backend servers are implemented in C++ anyways

    • @logs
      @logs Před 6 lety +15

      I think FB is using HHVM aka "Facebook HipHop" or so. But yeah their servers could possibly be C++, but the fact that Facebook's main preferable programming language was PHP proofs all these "PHP sucks" commenters wrong.

  • @JonathanGray89
    @JonathanGray89 Před 6 lety +415

    That HMAC function definitely should have just thrown an error. It is incumbent on the programmer to know all possible states of a given algorithm, but if you look at the documentation null isn't even listed as a possible return value for hash_hmac. The fact that it's a cryptographic function, I almost have to wonder if that was put there intentionally. This definitely shows the importance of proper user-input sanitization.

    • @BonBaisers
      @BonBaisers Před 5 lety +65

      Exactly, this function should throw exception for any parameter being null because doing so makes no sense at all. That does not give a good impression on PHP.

    • @apuherra8864
      @apuherra8864 Před 5 lety +40

      The fact that the null output on wrong input type is undocumented in official PHP docs is just terrible. Also, not erroring out when giving inputs of wrong type is not something PHP crypto functions are famous of. A good programmer must always check the types of inputs and also preferably the output type before continuing to keep the code safe.

    • @BonBaisers
      @BonBaisers Před 5 lety +3

      @@apuherra8864 I get this and agree with you. But when you make a lib you can't expect people to read the source code (if available) and understand what flaws the code you have written can introduce in their code. As a software architect, I always ensure my teams code follow the Design by contract (DbC) principles. In this case, and it's a good one, hash_hmac should check Preconditions and Postconditions (arg types should be strings, not empty and result should not be a predictable result as a hashed \0 string or empty hashed managed string, etc...). This 2 or 3 lines of code could save systems from vulnerabilities and save the purpose of the dev using your lib trying to secure their systems or APIs. I often read or reverse engeneer dotnet framework code and I'm always happy to check that they follow the DbC pattern.

    • @apuherra8864
      @apuherra8864 Před 5 lety +5

      @@BonBaisers I mostly agree, but you _should_ change your "should" mindset to "must" in many places as per RFC 2119. Keeping "shoulds" when designing and not erroring out all the way back to where the error came on unintended circumstances just allows these hash_hmac types of bugs (or _may_ I say, undocumented features) to happen.

    • @Selur91
      @Selur91 Před 5 lety +2

      # Never trust parameters from the scary internet, only allow the white list through.

  • @maxwellsmart3156
    @maxwellsmart3156 Před 3 lety +6

    I originally thought the "deadly bug" was the use of PHP.

  • @BlackJacketWasp
    @BlackJacketWasp Před 5 lety +5

    Thanks for the super detailed walkthrough. I love how you concisely laid out your thought process and the various ideas you had or the checks to do, whether they worked or not for this instance.

  • @akineko9073
    @akineko9073 Před 6 lety +3

    this is the fourth vid i have watched by you and i have to say, youre a real mvp.
    I am interested very much in the stuff you cover on your channel, but not enough to really get into it or to justify dropping other hobbies for it.
    Thank you for more or less staying at the same niveau of needed knowledge for the most part. great content, keep it up ^^

  • @jpersson8718
    @jpersson8718 Před 3 lety +8

    "Stupid brain, so unreliable"
    Story of my life....

  • @rajkhattar2830
    @rajkhattar2830 Před 6 lety

    Man you are doing an amazing job at these kind of videos ! Really enjoyed this one ! Keep making similiar kinds of videos . Getting into the nooks-n-crooks of things is what I always wanted !

  • @ItsLogic
    @ItsLogic Před 4 lety +15

    I watched this video first a year ago, and now I am watching it again. I understand so much more but don’t feel like I could even get close to solving it. December 2020 I will come back and see what I think then.

    • @Omar-wm9kz
      @Omar-wm9kz Před 3 lety

      am waiting for ur comment and i will come in december 2021 cuz itz my firsr time here.

    • @ZoMbiE4CoBRA
      @ZoMbiE4CoBRA Před 2 měsíci +1

      so what happened? did you get close to solving it after 4 years?

    • @abdirahmann
      @abdirahmann Před 2 měsíci +2

      @@ZoMbiE4CoBRA you actually reminded him 🤣🤣🤣

  • @dtaPacman
    @dtaPacman Před 6 lety +1

    Thankyou! as someone trying teach themselves code, your explanations were really informative.

  • @aspektx
    @aspektx Před 6 lety +4

    I can't code, but you explain well enough that I'm actually beginning to understand bits and pieces and patterns.

  • @automata8973
    @automata8973 Před 6 lety +5

    This video after long time reminded me of what amount fun we can have. Thanks for the great video.

  • @martolomiuu
    @martolomiuu Před 6 lety +1

    Thanks to the subtitles i can underestand all ty liveoverflow

  • @TaiKahar
    @TaiKahar Před 6 lety +1

    Nice videos. I enjoy them (even though I already know a lot of the stuff). Your way of thinking matches a lot of how I think when looking at code.

  • @LKD70
    @LKD70 Před 5 lety +5

    I started with Php when I was a young teen... Misplacing the argument/parameters in methods is far too easy and common. Php is a language of inconsistencies, always important to triple check for that sort of thing.

  • @seanpianka1818
    @seanpianka1818 Před 6 lety

    This is absolutely awesome. Thank you for making this.

  • @triularity
    @triularity Před 6 lety +10

    You left out the Environment Elephant in the code room issue. On unixy servers that have multiple users, it is often easy to see the environment variable values of another user's processes. So if anyone else on that server can see your secret, they could possibly do more damage than just what that one script has access to. This is a known security issue that has popped up at times over the decades.
    In hardened OSs, users may be blocked from seeing the process of other users (and thus their environment), but that shouldn't be assumed in web code.

  • @windowsforvista
    @windowsforvista Před 6 lety +1

    This was such a good video! Please make more like this. You've earned a loyal subscriber :)

  • @roger109z
    @roger109z Před 4 lety +4

    I honestly had no idea you could pass an array like that

  • @Zzznmop
    @Zzznmop Před 6 lety +2

    Thanks for another awesome video!! This channel gets me pumped to capture some flags :D

  • @Otakutaru
    @Otakutaru Před 6 lety +89

    So... The vulnerability was actually 2 dumb and exploitable vulnerabilities... That hash_hmac function gives a WARNING when fed an array and returns a NULL?? also... the secret can be NULL... (facepalm). What gives? What is the benefit of having a NULL secret? Please, let me know, I'm puzzled.

    • @JakeN482
      @JakeN482 Před 6 lety +5

      Maybe it inherited the old minute man nuke doctrine's 00000000 input? Or more seriously it might be a feature for the unit testing framework of the hmac implementation, and it's got hard coded outputs that return sooner than when a secret exists. I doubt oracle has such a unit testing framework for php though, it's one of the buggiest and least consistent languages out there. The most likely scenario is that it just doesn't care if the input is null, and processes it as if it were 0.

    • @1e1001
      @1e1001 Před 6 lety

      It's so that the secret is predictable, so the last if statement would not run and stop the program

    • @Otakutaru
      @Otakutaru Před 6 lety +4

      RedMikePumpkin Yeah, I got it. I was asking about what were the developers thinking when they coded the function.

    • @rogercruz1547
      @rogercruz1547 Před 5 lety +10

      @@Otakutaru The core php devs, thinking while coding? That's a new one

    • @LiEnby
      @LiEnby Před 4 lety

      NULL == 0 so the secret is really just 0, which makes sense to work.

  • @juliavanderkris5156
    @juliavanderkris5156 Před 5 lety

    Awesome video! Really made me understand better how to approach something like this.

  • @shreyas_._
    @shreyas_._ Před 6 lety

    Every single video on this channel is amazing and 100% informative. .....
    I love this channel....

  • @BunniBuu
    @BunniBuu Před 6 lety +1

    I don't know anything about coding and CZcams recommended this video. I have no idea what was talked about in this video but keep it up, good stuff.

  • @Warmonger1178
    @Warmonger1178 Před 5 lety +10

    I’m surprised you didn’t at least mention the timing unsafe hash comparison. PHP has a built in hash_equals() function to mitigate...

  • @azazmir9340
    @azazmir9340 Před 5 lety

    more of these challenges please

  • @Entropy67
    @Entropy67 Před 11 měsíci

    Great video, i got to the same part as you at the end but i couldn't figure out what kind of input would change the type, and I got lazy and just watched the video instead

  • @Hyperverse
    @Hyperverse Před 5 lety

    I've watched a few of your videos now and this is the first time I really understood what you were saying. I learned about Hashing algorithms in my SEC+ class. I just wanted to share my happiness for knowing like 80% of what you were saying.

  • @JohnOmbagi
    @JohnOmbagi Před 5 lety +1

    I love how you explain it. :D

  • @user-pj3uv6re7s
    @user-pj3uv6re7s Před 6 lety +1

    Uncovering the deadly bug was truly exciting !

  • @MuhammadMuhaddis
    @MuhammadMuhaddis Před 5 lety

    Your logics are amazing!

  • @sentinalprime8838
    @sentinalprime8838 Před 3 lety

    Amazing video man i have been learning a lot in this lock down this is all because of you and John Thanks a lot for making videos and spreading knowledge amazing work . Lots of respect to all those who share knowledge.....

  • @Calmerism
    @Calmerism Před 3 lety +1

    whatching php bugs is just like watching wheels turn. It never ends.

  • @honkatatonka
    @honkatatonka Před 6 lety +150

    This is the first time I understand why people dislike PHP ... cheesus. EDIT: is this hash_hmac part of the core lib or some 3rd party screw up?

    • @LiveOverflow
      @LiveOverflow  Před 6 lety +65

      part of core php.net/manual/en/function.hash-hmac.php

    • @DeusEx3
      @DeusEx3 Před 6 lety +66

      honkatatonka I was thinking the same thing. Wow. I even checked the docs and they didn't mention returning null sometimes. I'm shocked in the nerdiest of ways...

    • @jarrodp5410
      @jarrodp5410 Před 5 lety +3

      honkatatonka wow this is a new type of language

    • @Dragiux
      @Dragiux Před 5 lety +7

      @@DeusEx3 www.php.net/manual/en/function.hash-hmac.php#122657 remember to read comments. PHP documentation is notoriously incomplete.

  • @sametaylak2698
    @sametaylak2698 Před 6 lety +1

    Pretty good. Thank you for sharing your knowledge

  • @ltstaffel5323
    @ltstaffel5323 Před 6 lety

    Love this kind of video and would like to see more like it!

  • @WrenchIO
    @WrenchIO Před 10 měsíci

    learned a lot , thanks for your video

  • @melihcelik9797
    @melihcelik9797 Před 5 lety +2

    Very good explanation, but as an habit I always check if a variable is null if the function may return null. That is a great example how it can have effects on live servers, not very visible at the beggining but if someone covers it your data and privacy is gone.
    Oh, also your money too.

  • @EmmanuelIbikunle
    @EmmanuelIbikunle Před 6 lety +3

    Great video ... thanks man for sharing

  • @renakunisaki
    @renakunisaki Před 5 lety

    PHP is always so full of surprises!

  • @aaronknobloch2332
    @aaronknobloch2332 Před 6 lety +2

    I really liked this video topic and format. Thanks!

  • @Videonauth
    @Videonauth Před 5 lety +16

    On top of what you found the last line itself is a deadly bug, Passing data directly into exec opens a door for all kinds of injections.

    • @AnPham-uz3td
      @AnPham-uz3td Před 4 lety +2

      That last line is so obvious that anyone can see. I think the problem was meant for you to find the non-trivial bug, the last line only for getting the content of flag file on the machine (if it was in CTF).

  • @gabrielkwiecinskiantunes8950

    I subscribed instantly after the logo animation.

  • @KamiKagutsuchi
    @KamiKagutsuchi Před 6 lety +387

    It's php, that's your deadly bug right there.

    • @G4MR1
      @G4MR1 Před 6 lety +30

      oh boi if you think that's bad, go look up "Heartbleed" which was written in C. Doesn't really matter the language, most common errors in programming are almost always caused by human error.

    • @Jacksonbanan
      @Jacksonbanan Před 6 lety +4

      KamiKagutsuchi I thought the same thing haha

    • @honkatatonka
      @honkatatonka Před 6 lety +20

      Come on, C is so barebones. But having such a loose unintuitive API as hash_hmac is just bad

    • @simivb
      @simivb Před 6 lety +4

      Well this particular error is caused by weak typing and not compiling. You can of course make horrible mistakes in any languages, but those two things really don't help you in preventing mistakes.

    • @dreamyrhodes
      @dreamyrhodes Před 6 lety +12

      honkatatonka true. hash_hmac is just bad in this case. It should never return NULL where you expect it to get a hash. Input type violation should result in a fatal error, not a warning.

  • @user-bw3fm4cd6y
    @user-bw3fm4cd6y Před 6 lety +12

    thumbs up for using redstar os. ;)

  • @marcelocarmeiro
    @marcelocarmeiro Před 6 lety

    Excellent explanation. You deserve my subscribe.

  • @metaorior
    @metaorior Před 6 lety

    Love your channel !!
    keep up :p

  • @metalpachuramon
    @metalpachuramon Před 6 lety

    This was nice, I thought that too, but only when I ran out of options

  • @XuanbinLor
    @XuanbinLor Před 5 lety

    Very insightful

  • @madisonhanberry6019
    @madisonhanberry6019 Před 6 lety

    I'm loving these educational videos! Do you know any good resources for getting started with digital CTF?

  • @PedroMAMoura
    @PedroMAMoura Před 6 lety

    Always great!

  • @secureitmania
    @secureitmania Před 4 lety

    Bro I am missing your videos 😭😭.. keep upload this type of videos

  • @roguesecurity
    @roguesecurity Před 6 lety

    Another awesome video. Thanks

  • @tw11tube
    @tw11tube Před 4 lety

    I expected a completely different approach to that challenge when I reviewed the code in the beginning. I guessed that the challenge description contains an example invocation of that PHP script *without* the optional nonce, so you know the HMAC for one specific safe string like "www.google.com". In that case, you could input the safe string as nonce, and the new nonce-specific secret will be the public HMAC for the safe string, which enables you to calculate the HMAC for any input you want.

  • @sucrose
    @sucrose Před 6 lety

    Thanks for the tips!

  • @MayankSharma
    @MayankSharma Před 6 lety

    Awesome!!! Thanks for sharing.

  • @frootube5662
    @frootube5662 Před 4 lety +1

    why does youtube not recommend people like you... why do i have to search so hard!!!

  • @kken8766
    @kken8766 Před 4 lety

    thx for making videos like this.

  • @AlSupertramp0
    @AlSupertramp0 Před 6 lety +98

    Also, timing attack on "!==" might be possible.

    • @abdilahrf
      @abdilahrf Před 6 lety +8

      how ?

    • @Fs3i
      @Fs3i Před 6 lety +124

      Abdillah Muhamad String-Equals stops as soon as a difference is found. So (simplified) you put in a hmac beginning with an 'a' and measure the time the script takes to run, then you do it with a 'b', 'c',
      .. - for one input the string-comparison will take slightly longer because it has to check the second letter as well. That will be your first letter.
      Even if you try every start-character 1000x times, it would still only take (256 / 4 = 64'000) requests to the server, which is easily feasible within minutes.
      In reality it's a bit harder because string-equals usually checks more than one character at a time.
      And if you want to defend against it: look up constant time string equality checks.

    • @SweetHyunho
      @SweetHyunho Před 6 lety +25

      Fly - Thanks, I learned something useful today.

    • @macccu
      @macccu Před 6 lety +47

      sorry but this sounds like a bs. You would need PERFECTLY SAME network and server conditions on EVERY request to even have a chance at measuring execution time. I dont even think you could measure difference between php reaching second or third char

    • @theapexsurvivor9538
      @theapexsurvivor9538 Před 6 lety +5

      macccu well, you can measure it against your server ping, so then you don't need the same conditions because you have a standard measurement.
      And you could just submit more detailed variables, ie have the first 3 digits vary and then you should have a slight difference in the vicinity of the correct string, so you have your first 2 digits, rinse and repeat to get the rest.

  • @ericspeidel7593
    @ericspeidel7593 Před 5 lety

    Interesting analysis, thanks!

  • @sigithermawan277
    @sigithermawan277 Před 3 lety

    it s so simple sir
    and i like you

  • @inferno3853
    @inferno3853 Před 4 lety +1

    before watching: does it have to do with the exec? and couldn't you basically use the post value as a way to run code through it? (i never really looked at php, i have little to zero knowledge what the code does but i can assume)
    edit: ah nvm

  • @marimuthumanoj7206
    @marimuthumanoj7206 Před 4 lety

    This is such a great video

  • @Davimejor
    @Davimejor Před 6 lety

    amazing men! really good content!

  • @bjornroesbeke
    @bjornroesbeke Před 6 lety +1

    Great thinking. In the end it's all so obvious!
    There must be so many vulnerabilities in my code...

    • @rogercruz1547
      @rogercruz1547 Před 5 lety

      I'm worried I have a framework written in this thing... and I'm not sure the hmac bullshittery is documented in the phpsadness page

  • @brianzhou1806
    @brianzhou1806 Před 6 lety

    Great content, keep it up!

  • @sleaf6
    @sleaf6 Před 6 lety

    how did i not know about this channel until now?!

  • @KunalSaini97
    @KunalSaini97 Před 4 lety +1

    Literally every word went above my head.....
    Still watched the whole video xD

  • @dcrasch
    @dcrasch Před 5 lety

    Awesome! What do you use to annotate your videos?

  • @djthomasx
    @djthomasx Před 5 lety

    Awesome video!

  • @KaleshwarVhKaleshwarVh

    Beautiful.

  • @TheSam1902
    @TheSam1902 Před 6 lety

    Thanks TIL you can pass an array as a POST value, nice

  • @padmakumarnxt
    @padmakumarnxt Před 4 lety

    Great video. Keet it coming.

  • @d1rtyharry378
    @d1rtyharry378 Před 4 lety

    Damn that! When I first saw this I didn't couldn't understand shit. But, today I saw it again and now that I understand it, I wanna explore more. Thanks man! You inspire me to keep going

  • @madanugraha8587
    @madanugraha8587 Před 5 lety

    omg this channel is so great ! ! ! !

  • @shefalikumari3513
    @shefalikumari3513 Před 3 lety

    Wonderful

  • @TheGrimravager
    @TheGrimravager Před 4 lety +1

    I watched this video when it came out.
    2 years later I am a php developer and I watched it again. It felt completely different :)

    • @Omar-wm9kz
      @Omar-wm9kz Před 3 lety

      why and how?

    • @TheGrimravager
      @TheGrimravager Před 3 lety

      @@Omar-wm9kz I learned how php works and have worked with it on a daily basis, makes you pick up things almost instantly where otherwise you wouldn't even consider them

  • @x0r1k
    @x0r1k Před 5 lety

    the biggest bug is that input for the exec was not escaped at all

  • @salimal-badi7063
    @salimal-badi7063 Před 6 lety

    مبدع ، great man ✌️

  • @thepvporg
    @thepvporg Před 5 lety

    There is no salting value to generate a value to test against the hash issued, no filter_var on the input and no white listing and the exec function can be exploited.

  • @ajxbjj
    @ajxbjj Před 6 lety

    Arrays was my first thought :)

  • @yiannissiantos127
    @yiannissiantos127 Před 6 lety +5

    Most PHP frameworks turn warnings/notices/errors into exceptions so that will mitigate these sort of issues.

  • @liammaclennan1402
    @liammaclennan1402 Před 5 lety

    Would a vulnerability in the code only allow an XXS and SQL attack or are there other attacks that can be executed ?

  • @sliyarohmodus5749
    @sliyarohmodus5749 Před 5 lety

    The host parameter is not sanitized. An attacker can pass extra commands to the exec function and cause them to be executed at the same privilege level as the php script.

  • @vukkulvar9769
    @vukkulvar9769 Před 6 lety +6

    An other possibility is PHP is configured so all errors are fatal. If the PHP do not have an error handler, it usually display them with the scope variables. That would expose the value of $secret, allowing you to forge any signature to futur requests.

    • @MaakaSakuranbo
      @MaakaSakuranbo Před 6 lety

      Huh? Usually when PHP errors for me it just goes 500, not showing any data. If theres any data shown it's in the error.log, which of course someone from outside shouldn't be able to access.

    • @vukkulvar9769
      @vukkulvar9769 Před 6 lety

      It's a PHP configuration. Some people forget "development" mode that'll format the errors and exceptions into a HTML response

    • @BikingWIthPanda
      @BikingWIthPanda Před 6 lety

      display_errors = On

  • @snowdaysrule
    @snowdaysrule Před 5 lety

    I actually got as far as determining that the goal here would be to set a value for nonce that would allow you to compute the hmac that made the !== statement true, but I'm not a programmer so wasn't able to determine on my own what to set the nonce to. I was really big into studying the security of the xbox 360 and learning how all the exploits worked so that definitely helped me out here.

  • @MidnightSt
    @MidnightSt Před 6 lety +1

    9:47 i had to get here and get reminded that you can to client-side php arrays, and then... i bet that if you supply an empty array, isset == true, but then output of the hash functions is either predictable, or a predictable gibberish (for example it spits out null or false or something like that), making all the rest of the checks "pass" == get skipped, basically

  • @UnwovenSleeve
    @UnwovenSleeve Před 6 lety

    I understood none of that, but have the feeling that I learned something.

  • @royalpie
    @royalpie Před 6 lety

    I also browse the PHP docs in incognito.

  • @mu11668B
    @mu11668B Před rokem

    I clicked only after you mentioned about the array input trick. It's not even a thing in languages I usually use. They just throw uncaught exceptions and crash.

  • @89elmonster
    @89elmonster Před 6 lety

    Subbed, good channel 👍

  • @MrKristian252
    @MrKristian252 Před 6 lety

    More of this! +1 sub after just 3 minute in.

  • @PiesekLeszek90
    @PiesekLeszek90 Před 6 lety

    You could also make 'host' variable an array (and somehow put code that you want to execute in it) and send 'hmac' as null, right? Someone correct me if I'm wrong.

  • @IslamIsDanger
    @IslamIsDanger Před 3 lety

    Great!

  • @redd_cat
    @redd_cat Před 6 lety

    Very nice video, I wish I was better at CTF

  • @windchime9720
    @windchime9720 Před 6 lety

    That was awesome!!!

  • @Ulvis_B
    @Ulvis_B Před 4 lety

    first seen code thinking about null bug