Hawk

I’ve learnt a lot thanks to this box! If I can give you an advice concerning privesc: don’t overcomplicate it. Feel free to PM if you need help!

Having some trouble with the file you get from f**. I know what it contains, and I’ve done the first step, got the tool that everyone talking about, but I don’t know the encryption type, so I made a bash script to recursively go through each one. The script runs, but it’s stopping after checking the very first algorithm.

Can someone take a look at my bash script and see if they can figure out what I’m doing wrong?

EDIT: I figured it out. I put in a break and it was halting the script after the first algorithm! :smiley:

Nice machine, had fun creating my own script for the decryption part because most of the tools weren’t working. A bit disappointed for privesc…

This was a great machine, thanks for creating one that was a challenge each step of the way. Good stuff! ::rootdance!::

what a fun box, went right through the front door, no tools, got the .enc havent bothered with it yet, got user, then my vpn connection dropped and I lost my foothold for root priv esc. oh well, be back at it tomorrow.

Finally rooted … great fun was had , got some good nudges without giving it away.

Got root…pm for hints…

i have decrypted the file, got some info from this, but i don’t know where to use them… i don’t know how to take advantage of the w**-p*****… pm would be appreciated.
EDIT: found that, working on root now

Again i am replying my own question :slight_smile: , but of course thanks for little tips at the road…

For .enc file decrypting: after found a candidate password, i was not knowing anything about this description aim. I was using that password at website, ssh or other services. So if you are at same position, read about those decryption purposes and what is that password should be used for???

For privesc: it was a different environment and different shell type for me. For this box, “most didnt like part” for me was finding credential of d***** ssh user, i hope there is another way of finding this password, after that i didnt read root.txt with Poison like method, i worked locally and drink some h2o :slight_smile: i tried Poison like method but i couldnt execute any commands from my own remote box, we can discuss our methods if anyone PMs. Thanks for this box, it was a long journey @mrh4sh :wink: :astonished:

@Wainright said:
finally decrpting .enc file is done but then what ?!?!

I have tried to login web interface and/or ssh with default usernames and found password but no luck!! Is that password maybe wrong? but i have tried at decryption process all type of d***** at that tool and i found just one password.

What is happening ? :anguished: :frowning:

hi,
I have user.txt and I am able to login d***** account with credentials over ssh. But after that I am not able to reach the root.txt. How do I connect to h2o? pm would be appreciated.
Thanks in advance

Hello everyone. This was my first box. I tried for almost a week to get started and then I realized I was an idiot and that the .enc file was there all the time.
After a while I got root.txt.
Problem is I didn’e get root and I’d like to do it.
Some suggestions on privesc?

EDIT:
Nevermind, I found this → hxxps://github.com/Hackplayers/hackthebox-writeups/tree/master/machines/Hawk

anyone got some hints on the h20 login? I’m pretty sure i know how to proceed but need a correct Auth on that? Can someone give me a bit oif a hint on that?

— NVM, rooted… Was goin down the wrong Path, man i should watch out where i step…

I’m starting to give up on root.
I enumerated as much as I could. I literally ran cat on every conf file I could find. I grepped directories for files containing password or containing the user d*****. I ran find to search for files containing conf, and I ran LinEnum.sh. Still no luck.
I still cannot find credentials to access d***** user.
Found a certain PHP file where there is a password for something. I cannot seem to be able to use it anywhere. I know I might need to use it on the “water”. But I am afraid I don’t know how to build a a bridge to help me pass through the water. And do I need user d*****'s password to do that?
Anyone willing to give resources or hints on learning how to do that? Any help would be greatly appreciated. Please PM me to help ;-;

EDIT: Realized the file I found did indeed contain the password to d***** user. I just didn’t try it before posting for some reason :stuck_out_tongue:

EDIT2: Still struggling to get root. Tried to exploit the water thingy. It creates a zip file but the zip would be empty for some reason. No errors returned. Tried different priv esc exploits. Still no luck. Any help would be really appreciated.

EDIT3: Nevermind. Got root! Was using the wrong exploit u.u

@valkyrix said:

@w31rd0 said:

@takuma said:

@ghroot said:
Can someone help to me about encrypted file?

Bruteforce it

is there a way to identify the encryption that has been used?
or you go by trial and error?

both, look into what the application that made that file uses, and probably their default values.

That was the most helpful clue here.

BTW. can somebody, who already got root explain one thing to me in PM?
i did some stuff and can access this service, that is available from the localhost only.
i logged in there using default credentials. however, i did not have an idea how to leverage it for the root that time.
then, when i figured it out the password was not working anymore. does somebody keep changing it, or maybe i need to look for them somewhere on the machine?

Finally root, thanx alot @marine for the hint, actually root more easy compare user.txt, keep try harder dude :slight_smile:

Would really appreciate a nudge here on what I should be focusing on after decrypting the file and logging in to the portal on port 80. Seems vulnerable to everything and nothing…

Good god after trying for two days i realize that d***** password was changed! Anyway now im logged in as user but i have python shell any hints on how to get a bash shell? or any tips in any form are appreciated.

I’ve exploited the ■■■■ outta the box by now i just need root, heck i even got a meterpreter running!

Appreciate any nudges i can get :anguished:

Rooted! thanks for the nudge @BoiteAKlou !
This box man :slight_smile: will never forget these lessons

Got root, great box, thanks @mrh4sh

Got root, thanks @ZaphodBB ! I would like to give some hints.

  1. When you try to decrypt the file, dont use the github tool, write a script. If you have the problem with one output file per password sort them by size.

  2. If you have access to this one service, google which configuration files the service has.

  3. You can get code execution by changing the configuration.

  4. You dont need a reverse shell. All files are in common places.