T-Jungle

Challenge Information

  • Category: Web Security

  • Level: easy

  • Points: 100

description

Try to bypass my conditions ;)

Solution

let's start, after you open the target you see the block of code and your mission is bypass it and get the flag right ??? ,

first I'll explain this block of code and how it work , well let's break down the code .

well, you now know the functionality of this block of code, and it's vulnerable with PHP Type Juggling what is PHP Type Juggling ?? well, PHP treats numeric-looking strings (like 0e...) as numbers in comparisons, If a password hashes to a value like 0e123456..., PHP interprets it as 0 * 10^123456 = 0,so, any password that results in an MD5 hash of 0e... will bypass authentication.

all of this because (==) it should be (===) , so to bypass this page without pass we type and password it's hash start 0e like 240610708 or QNKCDZO , okay and we know from above we have Get parameter called paswd so in url field we type for example (example.com/?passwd=value ) for our case:

now type it and got the flag

Last updated