Good suggestion from @sparkla - people often overlook how effective Base64 can be in transferring files between systems.
However if ssh from you to the box works, so should scp as it is basically the same protocol. If ssh works but scp fails, there is a good chance something on the box is broken.
SSH from box to me doesn’t work as well. I suspect either broken or on purpose to prevent usage of nc (and enforce the intended route) in the early stage of foothold.
Rumour has it (and I certainly haven’t even tried to confirm this yet) but SSH from HTB boxes to user machines is prevented.
You should be able to use SSH/SCP from your machine to this box though.
Couldn’t spot the privesc, nudge welcome.
Its difficult to avoid spoilers. I’d start with thinking about this as a compromised device, and looking for things the attacker might have done to allow themselves back in.
SSH from box to me doesn’t work as well. I suspect either broken or on purpose to prevent usage of nc (and enforce the intended route) in the early stage of foothold.
This may be why your SSH isn’t working from the box to your machine. It may not be. YMMV.
FYI if anyone is stuck on this. Edit /etc/ssh/sshd_config and change “Port” to anything you want. SSH is only blocked on the standard port. I still wouldn’t recommend leaving it enabled though, just start it when you need and stop it afterwards: systemctl start/stop ssh
FYI if anyone is stuck on this. Edit /etc/ssh/sshd_config and change “Port” to anything you want. SSH is only blocked on the standard port. I still wouldn’t recommend leaving it enabled though, just start it when you need and stop it afterwards: systemctl start/stop ssh
Have players been hacked?
I don’t know to be honest… I just saw the announcement on Discord, but have to assume so.
Not as far as I am aware. Given the difficulty in compromising SSH directly and the chance of getting a different IP each time you connect, blocking port 22 outbound seems like an odd choice. It may be down to something else (administrative interfaces, how the lab environment is configured, VPN issues etc).
@TazWake said:
Not as far as I am aware. Given the difficulty in compromising SSH directly and the chance of getting a different IP each time you connect, blocking port 22 outbound seems like an odd choice. It may be down to something else (administrative interfaces, how the lab environment is configured, VPN issues etc).
They said it’s because so many people are using the default credentials, which leaves them open to easy access.
@sparkla said:
No, I haven’t “lost peace of mind”. Not sure why you said that. I valued your previous comments but didn’t wanna let things escalate into endless HTB bashing, also I think we can only guess what’s going on behind the scenes, if we don’t get an official answer. Problems here are very real and some are severe. Problems with the boxes are one thing, how we tread each other is another, how we are being treaded maybe the most important one. We have to consider if our words do improve the issues or maybe make them worse. But it doesn’t really belong here in a box thread, so lets cut it.
I actually thought you would like my little bit of sarcasm -
It was not my intention to offend you or anyone else.
locate is (at least in my experience) really hit and miss. It frequently misses file on my local system because I dont keep the database up to date.
each user account has set privs, if the account you are in doesn’t have privs to see the file, you might not be able to find it with other tools. Keep in mind what account is being used by which “exploit.”
If you use the second account via the first bit, the output is muddy so it isn’t great for broad searching (targeted enumeration still works).
On this box, there is no need to hunt the flags. They are exactly where they should be.
Just rooted.
There is enough hints here already, but I would like to clarify some stuff.
I was a bit surprised about all those discussions about locate/grep/find. Everything seemed to be straightforward in this machine.
Also connectivity was not really a problem cause no rev or bind shell really needed.
One item required from the box can be very easy copied.
The most enjoyable part was actually the one with m**** hence getting first user. This part is very nicely described in public (google-fu) .A similar stuff can be found on one of machines in the lab where candidates for a very famous certification practice their skills -
The rest was also fine, but I used a small hint regarding which item needs to be copied for privesc (thank you @Noobish!!!). A little bit of r** gave me root on the machine.
Overall quite enjoyable.