PDA

View Full Version : Kali and Katana



weasel
2014-01-09, 03:28
Objective: The “Multi-Tool Thumb Drive” (“Everything you might wish on a USB flash drive”) or “Kali, update-able, on Katana”

Instructions are in Times New Roman. Commands are in Courier 10 pitch. I try not to use quote marks as those will confuse the command line. Particularly interesting notes are in bold face.

GB = Giga Bytes.

The assumption is that you 1) Are running Ubuntu and 2) have a reasonable idea what you are doing. However, I have given some commands below, as I learned they were hard to find all in one document and some required specific syntax.

Required:
A wired Internet connection. Kali installations have a bit of problem dealing with WiFi connections during installation. Using a “wired” connection (Ethernet to your access point) just eliminates all these frustrations.
A minimum 16 GB USB medium, whether hard or USB flash (assumed: USB flash “thumb” drive, “pen drive” or stick, hereafter: “USB”). I chose 32 GB USB flash drives; I partitioned them to roughly “thirds”. Later, I switched to 64GB microSD chips, which worked, as long as they are mounted via a USB device (adapter / card reader). It seems that not all SD or microSD card slots are listed as “bootable” devices in various machines. Like mine.
Recommendation: if you are using a microSD card, just mount it in a USB adapter, card reader, or similar. The micro- to SD-card adapters may cause problems when you reboot (see above).

1. Partition the USB drive to three partitions:
a) Jack your target USB into the computer.
b) Use Gparted:
c) Find the target storage and remove any existing partitions.
d) Create a partition of sufficient size to hold Katana and a bit more, using FAT32 (at present, at least 8 GB).
e) Create another partition, ext4, “sufficiently” sized to hold “updates” and “overflow” and “status” from the Kali drive. Name it “persistence”.
f) If you wish, create a third partition in FAT32 or NTFS that might be shared between the two OSs. It has to be FAT32 or NTFS because Windows applications cannot read the ext* storage formats that Linux uses.
g) Before you leave gparted, note the partitions and their “device names”, which may be something like /dev/sdb1; /dev/sdb2 and /dev/sdb3 for the three partitions. You will use these designators in later commands.
2. Install Katana
a) Open the Katana RAR using Archive Manager
b) Extract the files using Archive Manager, to the first partition of the USB drive (FAT32)
3. FAT16 and FAT32 do not understand Linux file permissions. Since there is no “execute” permission set on the bootinst.sh script, Linux won't let you execute the script. The workaround is as follows.
a) Plug in USB Thumb Drive (Assume it is named “KT”)
b) Open a terminal
c) cd /media (This is where Ubuntu automatically mounts external media)
d) If you can see the USB's file system (it's a folder/directory), umount KT
e) sudo mkdir USB
f) sudo mount /dev/sdb1 USB
g) You now have access to the USB drive with root permissions.
h) The USB drive is mounted at /media/USB in your running operating system.
4. Make Katana bootable
a) cd /media/USB/boot
b) sudo ./bootinst.sh
c) Follow the onscreen instructions. Check carefully that the script was able to modify the master boot record (MBR). If not, you may wish to start over.
5. Change the BackTrack to Kali distribution:
a) Delete the BackTrack directory
b) Make a Kali directory: mkdir kali
c) Back in Ubuntu, open the Kali ISO using Archive Manager
d) Extract the files to the /media/USB/Kali directory
6. Edit the “menus” according to the Kali instructions for adding Kali to Katana (see https://forums.kali.org/showthread.php?551-Installing-Kali-Live-to-your-Katana-2-0-USB
or https://forums.kali.org/showthread.php?239-Katana-2-0-Kali-Live-USB
a) In a terminal, launch gedit with sufficient permissions to write the files you need to make or edit: sudo gedit
b) I replaced the BackTrack section in the main.cfg with the Kali info
c) I deleted the bt.cfg and replaced it with kali.cfg
7. Create the “persistence.conf” file, within the “persistence” partition, that holds only “/ union” (see instructions online at the Kali site at http://docs.kali.org/installation/kali-linux-live-usb-install )
8. Unmount the drive:
a) cd /media
b) sudo umount USB
9. Reboot to Katana and choose Kali as the OS
a) At the prompt for which version of Kali to boot, hit <Tab>
b) At the end of the line of text, add a space and the word persistence
c) This mounts the “persistence” partition you created earlier, so Kali has some place to put the updates. (Unfortunately, there are more files in certain directories than FAT32 can handle.)
10. Update the Kali distribution:
a) apt-get upgrade
b) apt-get update
c) apt-get dist-upgrade
11. Now, just for best practices, mount each of the other Katana-included distros and update them.
a) Using Windows, mount the portable apps and update them; this will likely take a while.
(1) In particular, update any anti-malware to be reasonably current.
b) Consider adding a “non-portable” applications directory to the Katana partition. You can drop loaders or installation files for other applications into it. Examples: MalwareBytes Anti-Malware (MBAM) installation loader; LibreOffice; Adobe reader installation stub; etc.)
12. You may wish to use the Katana Forge tool to add other utilities, distros, boot volumes, etc, to your geeky-little-heart's content.