Tool Time with Caleb — Ep.1

Caleb White
4 min readMar 6, 2022

Welcome to tool time with Caleb, for this series of blog postings I want to share some tips and tricks or tools I find to be fascinating. Often I will surf the web and read some articles and or take a random course and discover a subject or new tool (new to me) that will spark some interest. The item that sparked my interest this week is a tool called Tomb. It was a first for me in learning how to encrypt files on a Linux distribution. With this being my first time learning about it, why not make a blog post? In this blog, I wanted to talk about Tomb and how to use it.

What is Tomb?
Tomb is an open-source tool used to encrypt files on Linux distributions. There are many different encryption tools you can use but for me what separated Tomb from other options is that when you use tomb you have to generate two items. One item is the “Tomb” itself, this is where you will store all the files you want encrypted. The other item generated will be the key to unlock the “Tomb”. When the Tomb is created along with the key you can now unlock your Tomb and put files in it and when you are done simply close the Tomb. After you close the Tomb then no one will be able to access it without the key and password you made for the key. Tomb works with pre-existing tools on your Linux machine so there is no hassle of having to hunt additional resources. I recommend you download Tomb yourself and give it a try. Below I have made a scenario and steps needed to take to make and secure your files using Tomb.

Scenario:
You have recently gotten into the Cheetah Girls but you do not know why nor do you want anyone to know. You have the lyrics to your favorite Cheetah Girls song on a file called secretes.txt. You want to keep those lyrics on your computer but you need to hide them. We will use Tomb to help our friend hide his enjoyment of the Cheetah Girls.

Step 1:

A quick note before you start, each command with Tomb must start with “tomb”. This is how you will call the tool from the command line. You will want to create your Tomb by using the “dig” flag. When you create your Tomb you can specify the size you desire. I am not sure if there is a size limit but for this example, I will create a 20 MB Tomb. You specify the size you want to create with the “-s” flag. I will also specify the name of the Tomb to be “safe.tomb”. You must include the “.tomb” at the end of the name otherwise Tomb will error. Below is an example command.

“tomb dig -s 20 safe.tomb”

Step 2:

Now that your Tomb is created it is now time to make a key using the “forge” flag. To be able to open and view the contents inside the Tomb you will need the key. A cool feature with Tomb is that they provide several ways to hide your key. You can put the key on a USB flash drive and create a “physical” key or simply store it locally. Additional interesting actions Tomb can do is create a QR code with the key value in it. You could print the QR code and hide it somewhere in your house. Tomb can even store the key inside of a normal JPEG image. I will create a normal key stored locally on my machine for this example. Use the forge flag to create the key and name it the same as your Tomb followed by “.tomb.key”. After the key is created you will be asked to create a password for the key. Below is an example command.

“tomb forge safe.tomb.key”

Step 3:

After you have created your key you will need to lock your tomb. By using the “lock” flag the Tomb will become locked and with the “-k” flag you are specifying the use of a key followed by the name of the key. Below is the command to lock your tomb

“tomb lock safe.tomb -k safe.tomb.key”

Step 4:

You have now successfully created your first ever Tomb. To open your Tomb type the name of the Tomb followed by the key.

“tomb open safe.tomb -k safe.tomb.key”

The Tomb will store files in the media directory. While your Tomb is opened you will be able to see the directory, it will be named after your Tomb. Since I named the Tomb “safe.tomb” the location was /media/safe.

Step 5:

Now we have got to hide our friend’s “secretes.txt” file with the Cheetah Girl lyrics. First, find the directory secretes.txt is located. Next, we will want to use the move command “mv” to the directory our open Tomb is located which is /media/safe. Below is the command I used to move secrets.txt into the Tomb.

“mv secretes.txt /media/safe”

Step 6:

Now that his Cheetah Girls file is safe and secure in the Tomb we need to close it. Simply run the command below and the Tomb will be closed and the file is secured.

“tomb close”

*cool tidbit* if you go back to the media directory after you close your tomb it will be gone.

Conclusion:
I hope you all enjoyed this walkthrough of using Tomb. I have never heard of such a thing until recently and I wanted to get the word out. As I mentioned above I wanted this series to be about tools I think are interesting. Through my cyber security journey, I have gained a lot of enjoyment from seeing others post about a tool they may use daily whether it’s in their home lab or production environment. Knowing neat tools like this has always been a great way to make conversation with another individual in the same field as well. The important thing is to never stop learning even if it just helps you hide some Cheetah Girl lyrics. I have included the link to Tomb’s webpage and I recommend giving them a look and learning much more exciting things you can do using Tomb.

Tomb’s Webpage: https://www.dyne.org/software/tomb/

--

--

Caleb White
0 Followers

Always looking to improve myself and my security career. Blogging my own thoughts and studies, I hope you enjoy!