Official Academy Discussion

Rooted

I thank everyone who gave me tips, but especially to @Harbard thanks for your patience, without you it would not be possible.

I’m a beginner and it was a little complicated, I learned a lot.

Really stuck on user 2, trawling through the logs at the mo with grep and zgrep but really need direction on best things to look for, any help would be most appreciated. Enjoying box so far…

@foalma321 said:

Really stuck on user 2, trawling through the logs at the mo with grep and zgrep but really need direction on best things to look for, any help would be most appreciated. Enjoying box so far…

If you ran a tool like nikto against the site, or did a good job with dirb/dirbuster/gobuster/whatever then you should have seen some files that look interesting but you couldn’t access them.

You can look at them in the filesystem.

If you get any credentials always check for password reuse.

Type your comment> @petrostheol said:

Can someone give me a nudge? I’m enumerating for like 2 hours but still nothing.

Try a few days back to back looking at all the pages and sadly for me, I still don’t get it…this has made me feel stupid af.

@grav3m1ndbyte said:

Type your comment> @petrostheol said:

Can someone give me a nudge? I’m enumerating for like 2 hours but still nothing.

Try a few days back to back looking at all the pages and sadly for me, I still don’t get it…this has made me feel stupid af.

It depends what you have done so far, but at a high level make sure you’ve found a page which implies it has privileged access, then see if you can manipulate the way you create new things to get access.

Type your comment> @TazWake said:

@grav3m1ndbyte said:

Type your comment> @petrostheol said:

Can someone give me a nudge? I’m enumerating for like 2 hours but still nothing.

Try a few days back to back looking at all the pages and sadly for me, I still don’t get it…this has made me feel stupid af.

It depends what you have done so far, but at a high level make sure you’ve found a page which implies it has privileged access, then see if you can manipulate the way you create new things to get access.

I get it now…I completely overlooked something the other day while being feverish! smh

Wow, user2 was really needle in a haystack. I wouldn’t ever find it without a hint. I wonder if there is any method to search for things like that? Just “try harder”? :wink:

I understand the foothold, but is there a way to observe that what I’m modifying is having an effect? just wondering how much trial-and-error I should expect to perform.

a fun box! I got user2 only with a hint. For people who found it without a hint, could you please PM, explain what logic did you use to find it ?

Type your comment> @Oussmak said:

a fun box! I got user2 only with a hint. For people who found it without a hint, could you please PM, explain what logic did you use to find it ?

Any chance you could pass the hint to me… been stuck on this user switch for ages. Looking through a*****.l** for ages but dont really know what im looking for. Thanks

@routetehpacket said:
I understand the foothold, but is there a way to observe that what I’m modifying is having an effect? just wondering how much trial-and-error I should expect to perform.

have you run gobuster (or any other tool that can brute-force directories/files on a web server)? this might help tremendously :slight_smile:

if you need more specific hints send me a DM.

but please explain what you did so far and what you want to do next (only regarding this machine, of course ;))

Nice box ! I spent way too much time looking for the second user, but I learned something new there. The root part took me 5min…

If you’re stuck with the first user like I was, maybe try to take a step back and ask yourself what is the obvious thing that you are looking for (it is an easy machine so…) ? And where/when/why could that thing being entered into the system ??? You know it’s there so, try to filter out your results…

There are specific tools that you can use but the ‘standard tool’ works fine if you apply the right filters.

Please PM if you need a nudge.

Very interesting box, thanks to @egre55 and @mrb3n.

Edit – removed by user

@d4gd4 said:

I’ve become confused about ‘user1’ and ‘user2’. Are people counting www-data as ‘user1’ sometimes? I had been assuming I need to move through 2 users AFTER www-data.

Try not to fixate on the terms and paths other people use, it wont always help you.

There may be multiple paths to get access to the root flag - the only one that matter is the one you can manage it through.

For example, on this box, there are six user accounts which appear to have interactive shells.

I have moved on from www-data to another user, and cannot find any info leading me to the next user. I managed to get some enum scripts

Manual enumeration is often better.

onto the machine despite there being a clear (very small) limit on the size of files I could copy over, and this gave me some ideas on WHERE to look. I simply don’t know what to look for. Some obvious keywords haven’t paid off…

So, first ask yourself what is it you are looking for (and I dont mean “passwords”). Have a think about what activity you want to be doing.

Then think if that activity is audited. It probably is. That means there might be a log of what has been captured by the auditing system.

When you find this, there might be too much data to easily read so now you can narrow it down but, again, think about how it is logged (hint: it doesnt use terms like password )

@TazWake Thanks for the advice, I’ll keep working on this.

Finally ROOTED !!! shout out to @Oussmak and @reedvaleeve. for their help steering me in the right direction. Fun box even though i pulled the few hairs i had left out!!!
Enumerate, enumerate,enumerate !

Got a shell
Let’s see what we got here

Rooted at long last!
There were just some things in there I didn’t know about.
But that’s great because I learned a lot on this box.
Thanks to @TazWake, @xaif7aLe and @R0cK for their help.

good box