TryHackMe – Writeup – Ninja Skills

2020-08-22 von Mario

On the platform tryhackme.com you can test your IT and Security skills.

An exciting challenge is the machine called ninjaskills.

Let’s start the machine and check the tasks.

 

Ninja Skills

Answer the questions about the following files:

  • 8V2L
  • bny0
  • c4ZX
  • D8B3
  • FHl1
  • oiMO
  • PFbD
  • rmfX
  • SRSq
  • uqyw
  • v2Vb
  • X1Uy

 

After logging into the computer,I look around to find the files.

There is an interesting folder “files”, but the folder is empty. As the next step I created a text file “search.txt”.

touch search.txt

After that, I added the filenames we want to find.

find / 2>/dev/null | grep -F -f search.txt > found.txt

The file “found.txt” contains the path and the file names.

 

#1 Which of the above files are owned by the best-group group (enter the answer separated by spaces in alphabetical order)

cat found.txt | while read line; do ls -al $line; done

 

#2 Which of these files contain an IP address?

cat found.txt | while read line; do echo $line; cat $line | 
grep -Eo "([0-9]{1,3}[\.]){3}[0-9]{1,3}"; done

 

#3 Which file has the SHA1 hash of 9d54da7584015647ba052173b84d45e8007eba94

cat found.txt | while read line; do echo $line; sha1sum $line | 
grep 9d54da7584015647ba052173b84d45e8007eba94; done

 

#4 Which file contains 230 lines?

cat found.txt | while read line; do echo $line; wc -l $line; done

I didn’t find a file with 230 lines, but on closer inspection, one file is missing. ;)

 

#5 Which file’s owner has an ID of 502?

cat found.txt | while read line; do ls -al $line; done

 

#6 Which file is executable by everyone?

cat found.txt | while read line; do ls -n $line; done

Kategorie: IT-Security Schlagwörter: ,