back

THM - Linux Strength Training

Task 1: Intro of the room. Task 2:

  1. What is the correct option for finding files based on group Answer:
    -group
    
  2. What is format for finding a file with the user named Francis and with a size of 52 kilobytes in the directory /home/francis/

Using find
Answer:

find /home/francis -type f -user francis -size 52k
  1. SSH as topson using his password topson. Go to the /home/topson/chatlogs directory and type the following: grep -iRl ‘keyword’. What is the name of the file that you found using this command?

After logged in with ssh

ssh topson@10.10.245.14

go to the directory-

cd /home/topson/chatlogs

look for the keyword using grep

grep -iRl ‘keyword’

Answer:

2019-10-11
  1. What are the characters subsequent to the word you found? Answer:
    ttitor
    
  2. Read the file named ‘ReadMeIfStuck.txt’. What is the Flag? Answer:
    Flag{81726350827fe53g}
    

TASK 3:

  1. Hypothetically, you find yourself in a directory with many files and want to move all these files to the directory of /home/francis/logs. What is the correct command to do this?
    Answer:
mv * /home/francis/logs
  1. Hypothetically, you want to transfer a file from your /home/james/Desktop/ with the name script.py to the remote machine (192.168.10.5) directory of /home/john/scripts using the username of john. What would be the full command to do this?
    Answer:
scp /home/james/Desktop/script.py john@192.168.10.5:/home/john/scripts
  1. How would you rename a folder named -logs to -newlogs
    Answer:
mv -- -logs -newlogs
  1. How would you copy the file named encryption keys to the directory of /home/john/logs
    Answer:
cp "encryption keys" /home/john/logs
  1. Find a file named readME_hint.txt inside topson’s directory and read it. Using the instructions it gives you, get the second flag.

Use find for the file-

find / -name readME_hint.txt 2>/dev/null

then read it with cat
Answer:

Flag{234@i4s87u5hbn$3}

TASK 4:

  1. Download the hash file attached to this task and attempt to crack the MD5 hash. What is the password?
  2. After downloading the attached file-

image by using hash-identifier we can get the type of the hash. Here it’s MD5. We can decrypt this with online tool like iotools.

Answer:

secret123
  1. SSH as sarah using: sarah@[10.49.157.49] and use the password: rainbowtree1230x What is the hash type stored in the file hashA.txt

after logged-in-

image We use find to find the file directory. We read the file using cat . using hash-identifier we found out the hash is MD4. Answer: MD4

  1. Crack hashA.txt using john the ripper, what is the password?
john --wordlist=/home/mucker/Downloads/rockyou.txt --format=Raw-MD4 hash.txt

Answer:

admin
  1. What is the hash type stored in the file hashB.txt Use hash-identifier

image

Answer:

SHA-1
  1. Find a wordlist  with the file extention of ‘.mnf’ and use it to crack the hash with the filename hashC.txt. What is the password?

Well use scp to download the .mnf file to our VM machine

scp sarah@10.49.157.49:'/home/sarah/system AB/db/ww.mnf' .

then the file is in the machine, we’ll use john to crack the password-

john --wordlist=/home/mucker/ww.mnf --format=raw-sha1 hash.txt

Answer: unacvaolipatnuggi

  1. Crack hashB.txt using john the ripper, what is the password?
    First find the file hashB.txt
find / -name hashB.txt 2>/dev/null

to crack it with John the ripper we’ll use-

john --wordlist=/home/mucker/Downloads/rockyou.txt --format=raw-sha1 hash.txt 

Answer:

letmein

TASK 5:

  1. what is the name of the tool which allows us to decode base64 strings? Answer:
    base64
    
  2. find a file called encoded.txt. What is the special answer? Use find to searching for the file-
sarah@james:~$ find / -name encoded.txt 2>/dev/null
/home/sarah/system AB/managed/encoded.txt

sarah@james:~$ cd "/home/sarah/system AB/managed/"

sarah@james:~/system AB/managed$ ls
encoded.txt

now encode the file to a new file called new.txt -

image

after analyzing this encoded texts we found a hint-

image

we have to look for ent.txt now-

image

now lets check the hashes first

image

using john the ripper-

image Answer: john

TASK 6:

  1. You wish to encrypt a file called history_logs.txt using the AES-128 scheme. What is the full command to do this?
    Answer:
    gpg --cipher-algo AES-128 --symmetric history_logs.txt
    
  2. What is the command to decrypt the file you just encrypted?
    Answer:
gpg history_logs.txt.gpg
  1. Find an encrypted file called layer4.txt, its password is bob. Use this to locate the flag. What is the flag?

First look for the file using find

image

and continues the same process using gpg.

image

We decode this message using base64 online tool.

image

and then

image Flag: Flag{B07$f854f5ghg4s37}

TASK 7:

  1. Find an encrypted file called personal.txt.gpg and find a wordlist called data.txt. Use tac to reverse the wordlist before brute-forcing it against the encrypted file. What is the password to the encrypted file?

ANSWER: valamanezivonia

  1. What is written in this now decrypted file?

ANSWER: getting stronger in linux

TASK 8:

  1. Find a file called employees.sql and read the SQL database. (Sarah and Sameer can log both into mysql using the password: password). Find the flag contained in one of the tables. What is the flag? Lets find the employee.sql file first-

image

then logged in to sql using given user and password-

image source the employee file-

image will take a few moment to load the database. Then choosing a database to view-

image Displaying the tables in the selected database-

image Describing the table data structure-

image

Displaying all the data stored in a specific table, we are looking for Flag-

image

Copyright © 2026 Mahidul Haque. This post is licensed under a CC BY-NC-ND 4.0 license. You may read, learn, and share links to this post for non‑commercial, educational purposes, as long as you give appropriate attribution. You may not copy, reproduce, adapt, distribute, or use this work commercially without explicit permission.