Fork me on GitHub

вторник, 19 май 2015 г.

How-to compile and install Linux Kernel 4.0.4 On ubuntu, Debian and linux Mint

The Linux kernel is the operating system kernel used by the Linux family of Unix-like operating systems.It is a prominent example of free and open source software. The Linux kernel is released under the GNU General Public License version 2 (GPLv2)(plus some firmware images with various non-free licenses), and is developed by contributors worldwide. Day-to-day development discussions take place on the Linux kernel mailing list. The Linux kernel was initially conceived and created in 1991 by Finnish computer science student Linus Torvalds. Linux rapidly accumulated developers and users who adapted code from other free software projects for use with the new operating system.The Linux kernel has received contributions from thousands of programmers. All Linux distributions released have been based upon the Linux kernel.


#Create a folder named kernel

#Download the Kernel:
Linux 4.0.4

#Download the Kernel from actual source:

#Extract the file

#Open a terminal window

#Install the necessary tools to compile the linux kernel

sudo apt-get install gcc libncurses5-dev dpkg-dev

#Enter the directory of the extracted kernel source

cd kernel/linux-"version of kernel"

#Configure the Kernel

make menuconfig

#In this menu you can customize your kernel

#Save and exit

#Compile the kernel

make -j 2 KDEB_PKGVERSION=1.yourcustomname deb-pkg

#if you have 5 or 6 cores, put -j "your number of cores"!

#Get a cup of coffee or a beer because is going to take a while!

#Install the kernel

sudo dpkg -i ../linux*.deb


#You can easily uninstall the kernel with the command:

sudo apt-get purge linux-image-"your img" linux-image-"your img"

Good luck :)

понеделник, 18 май 2015 г.

Building Custom Kali ISOs

Kali Dojo 02 - Building Custom Kali ISOs using Live Build from Offensive Security on Vimeo.

Building Custom Kali ISOs One of the most powerful features of Kali Linux is the ability to create your own flavors of the distribution containing customized tools, desktop managers, and services. This workshop will show you how to create your own personalized Kali Linux ISO, customizing virtually every aspect using the live-build utility and making efficient use of the various meta-packages available in Kali. The Awesomeness of Live Build 0x00 – Begin by updating the repos, installing the prerequisites, and checking out a fresh version of live-build-config from the Kali Git repositories:
1. apt-get update
2. apt-get install git live-build cdebootstrap devscripts -y
3. git clone git://
4. cd live-build-config

0x01 – Overwrite the default Kali package list, including only the packages you want. In the video, we simply edited the list and changed a few package names.

cat > config/package-lists/kali.list.chroot << EOF

0x02 – Add a customised syslinux boot entry which includes a boot parameter for a custom preseed file.

cat << EOF > config/includes.binary/isolinux/install.cfg
label install
menu label ^Install Automated
linux /install/vmlinuz
initrd /install/initrd.gz
append vga=788 -- quiet file=/cdrom/install/preseed.cfg locale=en_US keymap=us hostname=kali domain=local.lan

0x03 – Customise the ISO build. In this example, we’ll have the SSH service start by default. To do this, we can use a chroot hook script which is placed in the “hooks” directory:

echo 'update-rc.d -f ssh enable' >> config/hooks/01-start-ssh.chroot
chmod +x config/hooks/01-start-ssh.chroot

0x04 – Next, we download a wallpaper and overlay it. Notoce how chroot overlayed files are placed in the includes.chroot directory.

mkdir -p config/includes.chroot/usr/share/wallpapers/kali/contents/images
mv kali_linux.jpg config/includes.chroot/usr/share/wallpapers/kali/contents/images

0x05 – Add a preseed file that will run through a default Kali installation with no input (unattended). We can include a ready made preseed configuration and alter it as needed:

mkdir -p config/debian-installer
wget -O config/debian-installer/preseed.cfg

0x06 – Let’s include a Nessus Debian package into the packages directory for inclusion into our final build. Since we used a 64 bit build, we’re including a 64 bit Nessus Debian package.Download the Nessus .deb file and place it in the packages.chroot directory:

mkdir config/packages
mv Nessus-*amd64.deb config/packages/

0x07 – Now you can proceed to build your ISO, this process may take a while depending on your hardware and internet speeds. Once completed, your ISO can be found in the live-build root directory.

lb build

For more live-build implementations, refer to the following: