Official Restaurant Discussion

Same consideration for me. Iā€™ve decompiled the executable and I have seen the vulnerability, but I donā€™t know how capture the flag. Send a rev shellcode on the server maybe?

Thatā€™s what I was thinking, but knowing how compilers protect against certain mistakes (where the process suicides if testers go after them), I felt like I had left Easyā€¦at least without using a tool. I guess Iā€™ll try anyway / try not to trip any protections.

Did anyone manage this challenge? I need in a small hint.

Humā€¦ not that easy :slight_smile: Is the goal is to inject a shellcode so access the server fs? I guessā€¦ I didnā€™t find that much useful information in the code itself and it looks some protections were applied. Is it a ROP challenge?

Could someone who has solved this challenge PM me? I need a nudge.

I was able to exploit this on my local machine. However, seems like l*bc address on the remote machine is different. Can you please give me a hint on how to discover the remote l*bc address? :smiley:

The aim of this, and typically all of the user land pwn challenges on HTB, is to make the remote process instance execute a shell (i.e. execve(ā€œ/bin/shā€, 0, 0);), which you will typically use to read the flag file from the filesystem. The filename of the flag is not always predictable, so donā€™t waste your time writing shellcode to just read the contents of a specific file. There is a separate thread specifically about pwn challenges at Pwn Challenges - Challenges - Hack The Box :: Forums.

Iā€™m happy to help anyone with a specific question about this challenge. But please tell me what youā€™ve done so far, where youā€™re stuck and what your current thoughts are.

1 Like

Just did this challenge. I would only call this challenge easy, in the sense that it is fairly straightforward IF you already know the techniques to defeat the protections on the binary (unless thereā€™s some glaring vuln that I missed :D). In my mind, the challenge is not ā€œtotal beginner easyā€.

DM me what youā€™ve tried and Iā€™ll be happy to provide nudges.

Feel free to message me on discord:- ā€œAlex Zander#0764ā€ for any doubts.

Fun Challenge if you are careful and donā€™t make the stupid mistake I did. :slight_smile:

If, like me, you suck at pwn challenges, youā€™re in for a ride. It took me a bit less than a week of almost daily effort to crack that one. Maybe I didnā€™t do it the intended way, though, I canā€™t be sure. What I did seems very difficult to me but maybe Iā€™m just the biggest noob of all times :smiley:
Anyway, understand your 64 bits architecture before jumping into this one, and, yes, it may work locally but not remotely. Google every error message you get and be patient.

That was very hard, but also very rewarding :slightly_smiling_face:

I was able to get the shell locally. However, remotely it will be a segfault. Naturally, the various addresses have been changed for remote use.
What is the logic behind this?

I spend a lot of time on this challenge,may be my fragile understanding of binary is a problem that I can not figure out how to do it,if anyone could suggest any article to read for better understanding to solve this would be appreciated, thank you

I have found the vuln, and I think I have do a return something with the libc, but thatā€™s it. I need some hints plz

Wow, this challenge is so nice! I have just started with the pwn challenges and this one made me research the tools available for the task and code some wrappers for easier exploit development, so Iā€™ve learned a lot here (though it took a couple of days and the challenge is not that hard and pretty straightforward).
For anyone needing a nudge, feel free to PM me :smile:

1 Like

They provide the libc version used along with the bin file. Iā€™ve seen in a video ppl using patchelf to force a local bin to use specified libc version if that helps

Did you have any luck using patchelf to force the binary to use the provided libc version? Iā€™ve tried it on 4 different systems now and they all either seg fault afterwards or give me the error: ā€œInconsistency detected by ld.so: dl-call-libc-early-init.c: 37: _dl_call_libc_early_init: Assertion `sym != NULLā€™ failed!ā€

I know this is something Im doing wrong, and from what Iā€™ve read it sounds like an issue with incompatible libc versions, but I dont know enough to troubleshoot it.

Did anyone else have this problem or see what Im doing wrong?

I use pwninit for that :slight_smile: GitHub - io12/pwninit: pwninit - automate starting binary exploit challenges

Wow, that tool is awesome, thanks! I had never heard of that

Should I be concerned about AS*R?