With an idle USB3.0 USB flash drive on hand, I intend to use it to create a little Hacking artifact, implementing USB boot disk +KALI-LInux penetration test +USB storage three-in-one function.
A USB flash drive (8gb or above, usb3.0 or above)
Partition Tool: Partition Assistant Green version (Aomei)
Backup tool: Easy backup (Aomei)
PE production tool: old peach installed version
KALI Boot disk creation tool: windiskimage
Original kali image: Kali-Linux-2017.2-i386.iso (official website)
Usb flash drive startup tool: FbinsTool
Tool set Connection: Link: Password: x4th
Use Win32Diskimager to make a KALI boot disk (note that the USB flash drive will be completely formatted and spare space is not available). Don't worry, it will be solved later) 1. Back up important data of the USB flash drive before use 2. Open win32Diskimager3. The Settings are as follows, one-click production. It will take about 10min, the speed depends on the reading and writing speed of the U disk, and the partition after production is shown in Figure 2
Backup KALI boot partition, open easy backup, do as follows: Backup - partition backup - to the destination path
Open the old peach to re-create a one-click boot disk (U disk will be formatted again) : Click personalized Settings, add background images, modify the text menu, make the interface more cool
The simulated startup is shown as follows:
Modify the partition structure of the USB flash drive (Key) 1. The overall design is divided into the following partitions: 2. Automatically hidden 500M space for storing PE system and related tools 3.5gb partition (volume label: old peach USB flash drive, name change) Reserve USB flash drive function 4.4gb partition and format as ext3 as kali boot partition 5. The remaining space is allocated to the KALI system for persistent data storage
Restore the partition to the KALI partition, which corresponds to partition G in the preceding figure
Use FbinstTool to modify the grub table of the USB flash drive: 1. Insert kali live and kali perisistence boot options into the title [04-1] KALI Linux livefind --set-root /g2ldr.mbrkernel /live/vmlinuz boot=live noconfig=sudo username=root hostname=kaliinitrd /live/initrd.imgtitle [04-2] KALI Linux Persistenctfind --set-root /g2ldr.mbrkernel /live/vmlinuz boot=live noconfig=sudo username=root hostname=kali persistenceinitrd /live/initrd.img2. Delete useless boot options If you are familiar with grub booting, you can modify your own custom boot options
Hide KALI partition (unrecognized on windows will often pop up formatting)
The simulated boot effect in the virtual machine is shown in the figure: the old peach PE can be used normally and the KALI can be used normally for penetration testing and still retain 5GB space for ordinary USB flash disk use
The operation steps are a little too much, the order cannot be reversed, and a certain basis is required. See grub4dos documents to set boot options
kali Perisistence use requires mounting partitions and writing /union for example: mkdir -p /mnt/my_usb mount /dev/sdb3 /mnt/my_usb echo "/ union" > /mnt/my_usb/persistence.conf umount /dev/sdb3