Helix Linux on a USB thumb drive

  • Posted on: 19 Dec 2008 by: Ken
  • I had recently been listening to an episode of the LinuxBasment podcast where they had mentioned a Live CD based Linux distribution named Helix which is intended for incidence response, electronic discovery and computer forensics. I thought that this sounded quite useful, unfortunately a CD is not always the most convenient thing to be carrying around.

    Since USB thumb drives are dirt cheap, with 1GB drives selling for under $10, I figured this would be the best way to carry around this distribution.

    So I pulled out a 1GB Kingston DataTraveler drive that I had kicking around and decided to make a bootable USB Key containing Helix3.

    All of the steps outlined where performed as root on my work laptop running Ubuntu 8.04 (Hardy Heron).

    NOTE: Since Ubuntu has no root account by default, a quick way to get around this without allowing ‘local system administrator login’ is to simply run:

    $ sudo /bin/bash

    This will launch as Bash shell as root and any commands you enter in the shell will be run as root.

    The first thing I did was download the latest Helix ISO from their site:

    http://helix.e-fense.com/

    I then did some searching on Google to find out how to make a bootable thumb drive. I used the following 3 articles as guides:

    The Lazy Guide to Installing Knoppix on a USB Key | tuxmachines.org
    Bootable USB Key - Knoppix Documentation Wiki
    Syslinux: usbkey.txt

    I am not trying to plagiarize these articles, however, some of the steps may be repeated.

    Now, once inserted, Ubuntu mounts my thumb drive as:

    /media/KINGSTON

    A quick check with ‘df’ shows that the drive is /dev/sdb1:

    # df -h /media/KINSTON
    Filesystem Size Used Avail Use% Mounted on
    /dev/sdb1 962M 644M 319M 67% /media/KINGSTON

    Here is what fdisk reports:

    # fdisk -l /dev/sdb

    Disk /dev/sdb: 1008 MB, 1008729600 bytes
    4 heads, 8 sectors/track, 61567 cylinders
    Units = cylinders of 32 * 512 = 16384 bytes
    Disk identifier: 0x000310fd

    Device Boot Start End Blocks Id System
    /dev/sdb1 * 1 61568 985083+ e W95 FAT16 (LBA)

    I also checked the output from ‘dmesg‘ to make extra sure I was looking at the correct drive:

    [440976.361613] usb 6-4: USB disconnect, address 9
    [440979.734610] usb 6-4: new high speed USB device using ehci_hcd and address 10
    [440979.871294] usb 6-4: configuration #1 chosen from 1 choice
    [440979.898382] scsi9 : SCSI emulation for USB Mass Storage devices
    [440979.904425] usb-storage: device found at 10
    [440979.904430] usb-storage: waiting for device to settle before scanning
    [440984.903361] usb-storage: device scan complete
    [440984.903877] scsi 9:0:0:0: Direct-Access Kingston DataTraveler 2.0 6.50 PQ: 0 ANSI: 0 CCS
    [440984.908617] sd 9:0:0:0: [sdb] 1970175 512-byte hardware sectors (1009 MB)
    [440984.909483] sd 9:0:0:0: [sdb] Write Protect is off
    [440984.909487] sd 9:0:0:0: [sdb] Mode Sense: 45 00 00 08
    [440984.909489] sd 9:0:0:0: [sdb] Assuming drive cache: write through
    [440984.914168] sd 9:0:0:0: [sdb] 1970175 512-byte hardware sectors (1009 MB)
    [440984.915129] sd 9:0:0:0: [sdb] Write Protect is off
    [440984.915137] sd 9:0:0:0: [sdb] Mode Sense: 45 00 00 08
    [440984.915140] sd 9:0:0:0: [sdb] Assuming drive cache: write through
    [440984.915146] sdb: sdb1
    [440984.917903] sd 9:0:0:0: [sdb] Attached SCSI removable disk
    [440984.917953] sd 9:0:0:0: Attached scsi generic sg2 type 0

    Everything looked good, so I fired up fdisk and re-partitioned the drive:

    # fdisk /dev/sdb

    Once in fdisk I used:

    • ‘d’ to delete the existing partitions
    • ‘n’ to created a new 700MB partition
    • ‘t’ to set the partition type to FAT16 (HEX code 6)
    • ‘a’ to turn on the boot flag for the new partition
    • ‘w’ to write the new partition table and exit

    Now that this was done I unmounted the drive:

    # umount /media/KINGSTON

    I then installed ‘syslinux‘ from the Ubuntu repositories:

    # apt-get install syslinux

    Once the install was complete I created an MS-DOS file system on the USB key using ‘mkdosfs‘:

    # mkdosfs /dev/sdb1
    mkdosfs 2.11 (12 Mar 2005)

    and then used ‘syslinux‘ to place a bootloader on the USB key:

    # syslinux /dev/sdb1

    Once this was complete, I created a new mount point for the USB key:

    # mkdir /mnt/usbkey

    and mounted it manually:

    # mount -t vfat /dev/sdb1 /mnt/usbkey

    At this point it was time to grab files from the Helix3 ISO that I had downloaded previously.

    So I created a mount point for the ISO image:

    # mkdir /mnt/helix

    I then mounted it:

    # mount -o loop /home/kdonovan/Desktop/Helix2008R1.iso /mnt/helix

    I then copied all the files from the /isolinux folder on the ISO image (CD) to the USB key:

    # cp /mnt/helix/isolinux/* /mnt/usbkey

    I then renamed the ‘isolinux.cfg‘ file on the USB key to ‘syslinux.cfg‘:

    # cd /mnt/usbkey

    # mv isolinux.cfg syslinux.cfg

    I also deleted ‘isolinux.bin‘ and ‘boot.cat‘:

    # rm isolinux.bin boot.cat

    Once these steps where complete, I copied everything from the mounted ISO image to the root of the USB key using ‘rsync‘:

    # rsync -razv /mnt/helix/ /mnt/usbkey/

    NOTE: Whenever I perform and ‘rsync’ operation I run it first with the ‘–dry-run’ option to ensure that it is doing what I expect.

    This process took several minutes after which my Helix3 USB Key was ready for testing.

    I rebooted the laptop and checked he BIOS to ensure that it was set to boot from the USB drive before the hard drive (it wasn’t, so I changed the order).

    Once the BIOS was updated I rebooted again and crossed my fingers…

    Everything went well and several minutes later I was booted into a live distribution of Helix3 running off of my USB thumb drive.

    Future Black belt!

  • Posted on: 18 Dec 2008 by: Ken
  • Liam (my oldest son) recently achieved his yellow stripe in TaeKwon-Do:

    He was very excited, however, he was even more excited when he broke a 1 inch thick board with a side piercing kick during his TaeKwon-Do test and it just so happens that I managed to get that moment on video and post it on Youtube:

    Liam breaking board
    Liam breaking board [FULL]

    AWESOME JOB BUDDY!

    Monitoring services with monit

  • Posted on: 10 Dec 2008 by: Ken
  • With the new server setup, I was looking to monitor critical services.

    At work we have a script that was created in-house which checks for running daemons and restarts them if they have died.

    I vaguely remember hearing about MONIT, so I took a look through the YUM repositories using ‘yum search’:

    # yum search monitoring | less

    and reading through the descriptions.

    I installed it and after reading through the ‘man‘ page and their online documentation I know have a fully functional monitoring program running on my server.

    I configured ‘monit‘ to ensure that the following services where up and running:

    • SSH
    • DNS
    • MySQL
    • HTTP

    I also have several name-based virtual hosts, so I configured additional HTTP content checks for these.

    One of the best things about ‘monit‘ is that it can be started and re-spawned by init.

    Anyway, here is sample similar to what my current ‘monit’ config file looks like:

    /etc/monitrc

    With this configuration I had to add the following lines to ‘/etc/inittab‘:

    # Ensure that monit stays running
    mo:2345:respawn:/usr/bin/monit -c /etc/monitrc

    I then had to tell ‘init’ to re-examine the ‘/etc/inittab‘ file by running the following:

    # telinit q

    With the above setup I am alerted via email when any of the critical services fails; ‘monit’ will also attempt to restart the failed services.

    ‘monit’ also has it’s own HTTP server which can be used to view the status of monitored services and even restart the services.

    I have restricted access to this server to only localhost.

    Since this is a ‘headless’ server, I access the page via SSH and X forwarding from a remote host by running:

    # ssh -X root@webserver

    followed by:

    # firefox &
    [1] 10860

    Then from within Firefox:

    http://localhost:2812

    The only issue I ran into was with my initial configuration for the virtual host content checks.

    They had been configured using the following lines:

    # Check virtual-host www.site1.tld for content
    check host SITE1 with address www.site1.tld
    if failed url http://www.site1.tld and content == "Search string"
    with timeout 15 seconds then alert
    alert with mail-format {subject: SITE1 is down! }

    With this setup the monit syntax check:

    # /usr/bin/monit -t -c /etc/monitrc

    was failing with the following error:

    /etc/monitrc:57: Error: syntax error ‘mail-format’

    I changed the last line to include the email address and that fixed it:

    alert me@myaddress.tld with mail-format {subject: SITE2 is down! }

    # /usr/bin/monit -t -c /etc/monitrc
    Control file syntax OK

    Server move…again!

  • Posted on: 28 Nov 2008 by: Ken
  • Looks like the laptop that I have previously configured as my new server has not been doing so well under the load.
    My main site (this one) has been unbearably slow.

    Checking the output of ‘top‘ was always showing that ‘wa‘ was always 95-99%, which indicates that the CPU was spending a large percentage of it’s time waiting for some io to complete (see ‘man 8 vmstat’)

    So I spent the last two days (which my wife has not been too thrilled about) building a workable system from all of the junk parts I had lying around.

    The workhorse of this new server is an Asus dual processor mother-board with dual PIII 500Mhz that I pulled from a retired work server that has been sitting in my garage.

    After much fiddling around I mirrored the configuration that I had setup on the laptop and everything now seems to be performing nicely.

    Sharing X resources via x2x

  • Posted on: 24 Nov 2008 by: Ken
  • I was trying to configure one of my desktop systems and was switching between my desktop and laptop.

    I found it pretty annoying switching from one keyboard to the other and from the touch pad to mouse.

    I remembered a colleague at work that had used a program called Synergy to share his mouse and keyboard between two Windows systems.

    I poked around and found that Synergy is also available on Ubuntu repositories.

    I installed it and checked out the man page but found that this package may be a little overcomplicated for what I was trying to do.

    So before digging any further into it; I tried ‘x2x’ which allows the keyboard and mouse on one (”from”) X display to be used
    to control another (”to”) X display.

    This package was also available in the Ubuntu repositories and was easily installed via:

    # sudo apt-get install x2x

    This was done on both the desktop and the laptop.

    From the laptop I then ran the following:

    # xhost +192.168.0.106

    The next step was to share the keyboard and mouse by running the following command:

    (NOTE TO SELF: Check out ‘Mango Lassi’ input sharing for GNOME)

    $ x2x -to 192.168.0.104:0 -west &

    Since I normally place my laptop to the left (west) of the desktop I run x2x with the -west option so when the cursor hits the left screen edge it moves over to the laptop.

    Unfortunately, this failed with the following error:

    “No protocol specified
    x2x - error: can not open display 192.168.0.104:0″

    So after some digging, I found that I had to edit ‘/etc/gdm/gdm.conf‘ and change:

    DisallowTCP=true

    to:

    DisallowTCP=false

    I then had to restart GDM (GNOME Display Manager) via:

    $ sudo /etc/rc5.d/S30gdm stop
    $ sudo /etc/rc5.d/S30gdm start

    That worked and I was now able to share the mouse and keyboard; however copy/paste operations where not working.

    I also tried using x2x in combination with SSH and X forwarding.

    From the desktop I ran the following:

    $ ssh -XC laptop x2x -west -to :0.0

    Again I was able to share the mouse and keyboard across both systems; however copy/paste operations where still not working.

    While this functionality would be nice, it will have to wait until I have some more time to play around with it; but I will probably try Synergy first to see how it stacks up.

    Exploring cellphones with BitPim

  • Posted on: 17 Nov 2008 by: Ken
  • My niece had asked me to grab some pictures off of her LG flip-phone.

    Unfortunately her phone had not come with a data cable or any software.

    Luckily LG uses a standard connector across it’s phones and I was able to use the cable that came with my LG Chocolate.

    We still had no software though because my LG only came with Windows software and I have gotten rid of Windows from all of my machines.

    So I plugged her phone into one of my Ubuntu boxes to see if it would get detected.

    It looks like it was being recognized but I was unable to read any data from it:

    $ lsusb
    Bus 006 Device 001: ID 0000:0000
    Bus 005 Device 001: ID 0000:0000
    Bus 004 Device 001: ID 0000:0000
    Bus 003 Device 001: ID 0000:0000
    Bus 002 Device 001: ID 0000:0000
    Bus 001 Device 003: ID 1004:6000 LG Electronics, Inc. VX4400/VX6000 Cellphone

    I quick Google searched revealed that I should be able to access the phone using BitPim.

    So I tried it out:

    $ sudo bitpim
    The program 'bitpim' is currently not installed.  You can install it by typing:
    sudo apt-get install bitpim
    bash: bitpim: command not found

    It wasn’t there, so I installed it:

    $ sudo apt-get install bitpim

    I then fired it up:

    $ sudo bitpim

    I clicked “Edit >> Detect Phone” and after a few seconds the following dialogue box popped up:

    “PHONE DETECTION:
    Found Other CDMA phone on usb::001::003::2″

    The phone is not one of the supported LG models so all of the regular features (Phonebook, Ringers, Call History etc…) where not available, however, I was able to read the Filesystem after clicking “View >> Filesystem”

    After that it only took a little poking around before I found here images and transferred them to my system.

    The next day I connected my LG Chocolate and made a full backup of the Filesystem which I will play around in at a later date.

    MASSIVELY MASSIVE

  • Posted on: 15 Nov 2008 by: Ken
  • Well it has been over two years since I last updated the site. In the time a lot has gone on, so this update will be a BIG one. I will break up this post into sections and any future posts will be both more frequent and smaller in size.

    SITE: I decided it was time for another site overhaul. With the last overhaul I kept the same l design and layout, but recoded it to remove all the tables and make it purely CSS. Since I still like the design, I decided to change the back-end. The site had been running off of an old 333Mhz system running FreeBSD 4.7 and all of the pages where static  HTML pages. With this update I moved the site to an old 1.3Ghz HP ZT1130 laptop (with a dead LCD) running CentOS 5. The back-end is also now managed using a popular CMS which I spent several hours re-theming so that the site maintained it original design.

    FAMILY: Lot’s of family news since the last update. We have moved to another house within Barrhaven. The new (we have been here for over a year) house is much bigger and has a finished basement, garage and large backyard. This is great because we also have a new family member. Our newest addition is Jack Micheal Donovan; born September 5th 2008 at home and weighing in at 9lbs 8oz. This means that we are now a family of 6. This also meant that we officially outgrew our 1998 Tuarus wagon, which is why we have upgraded it to a 2002 Pontiac Montana. The other kids (Liam, Grace and Audrey) are also all doing well. Liam is taking Tae Kwon Do, Grace is on Sparks and Audrey seems to be enjoying having me home all day while I am on Parental Leave. I don’t want to leave her out, so I will also mention that my beautiful wife Jen is also doing well, more recent updates on Jen can usually be found on Facebook :)

    WORK: I believe the last time I posted an update I was working at Primus (formerly Magma Communications) as the Business Technical Support Supervisor. I am still working at Primus; although for the last 2 years I have been employed as a Unix Systems Administrator. This is the position that I have been working towards since I started at Magma in 2002 as a Residential Technical Support Agent. Although the pay could be better; it is still the best job I have ever had. In addition to keeping me very busy, it also keeps me thinking and learning and it NEVER gets boring.

    PLAY: Over the summer my father in-law got me into Golf. While I am not very good, I do enjoy playing and managed to get 4 games in this season. During my parental leave I have also managed to get out to the last two local Linux User Group (LUG) meetings, and I enjoyed them very much (thank you OCLUG)!

    I also came accross the LinuxOutlaws podcast and since I do a lot of walking (walking the kids to school, walking with Audrey to playgroup, walking Liam to Tae Kwon Do)  I am currently almost caught up on their 60+ episodes.

    I think that about wraps it up for this update; however I will make an effort to post more regularly.

    Black eye, safari and no free samplers

  • Posted on: 27 Aug 2006 by: Ken
  • Decided it was time for another update. I just recently got back from a business trip to Toronto. Work was work (same thing in Ottawa vs. Toronto). I REALLY missed my wife and kids, however, not having them there with me left me with a lot more “free” time. Luckily I was there with a co-worker (Christian); whom I got along with quite well.

    It turns out that we both have an interest in art and they just happened to be featuring an Andy Warhol exhibit at the AGO (Art Gallery of Ontarion). The exhibit was good, although smaller that I had expected. The AGO was also featuring and extremely interesting exhibit called ‘In Your Face: The People’s Portrait Project’.

    Overall, the trip was pretty enjoyable; but the best thing about it was that between my conversations with Christian, my visit to the AGO and the general atmosphere of Toronto, I found a renewed interest in my own art. Using Archive.org, I was even able to find an old scan of one of my ‘Warhol’ inspired pieces:

    I uploaded this piece and a few others that I found to the Photo section.

    On our last night in Toronto, Lanny (my counterpart in TO) took us out to the Bier Markt. The ‘beer market’ is similar in nature to Pub Italia here in Ottawa, only it’s larger and has a smaller beer selection.

    I definitely <geek joke>ht://DiG</geek joke> the place and I had a really fun night; of course I generally do after consuming roughly 99 ounces (3 litres) of beer :P I would definitely suggest it as a place to go if you are out and about the esplanade in Toronto, however, be forewarned…SAMPLERS ARE NOT FREE!

    As nice as it was in TO, it was it much nicer to be back at home with my wife and kids. In anticipation of my return, the kids had actually drawn a big “Welcome Home” card on our front walkway in chalk:

    I though this was the perfect welcome back.

    When I went to post this update, I realized that I had not gotten around to posting an update about our ‘Family’ trip to Parc Safari.

    It was our first real vacation with all the kids and they all had an amazing time. Altogether there where seven of us that went:

    • Me (Ken)
    • My wife (Jen)
    • My Son (Liam)
    • My two daughters (Grace and Audrey)
    • My Sister-in-law (Melanie)
    • My niece (Rebecca)
    The actual safari, the water park, the hotel stay and the rides where all great and altogether it was a super fun experience for the kids; who knows, we may even go back next year.

    Also deserving of a mention is the awesome black eye that I got a couple of weeks ago. I think it was actually the first real black eye I have ever had in my life, not to mention the nasty split eyelid that accompanied it:

    Rather than explain how it happened, let me just say that beer, stupidity & elbows don’t mix, and since I know he still feels bad about it, I’ll also throw in a “DON’T WORRY ABOUT IT MIKE, I PROBABLY HAD IT COMING!”

    !!TATTOO!!

  • Posted on: 04 Jun 2006 by: Ken
  • It’s been six months or so since the last time I updated the site. Of course the last update was to announce the birth of my third child, so as you can imagine, I’ve been a little busy.

    There has been a whole hell of a lot going on since then (new position at work, my son has a possible peanut allergy, my wife has gallstones etc, etc…), however, the main reason for this update is because I finally got something that I have been wanting to get for as long as I can remember…

    A TATTOO!!!


    I designed the tattoo myself while working an overnight shift at work.

    It is an ambigram of the word ‘father’. For those of you that don’t know what an ambigram is, I’ve grabbed the definition from Wikipedia:

    “An ambigram, also sometimes known as an inversion, is a graphical figure that spells out a word not only in its form as presented, but also in another direction or orientation.”

    I designed the graphic a few months ago and it just sat around, then someone suggested it would make a good tattoo, which got me dreaming about getting one again.

    Next thing you know, Tom’s friend Joey, a tattoo artist from Montreal is down, and unbeknownst to my wife (who thought I was just going out with some guys from work) I’m sitting at Andy’s house getting my back tattooed.

    Audrey’s Arrival

  • Posted on: 18 Jan 2006 by: Ken
  • Well I finally managed to squeeze in time for a site update. It’s been almost 3 months since I last posted. A lot of stuff has gone on in that 3 months, with the most notable event being the birth of my third child Audrey Anne Donovan:

    This beautiful bundle of joy came into the world on Thursday January 12, 2006 @ 5:27PM and weighed in at a whopping 9lbs 6oz (see pictures in the Gallery/Photo section)

    Liam and Grace absolutely adore her, although they seem to be having a little trouble adjusting. Liam seems to be more moody than usual and Grace is definitely becoming more mischievous.

    Since I’m off for two weeks, I have been trying to do things with them to keep them busy, unfortunately the weather is not co-operating with me. Liam’s school bus was cancelled today because of freezing rain, so the kids are hanging around with me in the basement while Jen and Audrey are having a nap.

    Audrey seems to be up most of the night and likes to sleep during the day. Since Jen is breastfeeding, I don’t really get up with the baby, however, this is not to say that I get a sound sleep. I do still get up with Liam and Grace in the middle of the night and I also get up with them in the morning. Not to mention the fact that it is a little hard not to wake up when the baby starts crying.

    My 29th birthday just past on Monday, so I’m now one step closer to 30 (YIKES!). Thie kids kept wrapping up all of their toys thoughout the day and giving them to me as presents, they’re so cute.

    Jen’s birthday is up next tomorrow, so I took the kids to Wal-Mart last night to pick her up a necklace. It;s nothing fancy, but Liam has been saying for months that he wanted to get her a necklace, he even had a bake sale to raise money (he’s such a sweet guy!).

    Then a week after Jen’s birthday, it’s Grace’s 4th birthday. She’s so tall, some days it’s hard to believe that I have 3 kids and that two of them are already 5 and 4 years old.

    I was planning on starting to run again this week, unfortunately, it appears that I have come down with a cold and my lungs currently feel like lead, so I’ll probably wait until the cold has passed. When I stopped running I was really worried about putting weight back on, so I started doing some weights again. I developed a pretty good routine which I will likely stick to even when I start running again. I even decided to write up a little page for my workout and I have added links to it from other pages on my site.

    In addition to updating this page, I also recently updated the Links and Friends pages on the site. Over the next few days I also plan on adding more pictures to the gallery. I have a ton of digital photos sitting on my system that I just haven’t had the time to organize and upload, so I’m going to try to get some of that done during my vacation.

    Next Page »