RainyDay - HTB [Discussion]
by - Thursday, January 1, 1970 at 12:00 AM
(November 15, 2022, 12:32 AM)samfisher91 Wrote:
(November 13, 2022, 05:48 PM)Null4ble Wrote: Since many people it's reaching me on PM, I will try to explain it here:

basically it's about to "exploit" the 72bytes limit on bcrypt. Just as sempit3rnal comment days ago.
https://security.stackexchange.com/questions/39849/does-bcrypt-have-a-maximum-password-length

the script ask for minimum of 1 char, and max 30 char, normally each char use 1 byte, but not all chars, for example á, you can search for them in UTF-8
so if you bcrypt() let say 4 "á" (that weights 4bytes each), you will be using 16bytes
so the salt will be attaching to you string, so in the reality the system will be doing this:
bcrypt( ááááSECRET_SALT)
this "payload" weights 27bytes, no problem for bcrypt, if you put let say 15xá + 11xo
áááááááááááááááooooooooooo this weights 71bytes
so the script will be doing this
bcrypt(áááááááááááááááoooooooooooS)   <--- only one space left for the SECRET_SALT on position 72
so you have to brute force your already know payload (áááááááááááááááooooooooooo+$)   where $ is a loop of every know character, and each hash created, you need to compare it with the one created with the server script (with the server script you need to use exactly the same payload as your script (áááááááááááááááooooooooooo+$)), if they match, you have found the first letter, of the SECRET_SALT
then you have to delete one "o" from the original 11 and you will attach the letter found on the bruteforce (S), then again, brute force every letter on the position 72, loop this, until you get your SECRET_SALT

I hope I made myself clear, stoned as fuck, and not my native language.


Thanks my fellow stoner from other side of the world ,enjoy ur joint  :angel:


Any time, glad I can help
Reply
Good Luck Everyone
Reply
Ok, I think this doesn't goes against the rules, I already explained how to get the SALT, if your are not able to break it, this is the SALT: H34vyR41n
Reply
Thx for the input. I was able to get the SALT by myself and could finally root the box. Good learning curve.

hanky is a nice 4byte char :-)
Reply
(November 16, 2022, 10:19 AM)s0jnik Wrote: Thx for the input. I was able to get the SALT by myself and could finally root the box. Good learning curve.


hanky is a nice 4byte char :-)


LOL, that's the one I used
Reply
(October 16, 2022, 11:48 PM)lnf02 Wrote: Once you get inside the Host, you will need to escalate privileges (as always)... 

I think you will find this useful ;)


im stuck at geting user acess
Reply
(October 16, 2022, 11:48 PM)lnf02 Wrote: Once you get inside the Host, you will need to escalate privileges (as always)... 

I think you will find this useful ;)


thank
Reply
(October 16, 2022, 11:48 PM)lnf02 Wrote: Once you get inside the Host, you will need to escalate privileges (as always)... 

I think you will find this useful ;)


ok then
Reply
(October 16, 2022, 11:48 PM)lnf02 Wrote: Once you get inside the Host, you will need to escalate privileges (as always)... 

I think you will find this useful ;)


Thanks!
Reply


 Users viewing this thread: RainyDay - HTB [Discussion]: No users currently viewing.