Archive for September, 2009

Packet Sniff and Craft

Last weekend at one of our local Linux LUGs (http://rmlug.org) I was able to do a brief talk on some packet sniffing and packet crafting tools. I had some time on my hands the weekend prior so I wrote down a bunch of commands I find useful. Hopefully someone else can find my cheat sheet handy too.
http://theinterw3bs.com/docs/PacketSniffCraft-CheatSheet.pdf
Let me know if you find it useful or have any suggestions/corrections.

3 Comments

Macbook Pentoo update

I redid my Pentoo install and got rid of the two partitions and made just one. The instructions are pretty much the same but here they are updated slightly

  • Boot with Leopard DVD
  • Go into Disk Utility and create a 2 partition scheme. For my 160GB I chose 136GB for OS X and 14 for Pentoo. Make the OS X HFS + Journaled and the 14 GB FAT32.
  • I then exited Disk Utility and opened a terminal and typed diskutil list. In the output you should see /dev/sda1 as an EFI partition, /dev/sda2 as your HFS partition and /dev/sda3 as your FAT32 partition. The GPT EFI style systems can only support 4 primary partition and I don’t believe support extended partitions, so you are technically limited to 3 partitions
  • Then I rebooted, booting off the Snow Leopard DVD and installed Snow Leopard to the HFS partition
  • After Snow Leopard installed I downloaded and installed rEFIt. I then rebooted so I could verify that rEFIt was installed correctly
  • I then booted off the Pentoo livecd and logged into X.
  • Inside Pentoo I loaded GParted and removed the FAT32 Partition and created a ext4 (dev/sda3) partition.
  • I then rebooted and when at the rEFIt boot screen I dropped into the rEFIt command terminal and typed gptsync to resync the discs after using GParted
  • Then I rebooted again back into the Pentoo livecd.
  • Once booted for the second time into the Pentoo cd, I followed the simple installation instructions off the Pentoo site but basically I did the following
    mount /dev/sda3 /mnt/gentoo
    cp -Rf /mnt/livecd/* to /mnt/gentoo/
    rm -Rf /mnt/gentoo/etc; rm -Rf /mnt/gentoo/root
    cp -Rf /etc /mnt/gentoo/etc
    cp -Rf /root /mnt/gentoo/root
    cp -Rf /usr/portage /mnt/gentoo/usr/portage
    mount -t proc none /mnt/gentoo/proc
    mount -o bind /dev /mnt/gentoo/dev
    chroot /mnt/gentoo /bin/bash; env-update; source /etc/profile
    vi /etc/fstab
    All I set in there was /dev/sda3 for /boot and for /

    I found Lilo works best on my Macbook so I uninstalled Grub and installed Lilo

    emerge --sync; emerge -C grub; emerge -avt lilo

    I then edited a handful of configs in /etc/conf.d/
    Removed autoconfig from default runlevel

    rc-update del autoconfig default

    Add keymaps to default

    rc-update add keymaps default
    mv /etc/inittab.old /etc/inittab
    mv /etc/init.d/halt.sh.orig /etc/init.d/halt.sh
    passwd root

    I then edited my lilo.conf

    cat /etc/lilo.conf
    # Global LILO settings
    boot=/dev/sda3                            
    timeout=5              
    default=Linux  
    image=/boot/kernel-genkernel-x86-2.6.29-pentoo-r6
    label= Linux       
    root=/dev/sda3

    I then set eth0 to start on boot and configured my wireless and created an ath0 iface, ran lilo, set a password and unmounted.

    ln -s /etc/init.d/net.lo /etc/init.d/net.ath0
    /sbin/lilo
    exit; cd; umount /mnt/gentoo/boot /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo; init 6

    For my xorg.conf I set the following

    InputDevice "Synaptics"  "AlwaysCore"
    ...
    Section "InputDevice"
            Identifier      "Synaptics"
            Driver  "synaptics"
            #Option "Protocol" "event"
            Option  "Protocol" "auto-dev"
            #Option "Device" ""
            Option  "Device" "/dev/input/mice"
            Option  "LeftEdge" "1900"
            Option  "RightEdge" "5400"
            Option  "TopEdge" "1900"
            Option  "BottomEdge" "4000"
            Option  "FingerLow" "25"
            Option  "FingerHigh" "30"
            Option  "MaxTapTime" "180"
            Option  "MaxTapMove" "220"
            Option  "VertScrollDelta" "100"
            Option  "MinSpeed" "0.3"
            Option  "MaxSpeed" "0.50"
            Option  "AccelFactor" "0.080"
            Option  "SHMConfig" "on"
            Option  "TapButton1" "1"
            Option  "TapButton2" "3"
            Option  "TapButton3" "2"
            Option  "VertTwoFingerScroll"   "true"
            Option  "HorizTwoFingerScroll"  "true"
    EndSection

    I also installed xfce’s terminal cause URxvt is a pain in the ass with copy and paste and when it comes to increasing fonts and such.

  • 2 Comments

    Pentoo on the Macbook

    I bought Snow Leopard the other day and used it as an opportunity to wipe my current dualboot of OS X and Gentoo and dualboot with Pentoo. Below are the basic steps I took to get Pentoo installed as well as Snow Leopard. The only arduous parts are the OS X parts, the Pentoo installation is a breeze.

  • Boot with Leopard DVD
  • Go into Disk Utility and create a 2 partition scheme. For my 160GB I chose 136GB for OS X and 14 for Pentoo. Make the OS X HFS + Journaled and the 14 GB FAT32.
  • I then exited Disk Utility and opened a terminal and typed diskutil list. In the output you should see /dev/sda1 as an EFI partition, /dev/sda2 as your HFS partition and /dev/sda3 as your FAT32 partition. The GPT EFI style systems can only support 4 primary partition and I don’t believe support extended partitions, so you are technically limited to 3 partitions
  • Then I rebooted, booting off the Snow Leopard DVD and installed Snow Leopard to the HFS partition
  • After Snow Leopard installed I downloaded and installed rEFIt. I then rebooted so I could verify that rEFIt was installed correctly
  • I then booted off the Pentoo livecd and logged into X.
  • Inside Pentoo I loaded GParted and removed the FAT32 Partition and then created a 50mb ext2 partition (/dev/sda3) and the rest went to a ext4 (dev/sda4) partition.
  • I then rebooted and when at the rEFIt boot screen I dropped into the rEFIt command terminal and typed gptsync to resync the discs after using GParted
  • Then I rebooted again back into the Pentoo livecd.
  • Once booted for the second time into the Pentoo cd, I followed the simple installation instructions off the Pentoo site but basically I did the following
    mount /dev/sda4 /mnt/gentoo
    cp -Rf /mnt/livecd/* to /mnt/gentoo/
    rm -Rf /mnt/gentoo/boot; mkdir /mnt/gentoo/boot
    rm -Rf /mnt/gentoo/etc; rm -Rf /mnt/gentoo/root
    mount /dev/sda3 /mnt/gentoo/boot
    cp -Rf /mnt/livecd/boot /mnt/gentoo/boot
    cp -Rf /etc /mnt/gentoo/etc
    cp -Rf /root /mnt/gentoo/root
    cp -Rf /usr/portage /mnt/gentoo/usr/portage
    mount -t proc none /mnt/gentoo/proc
    mount -o bind /dev /mnt/gentoo/dev
    chroot /mnt/gentoo /bin/bash; env-update; source /etc/profile
    vi /etc/fstab

    I found Lilo works best on my Macbook so I uninstalled Grub and installed Lilo

    emerge --sync; emerge -C grub; emerge -avt lilo

    I then edited a handful of configs in /etc/conf.d/
    Removed autoconfig from default runlevel

    rc-update del autoconfig default

    Add keymaps to default

    rc-update add keymaps default
    mv /etc/inittab.old /etc/inittab
    mv /etc/init.d/halt.sh.orig /etc/init.d/halt.sh
    passwd root

    I then edited my lilo.conf

    cat /etc/lilo.conf
    # Global LILO settings
    boot=/dev/sda3                            
    timeout=5              
    default=Linux  
    image=/boot/kernel-2.6.29-pentoo-r6
    label= Linux       
    read-only                  
    root=/dev/sda4

    I then set eth0 to start on boot and configured my wireless and created an ath0 iface, ran lilo, set a password and unmounted.

    ln -s /etc/init.d/net.lo /etc/init.d/net.ath0
    /sbin/lilo
    exit; cd; umount /mnt/gentoo/boot /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo; init 6

    I haven’t done anything to the kernel, xorg.conf or my USE flags (doubt I will there) but if I find the need I will post the adjustments. I will need to set the right click function on my trackpad. But messing with my xorg.conf is one of those tasks I get easily annoyed with and setting mouse functionality is one of those things I can never remember and have to google around for it.

  • No Comments