• Courses
    • Online Courses
      • Penetration Testing with Kali Linux (PWK)
      • Offensive Security Wireless Attacks (WiFu)
      • Cracking the Perimeter (CTP)
    • Live Courses
      • Advanced Windows Exploitation (AWE)
      • Advanced Web Attacks and Exploitation (AWAE)
    • In-House Training
      • In-House Security Training
  • Certifications
    • OSCP Certified Professional
    • OSWP Wireless Professional
    • OSCE Certified Expert
    • OSEE Exploitation Expert
    • OSWE Web Expert
  • Online Labs
  • Penetration Testing
    • Penetration Testing Services
    • Advanced Attack Simulation Services
    • Application Security Assessment Services
  • Projects
    • Kali Linux
      • Virtual Images
      • ARM Images
      • NetHunter Downloads
    • Kali Linux Revealed
    • Metasploit Unleashed
    • The Exploit Database
    • Google Hacking DB
    • BackTrack Linux
  • Blog
  • About
    • Careers
    • Contact Us
    • Offensive Security Vision
    • Bug Bounty Program
    • Course Reviews
    • Offsec FAQ

Customizing the BackTrack 4 PreFinal ISO

May 31, 2009BackTrack Linuxmuts

One of the downsides of leaving the linux live scripts and moving to non lzma enabled squashfs, is that we loose the wonderful and convenient setup for modifying the BackTrack LiveCD on our own. We use to be able to pop in a LZM file into the “optional” directory, and that’s it – but no more.

Actually, customizing a casper based ISO isn’t that difficult, just different.  I put up this quick guide on how to edit your own livecd and add various tools, drivers and scripts to it.

First, install BT4 and get a copy of the BT4 iso. As root, create the build environment, and chroot into it:

mkdir -p /root/BUILD
mv bt4.iso /root/BUILD
cd /root/BUILD/
mkdir mnt
mount -o loop bt4.iso mnt/
mkdir extract-cd
rsync --exclude=/casper/filesystem.squashfs -a mnt/ extract-cd
mkdir squashfs
mount -t squashfs -o loop mnt/casper/filesystem.squashfs squashfs
mkdir edit
cp -a squashfs/* edit/
cp /etc/resolv.conf edit/etc/
cp /etc/hosts edit/etc/
cp /etc/fstab edit/etc/
mount --bind /dev/ edit/dev
chroot edit

You are now in the livecd environment, and can alter the build in any way you like. This is where you add your scripts, drivers and whatnots. At minimum, i’de suggest updating your iso with the current repo, which can be done with :

apt-get update
apt-get upgrade
apt-get clean

exit

Once all the changes are made, close the build and create an iso out of it :

umount edit/dev
chmod +w extract-cd/casper/filesystem.manifest
chroot edit dpkg-query -W --showformat='${Package} ${Version}n' > extract-cd/casper/filesystem.manifest
REMOVE='ubiquity casper live-initramfs user-setup discover xresprobe os-prober libdebian-installer4'
for i in $REMOVE
do
sed -i "/${i}/d" extract-cd/casper/filesystem.manifest-desktop
done
cp extract-cd/casper/filesystem.manifest extract-cd/casper/filesystem.manifest-desktop

sed -i '/ubiquity/d' extract-cd/casper/filesystem.manifest-desktop

rm -rf extract-cd/casper/filesystem.squashfs

mksquashfs edit extract-cd/casper/filesystem.squashfs

rm extract-cd/md5sum.txt

(cd extract-cd && find . -type f -print0 | xargs -0 md5sum > md5sum.txt)

find /boot /usr/lib/grub/ -iname 'stage2_eltorito' -exec cp -v {} extract-cd/boot/grub ;

cd extract-cd

mkisofs -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 
-boot-info-table -V "BT4" -cache-inodes -r -J -l -o ~/bt4-mod.iso .

That’s it! The new iso is created at /root/bt4-mod.iso.

Bask in the glory of your customised Backtrack build!

Previous Post Backtrack 4 Forensics Capabilities Next Post Backtrack 4 Powered with CUDA

Related Posts

BackTrack 4 Soon!

BackTrack 4 R1 Dev Public Release

May 10, 2010admin

Installing BackTrack 4 as a VMware Guest

June 19, 2009muts

Backtrack 4 Forensics Capabilities

May 31, 2009Elwood
Facebook
Twitter
LinkedIn
Vimeo
GitHub
RSS

Follow us on Twitter

Follow @kalilinux Follow @offsectraining Follow @exploitdb

Jump Start your InfoSec Career Today!

PWK For those who need to acquaint themselves with the world of offensive information security.
CTP In-depth examination of the vectors used by today’s attackers to breach infrastructure security.
AWE Offensive Security’s most demanding and challenging Windows exploitation course.
AWAE Take a deep dive deep into the realm of advanced web application penetration testing.
Wi-Fu Learn to conduct effective attacks against wireless networks of varying configurations.
Certified Pen Tester

Archives

https://www.offensive-security.com/wp-content/uploads/2015/01/offensive-security-try-harder-2.0.mp3

Offensive Security Twitter Feed

Tweets by @offsectraining

Offsec Say Try Harder!

https://www.offensive-security.com/wp-content/uploads/2015/01/offensive-security-try-harder-2.0.mp3

Watch our Offsec Jam

Note - Kali Linux products are provided by Kali Linux Limited

Kali Linux Twitter Feed

Tweets by @kalilinux

Copyright © Offensive Security

  • Feedback
  • Privacy Policy
  • Terms and Conditions
  • Trademark Policy
  • RSS Feed