Linux priv esc Environment Enumeration help please

I some how solved with your insight and some googling “how to search for specific string in a file” and then searching for the particular flag pattern (ctrl + f and search for HTB{ there). But I believe it isn’t healthy enough to say I understand what exercise wanted me to understand as a concept and I attained the understanding enough to fultil the task. Wow, I hate throwing stone into darkness and it still hits the target. May be I can comeback to the question again after few chapter and I can understand enough for it all to make sense.

Lol, I’d never guess that name lm ao. Thanks btw!
P.D.: I think they should include a hint or something, they didn’t even explain about sh files as a source of information… that’s explained in the next section, sigh.

grep --color=auto -rnw ‘/’ -ie “HTB” --color=always 2> /dev/null

This is the way to go, not the grep approach :slight_smile:

find / -type f -exec grep -E -m 1 “HTB{” {} + 2>/dev/null

1 Like

For anyone still struggling - grep is cheating… The intended path is to elevate privileges to another user after running sudo -l and seeing the binary can run as anyone except root (try googling how to abuse that binary or just look at the help command with ?). You’ll notice a file in that user’s home directory that can only be read by them… look through the file after spawning a shell as them and look at the script in said file. Feel free to message me if you need more help.

1 Like