[WEB] Under Construction

I don’t know why I found this box so hard. I was definetly over thinking it, I got stuck on just about every dead end imaginable.

Somebody mentioned creating a flask app to automate the last step by proxying another tool. This is a great tip and definetly one I will be committing to memory.

so i pretty much understand what’s the workflow should be, but i’m still getting
the 500 Internal empty (without the desired output within), and i’m still don’t understand
why is it.

What am i missing ?
it would be great if someone could PM me (:
thanks

EDIT: got it.

Type your comment> @myller007 said:

Nice box for beginners. :slight_smile:

In fact this was quite a hard challenge :neutral: I figured it out by getting pointers but I did not figure out why the jwt key confusion vulnerability was to be used.

how to make a simply nmap on ipaddress:port ?
i’ve trying http://ipaddress:port/ but it don’t work
someone can help me please ?

Try without the http. if it’s a website usual ports are 80,8080,443

Type your comment> @Yupsilon said:

how to make a simply nmap on ipaddress:port ?
i’ve trying http://ipaddress:port/ but it don’t work
someone can help me please ?

Guys I am stuck with this… don’t know what is going wrong. It’s just giving me internal server error even after manipulation with cookie. I am using jwt_tool for that and burp to send the new cookie… can someone help?? what am I missing?

Edit: Solved it! Found out what I was doing wrong…

Just finished. I loved this challenge!! Tip: Make sure you download the zip file.

I probably spent 45 minutes trying to figure out how the public key in the JWT would factor into my attack. Once I downloaded the source code I quickly saw the vulnerability. I then tried some futile ways to perform my attack. Ended up learning about jwt_tool. Adding that to my toolbox! Plus I learned about the ability to tamper with a JWT.

That was cool ! :slight_smile: If like me you go for the snake, you might stumble upon a really annoying error when you try to forge something into something else, and that’s because the library you’re probably using has been updated and doesn’t let you do that anymore.
The only workaround I found (apart from walking an other path) was to directly modify the library files.
Don’t forget to revert your changes though !

Really cool challenge, and if someone solved it without using the most famous tool for this type of attack (or similar ones), I’d like to hear from you. I tried to do everything manually and finally fell for the “easy” way, and when I was presented the payload I was like “How am I supposed to think of something like that ?”.

Can someone help/DM me? I believe I have all the pieces but I am getting internal error

1 Like

Can I DM anyone,I need to confirm if I am true about the vuln in workflow

I just want to know if the manupulation of c*****e from R***6 to H***6 has something to do with the chllenge!

Type your comment> @mrWh17e said:

I just want to know if the manupulation of c*****e from R***6 to H***6 has something to do with the chllenge!

yes

Just an FYI - not too bright on my end but I wasn’t using the VPN access originally for this challenge. I wasted at least a day dealing with server 500 errors which I suspect was due to traffic redirecting through safebrowsing.googleapis. Once i logged into the VPN and retraced my steps, I was able to complete this task. Tools and commands that failed originally worked through the VPN.

Having trouble with this, maybe cause it’s older. Wrote my python script, stuck here:

Please don’t delete

jwt.exceptions.InvalidKeyError: The specified key is an asymmetric key or x509 certificate and should not be used as an HMAC secret.

Then I found a script on Github, more or less the same as mine, seems like it was made for this challenge. It throws the same error. Digging deeper I found I would have to downgrade PyJWT to a very early version where this check hasn’t been implemented. I don’t want to do that. My kali is f’ed up already, I need to run most recent tools (like cme) through pyenv exec…

Gonna try changing the cert header to public now, but idk there’s gotta be a way?

anyone happy to help me a bit?
i have found the interesting bit, but my payload is somehow not giving me the results back that im expecting.

please DM me

Hello, I’m quite lost: I managed to change the S******** of the J***W******n from S***6 to H***6. Yet the server still gives an “Internal Error”. When spinning up a local instance with the supplied Source-Code, the modified J***W******n is accepted, but on the remote instance it is not. Anyone have a clue? Please PM me, I have no idea on how to proceed.

Type your comment> @gutjuri said:

Hello, I’m quite lost: I managed to change the S******** of the J***W******n from S***6 to H***6. Yet the server still gives an “Internal Error”. When spinning up a local instance with the supplied Source-Code, the modified J***W******n is accepted, but on the remote instance it is not. Anyone have a clue? Please PM me, I have no idea on how to proceed.

I passed through the same and at least in my case it turned out to be an issue when echoing the key to the file. Instead, I manually copy-pasted it into the .pem file, replaced line feed strings with actual line feeds, and then it just worked!

Type your comment> @daverules said:

if you get an internal error then it means the format of something is not quite right. in my case, it was that i was missing a line break at the end of something else . hope that helps

A missing line break was my whole problem with the JWT portion. Thanks @daverules

Learned lots of new stuff here like JWT.
There’s a great python tool for jwt exploits too.

A highly relevant tool for this Challenge has some tricky syntax that doesn’t always combine as might be expected. Checking the Issues list for the tool might save you a lot of time and frustration.

i’m having some trouble trying to set this node app up on docker…it keep giving me unhandledpromiserejection error for some reason. anyone have the same issue?