SI485H: Stack Based Binary Exploits and Defenses (F15)

Home Policy Calendar Resources

Setting up a Linux 2.6 Environment

Table of Contents

1 Unbuntu 6.06 … going old schoole

For some of the labs, we need to go back in time to 2.6 linux kernels before some exploits were patched and fixed. This will require a bit of work.

2 Installation

  1. Download the Ununtu 6.06 desktop i386 iso. I have a mirror on the yard for your conveniance. http://zee.cs.usna.edu/~aviv/ubuntu-6.06.1-desktop-i386.iso
  2. Open virtual box and create a new machine.
  3. It is very important to get the settings right. Name the machine, Ubuntu-6.06 or something like that. The type is linux, but the version must be Linux 2.6/3.x (32-bit)
  4. Go ahead and make a hard drive and install the operating system from the cd. Again, use your USNA user name as your username, but do not use your USNA password.

3 Setup

  1. Once installed and booted up, we need to modify the apt sources list to install some software. This editing will need to occur using vim since emacs is not installed yet. Start by opening /etc/apt/sources.list from a terminal
    $ sudo vim /etc/apt/sources.list
    

    And then replace the repositories at the top with the following:

    # Line commented out by installer because it failed to verify:
    deb http://old-releases.ubuntu.com/ubuntu/ dapper main restricted
    # Line commented out by installer because it failed to verify:
    deb-src http://old-releases.ubuntu.com/ubuntu/ dapper main restricted
    
    ## Major bug fix updates produced after the final release of the
    ## distribution.
    # Line commented out by installer because it failed to verify:
    deb http://old-releases.ubuntu.com/ubuntu/ dapper-updates main restricted
    # Line commented out by installer because it failed to verify:
    deb-src http://old-releases.ubuntu.com/ubuntu/ dapper-updates main restricted
    

    Note that the old-release prefix is key

  2. Execute an update to for the repositoires
    $ sudo apt-get update
    
  3. Install all the required packages
    $ sudo apt-get install emacsen-common emacs21-common emacs21-bin-common emacs21 
    $ sudo apt-get install libungif4g xaw3dg 
    $ sudo apt-get install openssh-client openssh-blacklist openssh-server 
    $ sudo apt-get install binutils cpp-4.0 cpp gcc-4.0 gcc 
    $ sudo apt-get install make nasm rcs git-core libc6 libc6-i686 
    $ sudo apt-et install binutils-dev linux-kernel-headers libc6-dev
    
  4. Now we need to fix some environment issues. Add the following to your .bashrc
    export TERM=xterm-color
    
  5. If you are an emacs user, you might want to add this to your .emacs file
    (global-font-lock-mode 1)
    
  6. gcc is so old we do not need have stack protectors, so that setting in gcc should be turned off
  7. Finally, turn off address space randomization like before
    echo 0 | sudo tee /proc/sys/kernel/randomize_va_space