Excellent book describing the fundamental techniques of serious hacking (in an ethical sense).
It includes major sections on programming, networking, and cryptography. All material is covered with an eye towards exploitation. Languages used in the book material consist of C, PERL, and Assembly for X86.
The techniques described in this book are fundamental to any hacker or security professional who takes their work seriously :).
The examples are relevant and fresh.
I will describe the steps for getting the book together with the cd and start working the examples. The price on amazon is way below the book's value, you will soon realize that it deserves the money. But anyway, if you wish to try it first, here we go...
- Download the torrent (that contains the book and also the CD). The cd is an .iso file, that we'll use later.
- Tools needed: MagicIso, vmware player, vmx builder.
- Create a new virtual machine in Vmx Builder.
- In the Hardware tab, add a new cdrom, that will use the iso just downloaded in step 1.
- Also add a new hard disk, that will be used for saving the changes (casper-rw persistent partition).
- I've selected a 300 MB single growable virtual disk, on IDE
- For Mode, select Independent and check Persistent
- You may also disable the floppy disc, and adjust the memory (I've set 500 MB. With default 128 it didn't start).
- I have also added an ethernet controller, with network connection set to Custom, and VMnet8 (NAT).
- The Windows services VMware Nat and VMware DHCP should be started.
- Start vmx file to boot. After booting into Ubuntu Feisty, we will create a partition on the virtual hard disk, format it as ext3 and assign it the label casper-rw. This will be used for saving changes for all users.
- Make the linux persistent.
- Step 1 : update initrd.gz
- Open a terminal and type sudo su (to become root)
- Type mkdir /projectinit (to make our project directory)
- Type cd /projectinit (to change to the project directory)
- Type gzip -dc /cdrom/casper/initrd.gz | cpio -i (to extract the initrd.gz)
- Type gedit init (to edit the init file)
- From gedit, find the following section:
break) break=premount ;; esac
- Directly above esac add the following:
persistent) PERSISTENT=yes root_persistence=casper-rw home_persistence=casper-rw ;;
- Step 1 : update initrd.gz
- It should end up up like the following:
- Save the changes to update the init file
- Type find . | cpio -o -H newc | gzip -9 > initrd.gz (to zip the new initrd.gz file)
- If you booted with network support, you could email initrd.gz file and update the ubuntu iso with this new modified file. (Use MagicIso to update the iso)
- Step 2: modify isolinux.cfg like this:
LABEL live menu label ^Start Hacking LiveCD (Persistent Ubuntu Linux) kernel /casper/vmlinuz append file=/cdrom/preseed/ubuntu.seed boot=casper persistent initrd=/casper/initrd.gz quiet --
Shutdown and restart the machine. - Remove the prompt to eject CD.
After restart, delete those files to get rid of the prompt.
rm -r /etc/rc0.d/*casper rm -r /etc/rc6.d/*casper
- Update package repository and install a chm viewer. I used gnochm.
Officially the 7.04 repos are down but unofficially there are still here. They were moved to:so you could edit your sources.list file and change the urls accordingly. To easily edit the file, using for example gedit, open terminal and dohttp://old-releases.ubuntu.com/
sudo gedit /etc/apt/sources.list
modify the file and save it. Then
sudo apt-get update sudo apt-get install gnochm
- Now you should have a persistent Ubuntu Feisty Fawn 7.04 in a virtual machine, the chm viewer installed, internet and network functional and a great book full of examples. Success at getting your hands dirty with code :)
# Log in as root sudo su # Check our new disk, in my case the disk has been picked up as hdb # hd for ide, sd for SCSI dmesg |grep hd # Create disk fdisk /dev/sdb p n p 1 <enter> <enter> w # Format mkfs.ext3 -b 4096 -L casper-rw /dev/sdb1 # Restart rebootThe system will not reboot entirely, you will have to close manually the virtual machine. For now.
break) break=premount ;; persistent) PERSISTENT=yes root_persistence=casper-rw home_persistence=casper-rw ;; esac
No comments:
Post a Comment