Archive for November, 2010

Firefox Profiles

There has been a lot of talk about firesheep; a firefox addon that shows some of the security issues with cookies that have been known for years. I’m not going to go into firesheep (possibly on a later post) but on firefox cookies. This is very basic stuff and i had some extra time last night (and was bored a little) and decided to copy firefox profiles to another computer and i was able to get into websites that the other user had logged into (because of cookies). For firefox i just copied the following files: cookies.sqlite, signons.sqlite, and sessionstore.js which are located on Windows XP at

C:Documents and SettingsUsersNameApplication DataMozillaFirefoxProfiles***.default

These files are pretty much self explanatory but… cookies.sqlite stores the users cookies, sigons.sqlite store the users login ids and passwords (if they choose to save them) and sessionstore.js saves the users session (ie the user saves the tabs when closing firefox). Copy these files to your profile and … you have the idea.

Told you, pretty basic stuff. So how do you prevent this? Well first of all you have to have administrative access to view other users profiles. That prevents a lot of people from doing this, but gaining administrative access isnt hard, epically if the user has physical access to the machine.

So we are assuming that someone has administrative access to the machine, either yourself or an IT department. If you are using a public/work computer consider everything that your doing public knowledge. Here are some things to try, keep in mind that nothing is perfect; anyone with enough time will be able to get the information that they are after.

1) Encrypt your hard drive. This doesnt prevent administrators from doing it, but it slows down everyone else
2) Clear cookies when you close firefox. You can set this by clicking Tools -> Options -> Privacy – set Firefox will “Use Custom settings for History” and there is an option to clear cookies on firefox close
3) Dont save passwords in firefox (or that matter any browser)
4) Set a password for firefox passwords

I’m sure there are other ways to prevent this and i’m sure that you can do something similar to with other browsers.


Multiboot USB flash drive

This is the 2nd part of my guide to create a multiboot USB flash disk. The first part I posted on how to install BartPE on a flash drive. Now I will show you how to install several Linux distros on the flash drive. I’m also assuming that you have some sort of knowledge of Linux operating systems.
The first step is to install BartPE as described in my last post. The only way I was able to get this to work was to install it first. Once it has been installed you then need to create a partitioning scheme. When I installed BartPE I set the size to 1.5 GB on an 8GB flash drive so I have plenty of room to put other operating systems. There are several tools that you can use to shink your BartPE partition if needed, I like to use gparted in Linux.
Once you have your BartPE partition to the size you want you then need to create a partition for each distribution of Linux (or any other OS that you want) and a boot partition. My boot partition is set to 8MB and ext2 as the file system.
Here is my partition table:

Device Boot Start End Blocks ID System
/dev/sdb1 1 203 1630566 c W95 FAT32 (LBA)
/dev/sdb2 * 204 204 8032+ 83 Linux
/dev/sdb3 205 976 6201090 5 Extended
/dev/sdb5 333 335 24066 6 FAT16
/dev/sdb6 336 591 2056288+ 83 Linux
/dev/sdb7 205 268 514017 b W95 FAT32
/dev/sdb8 269 332 514048+ b W95 FAT32

You will notice that I have a lot of partitions; I’m testing some other tools that I’m trying to get installed on my flash drive. Once I get them I will post how I have completed it.
Now time to install Backtrack. We will mount the ISO and then copy the contents to the correct partition.

mount –o loop backtrack.iso /mnt/iso
mount /dev/sdb6 /mnt/usb
cp –a /mnt/iso/* /mnt/usb
umount /mnt/usb
umount /mnt/iso

You can do the same for pretty much any OS (I only tested a few Linux distros). Once that is complete you need to install Grub which will allow you to boot to any OS on your flash drive. My boot partition was /dev/sdb2 so I ran the following command

mount /dev/sdb2 /mnt/usb
grub-install –root-directory=/mnt/usb –recheck ‘(hd1)’

I also installed memtest86 on the flash drive, nice utility to have.

cp memtest86plus /mnt/usb/boot

Now you just need to edit your menu.lst so that you can boot into the OS’s. This is the hardest part and i don’t remember how I figured out what to put in (sorry), but here is my menu.lst file

default 0
timeout 5

title miniPE
rootnoverify (,0)
chainloader +1

title BackTrack4
root (,5)
kernel /boot/vmlinuz BOOT=casper boot=casper nopersistent rw quiet vga=0x317
initrd /boot/initrd.gz

title MemTest86+
root (,1)
kernel /boot/memtest86+.bin