NIS Linux Part I Tryhackme Writeup

Shamsher khan
4 min readMay 16, 2021

--

By Shamsher khan This is a Writeup of Tryhackme room “NIS- Linux Part 1”

https://tryhackme.com/room/nislinuxone

Room link: https://tryhackme.com/room/nislinuxone
Note: This room is for Premium Members Only. who purchased THM premium membership.

Task 1. What is this room about?

As per the Tryhackme Rules i can’t show you password/hash/flag

if you want to know password complete these rooms

Linux Fundamentals Part 1

Linux Fundamentals Part 2

Linux Fundamentals Part 3

Task 2. ls

Question 1. How do you run the ls command?

Answer: ls

Question 2. How do you run the ls command to show all the files inside the folder?

Answer: ls -a

Question 3. How do you run the ls command to not show the current directory and the previous directory in the output? (almost everything)

Answer: ls -a

Question 4. How do you show the information in a long listing format using ls?

Answer: ls -l

Question 5. How do you show the size in readable format? e.g. k, Mb, etc

Answer: ls -h

Question 6. How do you do a recursive ls?

Answer: ls — recursive

Question 7. How many files did you locate in the home folder of the user?(non-hidden and not inside other folders)

Answer: 13

Task 3. cat

Question 1. What is the content of cat.txt?

Answer: THM{11adbee391acdffee901}

Question 2. What is the content of tac.txt?

Answer: THM{acab0111aaa687912139}

Question 3. What is the content of head.txt?

Answer: THM{894abac55f7962abc166}

Question 4. What is the content of tail.txt?

Answer: THM{1689acafdd20751acff6}

Question 5. What is the content of the xxd.txt?

Answer: THM{fac1aab210d6e4410acd}

Question 6. What is the content of base64.txt?

Answer: THM{aa462c1b2d44801c0a31}

Task 4. find

Question 1. How many .txt files did you find in the current folder?

Answer: 8

Question 2. How many SUID files have you found inside the home folder?

Answer: 0

Task 5. grep

Question 1. How many times does the word “hacker” appear in the grep files? (including variations)

Answer: 15

Task 6. sudo

Question 1. Is the user allowed to run the above command? (Yay/Nay)

Answer: Nay

Task 8. echo

Question 1. What command would you use to echo the word “Hackerman” ?

Answer: echo “Hackerman”

Task 9. xargs

Question 1. How would you read all files with extension .bak using xargs?

Answer: find / -name *.bak -type f print | xargs /bin/cat

Task 11. curl

Question 1. How would you grab the headers silently of https://tryhackme.com but grepping only the HTTP status code?

Answer: curl -I -s https://tryhackme.com | grep http

Task 12. wget

Question 1. What command would you run to get the flag.txt from https://tryhackme.com/ ?

Answer: wget https://tryhackme.com/flag.txt

Question 1. What command would you run to download recursively up to level 5 from https://tryhackme.com ?

Answer: wget -r -l https://tryhackme.com

Task 13. tar

Question 1. What is the flag from the tar file?

tar -xf tarball.tar
cat flag.txt

Answer: THM{C0FFE1337101}

Task 14. gzip

Question 1. What is the content of gzip.txt?

gzip -d gzip.txt.gz
cat gzip.txt

Answer: THM{0AFDECC951A}

Task 15. 7zip

Question 1. What is the flag inside the 7zip file?

7z x zip.7z
cat 7zip.txt

Answer: THM{526accdf94}

Task 16. binwalk

Question 1. What is the content of binwalk.txt?

binwalk -e binwalk.png
cat _binwalk.png-0.extracted/binwalk.txt

Answer: THM{af5548a12bc2de}

You can find me on:
LinkedIn:- https://www.linkedin.com/in/shamsher-khan-651a35162/
Twitter:- https://twitter.com/shamsherkhannn
Tryhackme:- https://tryhackme.com/p/Shamsher

For more walkthroughs stay tuned…
Before you go…

Visit my other walkthrough’s:-

and thank you for taking the time to read my walkthrough.
If you found it helpful, please hit the 👏 button 👏 (up to 40x) and share
it to help others with similar interests! + Feedback is always welcome!

--

--

Shamsher khan
Shamsher khan

Written by Shamsher khan

Web Application Pen-tester || CTF Player || Security Analyst || Freelance Cyber Security Trainer

No responses yet