Sunday, March 01, 2009

Backtrack Beta 4 + USB Persistent/Changes Installation Ubuntu (Hardy/Ibex)

This post explains how to install and setup Backtrack 4 on a USB drive so that one can save changes. I have also included a fix to the Launchpad PPA required keys error so that the system can be updated without problems.
I know that there are several ways to do this. I have seen the other howtos, however, I ended up needing several references in completing this task and I have decided to share.

Software you will need
Unetbootin - There are serveral ways to get this installed, I used the deb file from unetbootin.sourceforge.net. I am not using the newest version of Unetbootin but this should not matter. Here are some older versions for other distributions. I found the debian file for hardy here.

Backtrack Beta ISO - Brought to you by Remote-Exploit.org, I am using the DVD image bt4-beta.iso.

Launchpad-ppa-fix - A perl script to fix Launchpad PPA links and import required keys. You also need to install libhtml-parser-perl and libio-socket-ssl-perl, they are in the Ubuntu repositories.
**UPDATE**
There is an alternative to using this perl script below which is the recommended method for solving this issue (simply renew the gpg key using the terminal).

Gparted - To format the USB drive. There are other ways to do this. Gparted is a nice GUI that gets the job done. Gparted is in the repositories. Feel free to use something else.

I am going to assume that you have installed/setup either Ubuntu 8.04 (HARDY) or 8.10 (ibex). This Howto may work with other versions of Linux, but I have only tested this on Hardy and Ibex.

I am also going to assume that you have installed Unetbootin, Gparted and that you have downloaded the backtrack DVD image. We will download and unpack the perl script later.

So on with the show.

1) Using Gparted create two partitions on your thumb drive.
-The first partition needs to be a primary partition of at least 1 GB and formated as FAT32.
-The second partition can be the rest of the thumb drive. It needs to be formatted as ext2.
I formated the entire drive as FAT32 and then created a 4gb ext2 partition. My USB drive is 16GB total, and I would like to access most of its space on both Linux and Windows when I am not using Backtrack 4, so I've made 12GB of the USB drive FAT32 and 4GB ext2.

2) Install Backtrack 4 to USB drive using Unetbootin.
Open Unetbootin, choose Disk image and specify the path to the bt4-beta.iso. In the Type, choose the FAT32 partition. Sometimes you have to check 'Show All Devices' as Unetbootin does not always detect a disk as a USB disk. In my case I chose /dev/sdb1. You can check your drives and partitions in terminal using df or fdisk:
:~$ sudo fdisk -l
or
:~$ df -h

3) Press the OK.
You may get a warning that files exist on your USB drive. Once you are sure you've picked the correct partition, tell it to go ahead and replace the files. When Unetbootin is finished it will prompt you to reboot or close. Reboot the computer and test to see if the computer will boot to the USB drive.

NOTE: In some cases the bootloader (which is lilo) is not configured properly or is not installed at all on the USB disk. In my case, the bootloader was installed, however the vesa settings were messed up and lilo would not display properly. If you boot to the USB drive and you get a gray screen but no menu, or a menu that flickers past the screen, then you have the same issue I did. This is fairly simple to solve. First boot back into Ubuntu. In terminal, execute the script /USBDrive/boot/bootinst.sh:
:~$ sh /USBDrive/boot/bootinst.sh

The script will try to auto detect the drive and partition where Backtrack 4 is installed and will ask for a confirmation. Check that it has detected the correct partition and confirm. Once you are brought back to the prompt, you should be able to boot the USB drive and see the grey screen with the menu options. Boot into Backtrack and make sure things start properly.

4) Configure persistent changes while booted to Backtrack 4.
Once we have booted into Backtrack 4 we need to configure the rest of the USB drive.. We need to create a folder called "changes" in the second ext2 partition. In my case, this is /dev/sdb2. We may also need to mount this partition if it is not mounted. We can do this in terminal:
:~$ mount /dev/sdb2 /mnt/sdb2
:~$ cd /mnt/sdb2
:~$ mkdir changes

Next we need to change the permissions on /boot/syslinux/lilo and /boot/syslinux/syslinux . Again in terminal:
:~$ cd /boot/syslinux
:~$ chmod +Xx lilo
:~$ chmod +Xx syslinux

