Previous Level Guide: Groot Level 1 → 2
Access
SSH: ssh groot2@groot.underthewire.tech -p 22
Password: 464c3
Info
The password for groot3 is the word that is made up from the letters in the range of 1,481,110 to 1,481,117 within the file on the desktop. NOTE: – The password will be lowercase no matter how it appears on the screen. ▼HINT: Seems like a great time to explore using ranges within PowerShell…
Theory
To get the password, as the description says, we have to get something in the eight character range given up there. So for that we can get the list of characters between those ranges with the square braces, obviously without the commas, because then there'd be something else to worry about. Then we'll get a list of the characters between those ranges, including ends, which we can join with the option at the beginning there, and finally between the parentheses where the text would go, and to put a file's content there, we'll use the very self-explanatory command of Get-Content or something like that. So the command looks like this, we're just missing the file, which is really interesting, because we don't know the name of it, so that's why we'll use the dir command too:
dir -join(file goes here)[1481110..1481117]
Solution
Now that we are inside the shell, let's see the name of that file in the desktop:
PS C:\users\Groot2\desktop> dir Directory: C:\users\Groot2\desktop Mode LastWriteTime Length Name ---- ------------- ------ ---- -a---- 8/30/2018 5:52 AM 2357268 elements.txt
Now that we have the name of the file, we can put it in the command from before:
PS C:\users\Groot2\desktop> -join(Get-Content elements.txt)[1481110..1481117] hiding
And that's the password! Now we should be good to go to the next level.
https://underthewire.tech/groot-2Next Level Guide: Groot Level 3 → Level 4