├── README.md ├── LICENSE └── KaliPersistentUSB.md /README.md: -------------------------------------------------------------------------------- 1 | # Kali Persistent USB 2 | 3 | Tutorial to create a bootable Kali USB drive with persistent storage. 4 | 5 | - [Persistence Storage for a bootable Kali USB drive](https://github.com/feralfenrir/KaliPersistentUSB/blob/master/KaliPersistentUSB.md) 6 | 7 | **Sources:** 8 | - [Kali Linux Live USB Persistence](http://docs.kali.org/downloading/kali-linux-live-usb-persistence) 9 | - [Kali Linux USB Persistence](http://docs.kali.org/kali-dojo/03-kali-linux-usb-persistence-encryption) 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Kaushal Banninthaya 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /KaliPersistentUSB.md: -------------------------------------------------------------------------------- 1 | # Persistence Storage for a bootable Kali USB drive 2 | 3 | **Sources:** 4 | - [Kali Linux Live USB Persistence](http://docs.kali.org/downloading/kali-linux-live-usb-persistence) 5 | - [Kali Linux USB Persistence](http://docs.kali.org/kali-dojo/03-kali-linux-usb-persistence-encryption) 6 | 7 | ## Without Encryption 8 | 9 | 1. Create a Bootable Kali USB using `Rufus` or `Win32 Disk Imager` or `Universal USB Installer`. 10 | 2. Use `parted` to create an extra partition. You can use `fdisk -l` command to check the current partitions of the drives. 11 | ``` 12 | fdisk -l 13 | 14 | parted 15 | 16 | print devices 17 | select /dev/sdb 18 | print 19 | 20 | mkpart primary 21 | quit 22 | 23 | fdisk -l 24 | ``` 25 | 26 | 3. Create an `ext4` file system in the partition and label it “Persist”. 27 | ``` 28 | mkfs.ext4 -L Persist /dev/sdb3 29 | e2label /dev/sdb3 Persist 30 | ``` 31 | 32 | 4. Mount the partition and create a `persistence.conf` so changes persist across reboots. Finally, unmount the partition. 33 | ``` 34 | mkdir -p /mnt/Persist 35 | mount /dev/sdb3 /mnt/Persist 36 | echo "/ union" > /mnt/Persist/persistence.conf 37 | umount /dev/sdb3 38 | ``` 39 | 40 | ## With LUKS Encryption 41 | 42 | Follow Steps 1 and 2 from above and then follow the steps below to create an encrypted persistence. 43 | 44 | 1. Encrypt the partition with LUKS. 45 | 46 | `cryptsetup --verbose --verify-passphrase luksFormat /dev/sdb3` 47 | 48 | 2. Open the encrypted partition. 49 | 50 | `cryptsetup luksOpen /dev/sdb3 encPersist` 51 | 52 | 3. Create an `ext4` file system in the partition and label it “encPersist”. 53 | ``` 54 | mkfs.ext4 -L encPersist /dev/sdb3 55 | e2label /dev/sdb3 encPersist 56 | ``` 57 | 58 | 4. Mount the partition and create a `persistence.conf` so changes persist across reboots. Finally, unmount the partition. 59 | ``` 60 | mkdir -p /mnt/encPersist 61 | mount /dev/sdb3 /mnt/encPersist 62 | echo "/ union" > /mnt/encPersist/persistence.conf 63 | umount /dev/sdb3 64 | ``` 65 | --------------------------------------------------------------------------------