quinta-feira, novembro 28, 2019

PXE Boot Live Kali Linux | Kali Linux Live Network Booting | Booting Kali Linux Live over HTTP


Need to read first

In short therms you only need to grab live files from ISO and configure menu as follow

label Kali^Live
        menu label Kali^Live
        kernel vmlinuz
        append vga=788 initrd=initrd.img append boot=live components fetch=http://192.168.1.1/filesystem.squashfs

-------

Download Kali PXE Netboot Images


Now, we need to create a directory to hold the Kali Netboot image and download the image we wish to serve from the Kali repos.

mkdir -p /tftpboot 
cd /tftpboot 
 # for 64 bit systems:  
wget http://repo.kali.org/kali/dists/kali/main/installer-amd64/current/images/netboot/netboot.tar.gz 
 # for 32 bit systems:  
wget http://repo.kali.org/kali/dists/kali/main/installer-i386/current/images/netboot/netboot.tar.gz 
tar zxpf netboot.tar.gz 
 rm netboot.tar.gz



Configure Target to Boot From Network


With everything configured, you can now boot your target system and configure it to boot from the network. It should get an IP address from your PXE server and begin booting Kali.



Booting Over HTTP ?

In this example, we will obtain the kernel, initrd, and squashfs filesystem we need from a full Kali Linux release ISO from within the “live” directory. We copy the initrd and kernel into the TFTP root folder, while the squashfs file goes into the web root:

mkdir /mnt/iso 
 mount -o loop kali-linux-1.1.0a-amd64.iso /mnt/iso/  
cp /mnt/iso/live/{initrd.img,vmlinuz} /tftpboot/ 
cp /mnt/iso/live/filesystem.squashfs /var/www/ 
 apachectl start



In this example, we’ll obtain the kernel, initrd, and squashfs filesystem from a full Kali Linux release ISO (in the “live” directory) and then proceed to boot the kernel and initrd over PXE. Once the boot screen appears, we need to alter a few boot parameters as shown in the screenshot below:


Or menu, can look like this

label Kali^Live
        menu label Kali^Live
        kernel vmlinuz
        append vga=788 initrd=initrd.img append boot=live components fetch=http://192.168.1.1/filesystem.squashfs


As the squashfs filesystem loads to RAM, the filesystem itself can’t be larger than the amount of RAM available on the computer – meaning that for booting a standard Kali ISO as shown above, we’d need at least 4 GB of RAM. Of course, this can be remedied by making smaller, custom Kali ISO images, perhaps with different toolsets and uses.



quinta-feira, novembro 14, 2019

android tools linux user in plugdev group; are your udev rules wrong?

https://github.com/M0Rf30/android-udev-rules/blob/master/android-udev.conf

android tools linux user in plugdev group; are your udev rules wrong?


# Clone this repository
git clone https://github.com/M0Rf30/android-udev-rules.git
cd android-udev-rules
# Copy rules file
sudo cp -v 51-android.rules /etc/udev/rules.d/51-android.rules
# OR create a sym-link to the rules file - choose this option if you'd like to update your udev rules using git.
sudo ln -sf "$PWD"/51-android.rules /etc/udev/rules.d/51-android.rules
# Change file permissions
sudo chmod a+r /etc/udev/rules.d/51-android.rules
# If adbusers group already exists remove old adbusers group
groupdel adbusers
# add the adbusers group if it's doesn't already exist
sudo mkdir -p /usr/lib/sysusers.d/ && sudo cp android-udev.conf /usr/lib/sysusers.d/
sudo systemd-sysusers # (1)
# OR on Fedora:
groupadd adbusers
# Add your user to the adbusers group
sudo usermod -a -G adbusers $(whoami)
# Restart UDEV
sudo udevadm control --reload-rules
sudo service udev restart
# OR on Fedora:
sudo systemctl restart systemd-udevd.service
# Restart the ADB server
adb kill-server
# Replug your Android device and verify that USB debugging is enabled in developer options
adb devices
# You should now see your device