Post

TryHackMe: Ninja Skills

Heyo! Practise your Linux skills and complete the challenges.

Room Link

Bash Script:

1
2
3
4
5
6
#!/bin/bash
files=("8V2L" "bny0" "c4ZX" "D8B3" "FHl1" "oiMO" "PFbD" "rmfX" "SRSq" "uqyw" "v2Vb" "X1Uy")
for file in "${files[@]}"; do
	echo "Searching for...$file"
	find / -name "$file" -type f 2>/dev/null
done

Tried to send via SCP but didnt work, so i sent by creating a python server on my machine and using wget on the target: My machine:

1
2
3
4
5
6
7
8
9
10
11
root@ip-10-10-31-240:~/Downloads# python3 -m http.server 8000
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
10.10.20.180 - - [12/Mar/2025 18:09:33] code 404, message File not found
10.10.20.180 - - [12/Mar/2025 18:09:33] "GET /percorrerdir.sh HTTP/1.1" 404 -
10.10.20.180 - - [12/Mar/2025 18:11:05] code 404, message File not found
10.10.20.180 - - [12/Mar/2025 18:11:05] "GET /percorredir.shwget HTTP/1.1" 404 -
10.10.20.180 - - [12/Mar/2025 18:11:05] code 404, message File not found
10.10.20.180 - - [12/Mar/2025 18:11:05] "GET /percorredir.shwget HTTP/1.1" 404 -
10.10.20.180 - - [12/Mar/2025 18:11:05] code 404, message File not found
10.10.20.180 - - [12/Mar/2025 18:11:05] "GET /percorredir.shwget HTTP/1.1" 404 -
10.10.20.180 - - [12/Mar/2025 18:11:05] "GET /percorredir.sh HTTP/1.1" 200 -

Target:

1
[new-user@ip-10-10-20-180 ~]$ wget http://10.10.31.240:8000/percorredir.sh
1
chmod +x percorredir.sh

Got the paths:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[new-user@ip-10-10-20-180 ~]$ ./percorredir.sh
Searching for...8V2L
/etc/8V2L
Searching for...bny0
Searching for...c4ZX
/mnt/c4ZX
Searching for...D8B3
/mnt/D8B3
Searching for...FHl1
/var/FHl1
Searching for...oiMO
/opt/oiMO
Searching for...PFbD
/opt/PFbD
Searching for...rmfX
/media/rmfX
Searching for...SRSq
/etc/ssh/SRSq
Searching for...uqyw
/var/log/uqyw
Searching for...v2Vb
/home/v2Vb
Searching for...X1Uy
/X1Uy

wc -l word count -l (to count the lines)

… (didn’t finish writing the rest of the post but completed the room)

This post is licensed under CC BY 4.0 by the author.