The Wayback Machine - https://web.archive.org/web/20240615181918/https://www.geeksforgeeks.org/creating-an-encrypted-persistent-live-kali-usb/
Open In App

Creating an Encrypted Persistent Live Kali USB

Last Updated : 21 Jul, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

The term “Live USB Persistence” refers to the fact that the files and data that we create in USB as a result of our work there, they are stored on the USB drive rather than the Hard drive, and by using Encryption in the Live USB, the Stored Data will be encrypted. As of this, we don’t need to create any partitions on our hard drive in order to boot into Kali Linux, unlike in dual booting systems.

Advantages of Live USB Persistence:

  • It’s Portable.
  • Easy to test new tools and distros.
  • Saves your work on USB in an encrypted form.

Steps to Create a Kali Live Persistent USB:

Step 1: Navigate to the Kali download page in your Browser and Download Kali Linux live Installer as of your system architecture and needs. 

Kali Live System Download Page

 

Step 2: Now to Flash Kali Image in USB, we require a tool i.e., Rufus. Navigate to the link and download it.

Step 3: Insert your USB into the USB port and Open Rufus Software.

Step 4: Select your USB device in Rufus.

Drive Properties

 

Step 5: Select the Downloaded Kali Linux live Installer Image by Clicking on Select in Boot Selection.

 

Step 6: Now select the Persistent Partition Size as of your USB size.

 

Step 7: Then press the Start button. You will be informed that all data on the USB will be deleted; if you agree, click OK.

Note: Your USB will now be formatted and flashed with Kali Linux live. 

Step 8: Shut down your computer, then turn it back on, then go to the Boot Menu and choose Kali.

Step 9: When the Kali Boot menu loads, select Live system with USB Encrypted persistence. It will start Kali for the first time without requesting that you create a password or login system.

Selecting Mode for Kali live system

 

Step 10: When Kali loads the desktop, open the terminal with root permission.

Step 11: Check for your USB block for further process by lsblk command. In my case, it’s in the third block, i.e. /dev/sdc2.

Storage Blocks

 

Step 12: We’re going to use LUKs Encryption to encrypt the USB. Commands listed below.

  • cryptsetup –verbose –verify-passphrase luksFormat /dev/sdc2. 
  • cryptsetup luksOpen /dev/sdb3 kali_usb

whereas cryptsetup is used to conveniently set up dm-crypt managed device-mapper mappings; first flag –verbose print messages for current action; the other flag –verify-passphrase asks you to enter your password twice; luks is an extension of cryptsetup for disk encryption and the last argument is the USB Block. Keep in mind the password you choose.

Step 13: Now we need to create an ext4 file system, namely “persistence”.

mkfs.ext4 -L persistence /dev/mapper/kali_usb
e2label /dev/mapper/kali_usb persistence

Step 14: To mount our encrypted disc, we must first build a mount point, after which we will create a persistence.conf file and unmount the encrypted partition. See the commands below for the desired.

mkdir -p /mnt/kali_usb/
mount /dev/mapper/kali_usb /mnt/kali_usb
echo “/ union” > /mnt/kali_usb/persistence.conf
umount /dev/mapper/kali_usb

Step 15: The channel to our encrypted persistent partition needs to be shut off last now.

cryptsetup luksClose /dev/mapper/kali_usb

Step 16: Now our USB is ready to boot with Encrypted Persistence Storage. Shut down the computer, start it again and enter to boot menu, and select Kali.

Step 17: Now from the Kali Boot menu, select Live system with USB Encrypted persistence.

Step 18: Due to encryption, it will go slow. At the initial time, it will ask for the password that we created, Enter the password, and it will take you to the Desktop if the password is correct.

Disk Unlocking

 


Similar Reads

How to create an Encrypted Persistent TailsOS USB?
Tails, or The Amnesic Incognito Live System is a Debian-based Live Linux Operating System that offers online privacy, anonymity, and defense against online surveillance. It comes pre-installed with cutting-edge privacy and anonymity tools like Tor Browser, Tor Network, OnionShare, Electrum, Cryptographic Tools, and several privacy-focused web brows
4 min read
Creating and Running a Fedora Linux Live USB stick on a PC with Windows 11
This article presents a brief overview of the Fedora operating system, describes what live boot is, and then shows how to create a live bootable USB drive and then run a live version of the operating system on a PC with Windows 11 (Home). Overview of FedoraFedora Linux is a popular free and open-source operating system (Linux distribution) develope
6 min read
Creating a Persistent Reverse Shell with Metasploit in Kali Linux
A reverse shell is a type of network connection in which a command shell is executed on a remote machine, and the input and output of the shell are transmitted over the network back to the local machine. This allows a user on the local machine to execute commands on the remote machine and receive the output of those commands. Reverse shells are oft
4 min read
How to Create Ubuntu Live USB in Windows?
In this article, we will look into the process of creating an Ubuntu live USB on a Windows machine. This USB drive can be further used to either install Ubuntu on your Windows machine or use Ubuntu directly from the USB drive. Through this article, you will learn to create a bootable USB of Ubuntu in Windows. Instructions are valid for all versions
2 min read
Kali Linux USB Sticks
Kali Linux is one of the most famous Linux distributions and popular among the practitioners of the security domain. Kali Linux is famous for its usage in Ethical Hacking, Security tasks, and Testing. Now it's not a beginner-friendly operating system and doesn't have a major need for day-to-day use. Though users can opt for a dual boot system where
8 min read
Kali-Whoami - Stay anonymous on Kali Linux
In today's life, we are surrounded by a lot of cyber security tools and we talk about our online anonymity, but are we really anonymous? A single mistake can reveal our anonymity, so here is a tool that can help us to make anonymity possible and it is called WHOAMI. It is very useful and has a very simple UI. Note: if you are a parrot user then you
3 min read
How to Use Cryptmount Utility to Create Encrypted Filesystems in Linux?
Cryptmount a utility which allows user to access encrypted files, which is developed by Linux Operating Systems here they do not require root privileges. Cryptmount requires Linux Distributions with kernel 2.6 or later. Encrypted files and encrypted partitions, both are handled by Cryptmount. Simple administration and system administrator are offer
5 min read
How to Setup Encrypted Filesystems and Swap Space Using ‘Cryptsetup’ Tool in Linux
An LFCE is in charge of the design, implementation, and continuous maintenance of the system architecture and is qualified and experienced to install, administer, and troubleshoot network services in Linux systems. Hard disc encryption for Linux Introduction to The Linux Foundation Certification Program for Linux Filesystem Encryption (LFCE). Encry
4 min read
Cewl Tool - Creating Custom Wordlists Tool in Kali Linux
In this article, we will see how to create a wordlist with the Kali Linux tool Cewl and what options are available in this post. Cewl is a Ruby program that crawls a URL to a defined depth, optionally following external links, and produces a list of keywords that password crackers such as John the Ripper can use to crack passwords. can. FAB (Files
4 min read
How to make a USB Unbootable using cmd?
A bootable USB is a disk that is used to boot up a system for the installation of an Operating system like Linux, macOS, windows, etc. A USB can be made bootable using a command line only for the systems that have windows installed (7/8/10 or higher). A normal USB drive is used for purpose of copying data from one computer to transfer data to anoth
2 min read
Article Tags :