terça-feira, 18 de setembro de 2018

Make Kali pendrive persistence

1) Download of the Universal USB Installer:
Suggestion: https://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/

2) Download of the Kali Linux 32 Bits: ( I suggest the 32bits version because run on 32 ou 64 bits machines)
Suggestion: https://www.kali.org/downloads/

3) Download of the Mini Tool Partition (for windows):
Suggestion: https://www.minitool.com/partition-manager/partition-wizard-home.html

4) Use the Universal USB Installer for burn the ISO image on pendrive. I suggest 8GB (or bigger) because the KALI S.O. has almost 4GB of size.

5) Utilizing the Mini Tool Partition, look the partitions on pendrive. Watch wich has only one partition. Click with right button on this partition and choice "resize" option. Than, decrease this partition to the minimum possible (by Mini Tool Partition).

6) Click with right button on the (new) free space and create the new partition. This partition must be: type primary,
file system: ext4 
label: persistence (I don't know if this is realy necessary, but.... make it.)
After, click in "apply" for the modifications to be recorded.
Than, boot with this pendrive.


STEPS ON THE KALI LINUX

7) Identify the partition created recently. Normaly, this partition is /dev/sdb2 (but confirm your case). For this, run the command: fdisk -l

8) Create one temporary directory and mount the partition identified. For this, run:
mkdir -p /mnt/cobaia
mount /dev/sdb2 /mnt/cobaia
obs1.: I don't know if the argument "-p" on mkdir is realy necessary, but... make it.

9) Inside in the new partition, create a file named persistence.conf with the "/ union" content. This partition will be responsible for persisting the changes made. To do this, run this command:
echo "/ union" > /mnt/cobaia/persistence.conf

10) Restart the machine and obviously choice the persistence option. If everything has make correctly, the system will be work on persistence mode. For this, run:
shutdown -r now

11) For test the modifications, can make two things:
a) verify if the icon 'persistence' disappeared.
b) mount the partition of persistence data and check if exist the file 'persistence.conf 'as well as the directory 'rw'. This is responsible for keep the chances made on the system. For this, run:
mount /dev/sdb2 /mnt
ls -l /mnt
umount /mnt

12) be happy but with responsability.