Now, open /boot/syslinux/syslinux.cfg with a text editor and make the following changes. I prefer vi, if you want a GUI editor, you can use Kate.
-Find the line “LABEL BT4″.
-Copy that line and the next 3 lines and paste them right below the existing section. This will give us a fall back option in case something goes wrong.
-Change the original “LABEL BT4″ to something you want like “LABEL BT4-persistent”.
-Change the line that begins with APPEND in the original section by adding “changes=/dev/sdb2″ immediately after “root=/dev/ram0 rw”.
-It should look something like this:

LABEL BT4
MENU LABEL BT4 Beta - Console Persistent
KERNEL /boot/vmlinuz
APPEND vga=0x317 initrd=/boot/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw changes=/dev/sdb2 quiet

LABEL BT4
MENU LABEL BT4 Beta - Console
KERNEL /boot/vmlinuz
APPEND vga=0x317 initrd=/boot/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw quiet

-Save the changes and exit.
Reboot and select the option 'BT4 Beta Persistent', it should be the first option. To test that persistent changes are setup correctly, create a file and reboot again. If the file you created is still there after you reboot, everything is working.

Note: The Network Manager is not started at boot. You will need to add it to start during boot or you will need to start it when you want to use it. You can do this in terminal:
:~$ /etc/init.d/NetworkManager start

5) Finally, use the perl script or gpg to fix Launchpad PPA links and import required keys.
You will notice that if you do an apt-get update in terminal, you will get an error. It is easy to resolve this issue.
Boot into Backtrack 4 and connect to the internet. We need a few packages for the perl script to work. You can use synaptic or apt to install them. To use apt, type the following into the terminal:
:~$ sudo apt-get update
:~$ sudo apt-get install libhtml-parser-perl libio-socket-ssl-perl

Now download, untar and run the perl script. You can do this in terminal:
:~$ wget http://savvas.radevic.com/launchpad/launchpad-ppa-fix.tar.gz -O launchpad-ppa-fix.tar.gz

:~$ tar xzvf launchpad-ppa-fix.tar.gz
:~$ perl launchpad-ppa-fix.pl
:~$ sudo apt-get update

Run this script until you no longer get any error.

Alternatively, if you do not want to use the perl script, you can use the following commands in terminal to fix the PPA links:
:~$ gpg --keyserver keyserver.ubuntu.com --recv CB2F6C86F77B1CA9
:~$ gpg --export --armor CB2F6C86F77B1CA9 | apt-key add -
:~$ sudo apt-get update

That is it! You should now have a Backtrack 4 installation on your USB drive that you are able to update without errors and save changes to.

FINAL NOTES:
1) If you mess up your installation, all you need do is delete the contents of the second ext2 partition leaving nothing but an empty 'changes' folder. This will bring everything back to a fresh install and you will still be able to save changes.

2) I have had issues with updating from the Launchpad Repositories. It seems to break KDE from time to time. The RE Forum says that you should be able to update with the default repository list without any problems, but this does not always seem to be the case. If you notice KDE breaking, try removing the launchpad repositories from the /etc/apt/sources.list.

Thursday, February 05, 2009

Howto: Setup ddclient + Zoneedit Ubuntu 10.04 - 12.04 (Hardy/Ibex/Jaunty/Karmic/Lucid/Maverick/Narwhal/Ocelot/Precise)

This post explains how to install and setup the dynamic dns client ddclient to sync your dynamic IP address with the dynamic DNS service Zoneedit.com. Most of the howto's I've seen only cover setups for dynamic DNS services like dyndns.com. I prefer Zoneedit.com because it is simple and free.

I am assuming you have a domain name (yourdomain.com), an account with Zoneedit, and that you have setup the appropriate records in your Zoneedit account for your domain. I am also assuming that you have installed/setup Ubuntu.  This Howto has been tested on Ubuntu 8.04  through 12.04 with success.  This Howto may work with other versions of Linux.

For the purpose of this howto, I will use the (A)-record that I've created in Zoneedit called "tux.yourdomain.com". So on with the show:

1.) First you need to install some packages on your Ubuntu machine from the location that you want syncing with Zoneedit. You can use synaptic, apptitude or apt. To use apt, type the following into the terminal:
:~$ sudo apt-get install ddclient ssh libio-socket-ssl-perl
At the prompts you will be asked to select your Dns provider. You need to select Zoneedit here and input the appropriate values, for example:
Fully qualified domain names: tux.yourdomain.com
Username for dynamic DNS service: your-username
Password: your-password
Enter the interface which is used for using dynamic DNS service: web

