![]() |
|
[Quick Tutorial] Setting up Kali Linux Live USB with Encrypted Persistent Storage - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Computing (https://hackforums.net/forumdisplay.php?fid=88) +---- Forum: Linux (https://hackforums.net/forumdisplay.php?fid=85) +---- Thread: [Quick Tutorial] Setting up Kali Linux Live USB with Encrypted Persistent Storage (/showthread.php?tid=4640647) |
[Quick Tutorial] Setting up Kali Linux Live USB with Encrypted Persistent Storage - Crypto™ - Jan 17, 2015 Figured I'd share this, since I just found out about this tonight. It also helped me get Kali Linux working with my pain-in-the-ass UEFI. Keep in mind that when reading from/writing to an encrypted partition, the disk I/O speed is significantly slower. (An initial execution of apt-get update && apt-get upgrade will likely take in excess of three hours, possibly longer.) Even unencrypted storage partitions on a USB drive are going to be much slower than even HDDs or SSDs. However, this will allow persistent data across reboots. Step 1: Changing the USB Partition Scheme I created this from an Ubuntu instance, so some of these steps will be linux specific. The first thing I did was fire up gparted, and select the USB device. (/dev/sdb for me, your results may vary) Then I went to Device -> Create Partition Table... and selected "gpt", which is the new scheme that is used on UEFI devices, and supercedes the older "MBR" standard. However, if your computer uses BIOS instead of UEFI, "gpt" will not work. Instead, try "msdos", which is the default. This will wipe ALL data on the device, including all partitions. You do not need to recreate partitions yet, and it will actually probably be easier if you don't. Step 2: Cloning The Kali Linux Image Linux and OS X provide the awesome "dd" utility, which makes the process a snap. You can see Windows, OS X, and Linux specific instructions in the Kali Docs. I'll cover the Linux ones here as well. To clone the image using dd, simply run this command: (Note: Ensure that /dev/sdb is indeed the correct path to the device, and that you have backed up anything important or you will lose data.) Syntax highlighted snippet of this step Code # if is the input file. In this case, the Kali imageAnd theeeennnnn? No and then. That's it for this step. Step 3: Creating an encrypted storage partition This is the final step, and can be done from the same instance where you installed Kali, or from a live instance of Kali itself. Keep in mind, if you do this in Kali, you will still have to restart for the changes to take effect. Now, you can either create the storage partition in gparted, or use the command line all the way through. Be sure to format the partition as ext3 if you use gparted. Syntax highlighted snippet of this step Code # Start here if you didn't set up the partition in gpartedNow you should be able to restart, and when you go to the startup screen, you'll see a couple new options in the boot menu: [img]http://docs.kali.org/wp-content/uploads/2014/01/Screen-Shot-2014-05-25-at-5.58.00-PM-e1401035177510.png[/img] With an encrypted partition, you can use both encrypted, and unencrypted storage I believe. Hope this helps you out! * - firasuke3967 - Jan 23, 2015 Thanks alot, so you mean when running kali linux on a USB of 16GB for example that has say 11Gigs of free storage, I can do whatever I want in kali linux and It'll be stored just like installing kali linux normally or running it from a VM ? (which means i don't have to apt-get update && apt-get upgrade && apt-get dist-upgrade each time i make a live boot ?) * - Crypto™ - Jan 23, 2015 (Jan 23, 2015 09:56 AM)firasuke3967 Wrote: Thanks alot, so you mean when running kali linux on a USB of 16GB for example that has say 11Gigs of free storage, I can do whatever I want in kali linux and It'll be stored just like installing kali linux normally or running it from a VM ? (which means i don't have to apt-get update && apt-get upgrade && apt-get dist-upgrade each time i make a live boot ?) Mhmm. It creates a persistent filesystem on the free space, and mounts it as / Just keep in mind it's a hell of a lot slower than writing to memory. * - firasuke3967 - Jan 25, 2015 Ya I know that , thanks a lot for this useful information. * - NoScript - Jan 25, 2015 This is a nice tutorial, thanks for sharing! * - Ombree - Jan 26, 2015 thank you so much, I've been trying to figure this out with my teachers haha especially for the apt-get update * - Crypto™ - Feb 3, 2015 (Jan 26, 2015 09:27 AM)Ombree Wrote: thank you so much, I've been trying to figure this out with my teachers haha especially for the apt-get update Glad to hear that it helped you out :) (Jan 25, 2015 10:16 AM)MrPengu1n Wrote: This is a nice tutorial, thanks for sharing! Glad you enjoyed it! * - Fizure - Feb 3, 2015 this tutorial is lack of screenshots or even a video wouldn of been great... * - Crypto™ - Feb 3, 2015 (Feb 3, 2015 07:29 PM)lobo13 Wrote: this tutorial is lack of screenshots or even a video wouldn of been great... I'll try and throw some together, though there's really not too much to it. * - Gallant - Mar 14, 2015 Thank you for sharing the idea. 🤝 * - Ta-kun - Mar 22, 2015 Is the any way I can use a 4 GB USB? |