Temporary Advertisements:
Ad
Ad
Ad
Under the web challenge | Can we solve together ?
by robinia - Saturday November 23, 2024 at 09:00 AM
#21
i tried with different php in image and with different payloads in exif data but  still no progress.  But we go on Smile
Reply
#22
(Dec 11, 2024, 07:45 AM)robinia Wrote: i tried with different php in image and with different payloads in exif data but  still no progress.  But we go on Smile

i dont think php will work, you need payload in exifdata. focus on artist and title.
Thanks @paw for the rank!!
Reply
#23
its about heap exploit
https://deepunk.icu/php-pwn/
Reply
#24
didn't looked at this chall yet, but yeah. based on the points it is either heap exploit OR there's probably another way.
like leaking addresses from the stack -> then calc to the php base -> then 'dup2' to clone IO -> and finally php rop chain with execv() to pop a shell.

https://www.youtube.com/shorts/FbeaklEkMgM
Reply
#25
You can leak all the base addresses of all of the loaded libs by using the LFI vuln in the web site itself (view.php)... read /proc/self/maps. Decode from base64 the "image" response and parse the content. Get libc's base and metadata_reader.so's base.

Then metadata_reader.so is partial RELRO. So you can overwrite its GOT entries. Concentrate on _efree because it takes an argument. So if it points to system, you can use the argument as the value for system to execute, which btw, cannot be /bin/sh because this occurs entirely in the "server". There is no terminal to pop a shell from. The command for system should be a reverse shell call.

The problem is: So far this worked only locally. Not sure why not remotely.... >8|
Reply
#26
you can read the flag without getting a reverse shell ,
Reply
#27
(Dec 22, 2024, 02:25 PM)x1rx Wrote: you can read the flag without getting a reverse shell ,

how did you do that with the remote version ?
Reply
#28
(Dec 22, 2024, 02:25 PM)x1rx Wrote: you can read the flag without getting a reverse shell ,

Is overwriting a GOT entry the intended way?
I mean, once you get control of that and you can call system, you can do a lot of things.
But that works only locally and in the provided container. Unless the remote machine is different than the docker container (different libc for instance).... I really do not see any reason why it would fail. I am missing something.

Care to throw in a hint?
Reply
#29
it's not very hard once you understand the problem)

root@a26a4sb89b9v:/app# cat uploads/output.txt
Reply
#30
(Dec 23, 2024, 12:00 AM)htb-bot Wrote: it's not very hard once you understand the problem)

root@a26a4sb89b9v:/app# cat uploads/output.txt


Nope. I have no idea what the problem is. This exploit should be working remotely as well....
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Hack the box Pro Labs, VIP, VIP+ 1 month free Method RedBlock 45 6,888 7 hours ago
Last Post: morris
  [FREE] 300+ Writeups PDF HackTheBox/HTB premium retired Tamarisk 446 113,766 7 hours ago
Last Post: morris
  [FREE] HTB Prolabs Writeup Ascension, Hades, P.O.O., RPG, Xen DYTSD 13 2,191 7 hours ago
Last Post: morris
  [FREE] My personal writeups repository, Hospital included agoi 86 23,234 11 hours ago
Last Post: testtesttestman123
Heart [FREE] HackTheBox All Cheatsheets Tamarisk 66 6,921 11 hours ago
Last Post: testtesttestman123

Forum Jump:


 Users browsing this forum: 4 Guest(s)