2.) After the installation is finished, you need to configure /etc/ddclient.conf. You can edit this file with vim or your favorite text editor. To open the file in Gedit, you can type the following into terminal:
:~$ gksu gedit /etc/ddclient.conf
You need to modify the /etc/ddclient.conf and add entries for "daemon", "ssl" and replace "use=if, if=web" with "use=web, web='http://www.zoneedit.com/checkip.html/', web-skip='IP Address'" to match the following example:
# Configuration file for ddclient generated by debconf
#
# /etc/ddclient.conf

daemon=300
pid=/var/run/ddclient.pid
ssl=yes
protocol=zoneedit1
## use=if, if=web
use=web, web='http://www.zoneedit.com/checkip.html/', web-skip='IP Address'
## server=www.zoneedit.com
server=dynamic.zoneedit.com
login=
password='*******
tux.yourdomain.com
Update: It has been recommended in the comments that you change:
www.zoneedit.com/checkip.html
to
legacy.zoneedit.com/checkip.html.

3.) Now open /etc/default/ddclient:
:~$ gksu gedit /etc/default/ddclient
Check that /etc/default/ddclient contains the following lines:
run_ipup="false"
run_daemon="true"
daemon_interval="300"
You can set the interval shorter or longer in /etc/default/ddclient, but if you do, also correct your /etc/ddclient.conf to match.

4) You can now restart ddclient with your new configurations.
:~$ sudo /etc/init.d/ddclient restart
To check the status of the ddclient daemon:
:~$ sudo /etc/init.d/ddclient status
If you do not get an error similar to the following, the ddclient deamon has probably restarted without any issues:
WARNING: file /etc/ddclient.conf, line x
5.) Just because ddclient restarted correctly does NOT mean that it is syncing your IP address correctly with Zoneedit. Since ddclient writes logs to Syslog, you can check to see if the syncing of your Ip is s Success by looking through /var/log/syslog. I use tail to do this in the following way:
:~$ tail -f /var/log/syslog
If you see something at the end of Syslog that looks similar to this:
Feb 5 21:16:36 tux ddclient[12034]: SUCCESS: updating tux.yourdomain.com: IP address set to (200: Update succeeded.)
then ddclient should be working fine. However, if you get something similar to the following, you should check your /etc/ddclient.conf and /etc/default/ddclient configurations:
Feb 5 21:13:44 tux ddclient[11788]: WARNING: caught SIGTERM; exiting
Feb 5 21:13:45 tux ddclient[11894]: FATAL: Error loading the Perl module IO::Socket::SSL needed for SSL connect.
Suggestion: Make note of the single quotes in /etc/ddclient.conf, without them things do not neccessarily work. Also, make sure that you have all the packages installed.

There is another warning being reported with Ubuntu 10.04 and 11.04.
WARNING: file /var/cache/ddclient/ddclient.cache, line 3: Invalid Value for keyword 'ip' = ''
Thanks to DAnny Flack and Florynce, in the comments below, a solution for fixing this warning is suggested. The suggestion is to delete the cache file: /var/cache/ddclient/ddclient.cache and to restart ddclient. This can be done in the following way:

:~$ sudo rm /var/cache/ddclient/ddclient.cache
:~$sudo /etc/init.d/ddclient restart
That is it. Hope this helps.

References:
1) https://help.ubuntu.com/community/DynamicDNS
2) http://www.linuxquestions.org........697495/#post3413085

Sunday, July 27, 2008

Citibank is BLOCKING Customers Who Use Linux

One of my laptops has Ubuntu 8.04 64bit and it works perfect. Then I went to Citibank's site to login for the first time, http://citicards.com. At first, you get this:

You should get this, however, unless you can login within 2 seconds the page switches to this :
Naturally, User Agent Switcher, a firefox addon, came to mind and it works perfectly but I was just not satisfied. None of the other banks I use do this, even the small ones. According to Citibank:
I called Citibank Technical Support and the person I spoke with said "the Citibank website supports Firefox but does not support uncommon operating systems like Linux".
I called again just to see if this was the official Citibank policy. This next person went into detail about how Windows is the only OS that offers "real security".

At this point I was a little offended.

The next two people I spoke with had never heard of Linux (in technical support!) and put me on hold to ask the manager if I could view http://citicard.com with Linux. Of course they came back and said Citibank only supports "secure operating systems" and that windows was the only option.

The Last person I spoke with at Citibank Technical Support had heard of Linux. She stated "I have Ubuntu on my laptop, and I love it!". She also assured me, off the record, that this is Citibank's official policy and they do not care.

Personally, this pisses me off. WHY would you block customers that use Linux, especially when your site works fine with Linux? This has clearly been an issue for over a year. This post is from Linuxquestions.org. In a post on movingtofreedom.org, Citibank: You’re on Notice, the author goes into detail about his similar experience with Citibank and their unwillingness to do a thing about it.

Maybe this is nothing but if you feel like calling Customer Support, use 800.852.7282, no waiting ::grin::.

Here is a video showing the problem. First I show that Citibank is using Solaris, via Netcraft, and then I attempt to go to http://citicards.com. As you can see, the page goes blank. I then right click on the page, press play, continue, continue, and close. This workaround, brings the login page up correctly.

If you work for Citigroup Inc. and you would like to share your thoughts, please contact me via email or in the comment section.

Update:
One or two Citibank employees have mentioned wanting to do something about it. If something had been accomplished, I would have already posted it.

Update:
neil1492 on digg.com pointed out a very interesting fact with this question:
"Now the question is why is there a flash animation for Linux but not for Windows or Mac?"
This is a very good question indeed and is probably a part of why Linux users are having this issue with Citibank.

Update:
omoshiroi on digg.com found this alternative:
https://www.accountonline.com
Note: You NEED to use both the https and the www or else it will fail. This is the address that http://citicards.com forwards to once a user logs in. I wonder why Citibank did not give this address to me when I called?

Update:
HAKdragon On Digg.com verified my suspicion that Citibank is using Solaris on their servers with this link to Netcraft. It appears that both http://citicards.com and http://citibank.com are running on Solaris. So Citibank is using an operating system that is, in their opinion, not secure. Very interesting ::grin::

Update:
cube3x3 on digg.com stated a second solution aside from using the User-Agent Switcher add-on:
1. Right Click on your browser in center area (after the page disappears)
2. Click on Play option
3. A window will pop up, click continue twice and close.
Note: you have to do this each time you goto http://citicards.com to login.

Update:
fotoman On Digg.com pointed out a rather interesting fix. If you goto http://citicards.com and hit a few times once you see the login page, the page will not disappear. You can then login without any problem. very nice.

Update:
earthmansurfer On Digg.com pointed out a 4th solution, very similar to the third.
Stop the page right after you get the log in screen. It will work fine, just have to time stopping the load.

Update:
chezifresh On Digg.com pointed out a funny workaround, but it requires some good timing. If you are able to click in the login field before the page disappears, the page will not vanish. I was able to verify this workaround a few times, however, some of the time it doesn't work, even if you click in the field before the page vanishes.

Update:
Clemens on blogger.com point out this more involved solution. Since I do not use greasemonkey, a Firefox add-on, I cannot verify it works. Here is the script:
#####Start#####
this greasemonkey script deals with the problem:

// ==UserScript==
// can be found at http://cdrews.com/citibank.user.js
// @name Citibank
// @namespace citibank
// @description Remove stupid help screen
// @include https://www.citicards.com/cards/wv/home.do*
// ==/UserScript==
//
//
try{
if(null != document.getElementById('help-overlay')){
var crap = document.getElementById('help-overlay') ;
GM_log('removing stupid help overlay')
crap.parentNode.removeChild(crap);
}
}catch(e){
GM_log( "encountered some problem, here's the exception:" + e)
}
######End######

Update
May on Digg.com have pointed out that if you have a flash blocker add-on for firefox, it will work. This is most likely do to the fact that it pauses the flash app giving you a chance to play it or not. This is very similar to hitting Esc while the flash loads or stoping the page before the flash app vanishes. This solution is definitely one of the easiest and potentially has other advantages.

Interesting Links and References:
Microsoft Business Solutions Joins Forces With Citibank Merchant Services .....
Microsoft Signs Citibank Indian Software Unit Deal
Citibank joins Microsoft bill venture

--from moulin1 on digg.com
Now this picture is starting to make sense. Lots of Microsoft+Citibank deals happening, I wonder.......

Citibank ATM breach reveals PIN security problems
PIN Scandal 'Worst Hack Ever' - Citibank Only The Start

--from
m6ack on digg.com

Citibank: You’re on Notice

--from Budding on blogger.com

Comments from Citibank Doesn't Like Linux Users on digg.com

Tuesday, April 10, 2007

Google Can Do Anything: Google-Maps From New York, USA to Paris, France


This is Awesome. My brother asks me to go to Google Maps and get directions for him, which he often does when on the road, however this time he wants directions from New York, USA To Paris, France. My reaction is the obvious one and he say "Just do it!". So I did and in fact now have directions from New York to Paris,France. Here they are(With above Photo):
From:
New York, NY
Drive: 3,800 mi (about 29 days 7 hours)

1.Head southwest on Broadway toward Warren St 0.2 mi 1 min
2. Turn left at Park Row 0.1 mi 1 min
3. Slight right at Frankfort St 0.3 mi 1 min
4. Turn left at Pearl St 56 ft
5. Turn right onto the F.D.R. Dr N ramp 0.4 mi 1 min
6. Merge onto FDR Dr N 7.7 mi 12 mins
7. Take exit 17 on the left for Triboro Bridge/Grand Central Pkwy toward I-278/Bruckner Expy 0.4 mi 2 mins
8. Merge onto Triborough Bridge Partial toll road 0.4 mi 1 min
9. Merge onto I-278 E via the ramp to I-87 N/Bronx/Upstate N Y/New England 0.6 mi 1 min
10. Take exit 47 to merge onto Bruckner Expy/I-278 E toward New Haven 1.9 mi 2 mins
11. Take the I-278 E exit toward New Haven 0.3 mi
12. Merge onto Bruckner Expy 5.0 mi 6 mins
13. Continue on I-95 N Partial toll road Entering Connecticut 62.1 mi 1 hour 12 mins
14. Take exit 48 on the left to merge onto I-91 N toward Hartford 36.8 mi 37 mins
15. Take exit 29 for US-5 N/CT-15 toward I-84/E Hartford/Boston 0.4 mi
16. Merge onto CT-15 N 1.7 mi 2 mins
17. Merge onto I-84 E Partial toll road Entering Massachusetts 40.7 mi 38 mins
18. Take the exit onto I-90 E/Mass Pike/Massachusetts Turnpike toward N.H.-Maine/Boston Partial toll road 56.0 mi 56 mins
19. Take exit 24 A-B-C on the left toward I-93 N/Concord NH/S Station/I-93 S/Quincy 0.4 mi 1 min
20. Merge onto Atlantic Ave 0.8 mi 3 mins
21. Turn right at Central St 0.1 mi
22. Turn right at Long Wharf 0.1 mi
23. Swim across the Atlantic Ocean 3,462 mi 29 days 0 hours
24. Slight right at E05 0.5 mi 2 mins
25. At the traffic circle, take the 2nd exit onto E05/Pont Vauban 0.1 mi
26. Turn right at E05 Partial toll road 17.3 mi 22 mins
27. At the traffic circle, take the 2nd exit onto A131/E05 heading to A131/Rouen/Paris/Evreux Partial toll road 9.1 mi 8 mins
28. Take the exit onto A13/E05/L'Autoroute de Normandie Partial toll road 20.3 mi 17 mins
29. Take the exit onto A13/E05/L'Autoroute de Normandie Partial toll road 56.5 mi 47 mins
30. Take the exit on the left onto A14 toward Nanterre/La Défense Partial toll road 12.5 mi 16 mins
31. Slight right at N13 1.4 mi 3 mins
32. Turn right at Avenue de Neuilly/N13 269 ft
33. At the traffic circle, take the 4th exit onto Avenue de la Grande Armée 0.7 mi 3 mins
34. At Place Charles de Gaulle, take the 5th exit onto Avenue des Champs-Elysées 1.3 mi 3 mins
35. Slight right at Voie Georges Pompidou 1.4 mi 3 mins
36. Slight left to stay on Voie Georges Pompidou 440 ft
37. Slight right at Quai de la Mégisserie 377 ft
38. Continue on Quai de Gesvres 0.2 mi 1 min
39. Turn left at Place de l'Hôtel de Ville 194 ft
To:
Paris
France

So get your wet suites, get in the car and take the family to Paris via maps.google.com. I will now forever own at least a few shares of stock in Google. Absolutely Awesome! :grin::