Tuesday, August 25, 2009

Create a .deb package from source files

If you are like me, you will find that you need to install a lot of application software from the source code and compile the build for your specific platform. The most common way of installing the program is to download the source (usually it's a file with .tgz or .tar.gz extension to it), unpack the file, go into the directory where the source files are extracted, run the configure tool, followed by the make and finally the make install commands.

wget http://site.com/source/program-1.0.tgz
tar -zxvf program-1.0.tgz
cd program-1.0
./configure
make
sudo make install

This will download, extract, compile and install the program in your Ubuntu eco-system.

If you have to do this to a few machines or need to reinstall your computer ever so often, it would simply be easier if you could create a .deb file and simply install the program when you need to which is faster, and you do not need the installation of compiler, make utility, header and dev libraries.

There is a tool called checkinstall which you can install from the Ubuntu repository. To do that, simply run the command:

sudo apt-get install checkinstall

Once that is installed, when you want to create a .deb file, you do pretty much everything like normal but instead of installing the program with "sudo make install", you create a .deb at this point with the command "sudo checkinstall" which will create the .deb file for you.

You can then copy the .deb file into a safe place, and when you need to install in the future, copy the .deb file to your local directory and issue the command "sudo dpkg -i package.deb" which will install the applictaion for you without the need for the source download, dev libraries, compiler, etc.

Note: These are basic instructions that may not always work. Some packages require additional dependencies and optional parameters to be specified in order to build them successfully.

Wednesday, July 8, 2009

Using BackTrack 4 applications on a Ubuntu (8.10 Intrepid) build...

There is a security tools distro called BackTrack which in it's own words:

BackTrack is the most top rated linux live distribution focused on penetration testing. With no installation whatsoever, the analysis platform is started directly from the CD-Rom and is fully accessible within minutes.

To know more about BackTrack, click here.

The latest version of BackTrack (BackTrack 4) does away with a simple build that is only good for the next six months (you could never really update the build completely). It now uses Ubuntu (8.10 Intrepid) as a base so that application and updates are easily available and updated.

As much as I like BackTrack which uses KDE, I am a GNOME person. Instead of using the BackTrack build, I wanted to use Ubuntu, yet leveraging on the vast amount of tools that BackTrack offers. To do that, you must add the following into your /etc/apt/sources.list file:

deb http://repo.offensive-security.com/dist/bt4 binary/

Before you can start using the BackTrack repository, you will need to install the GPG key so that the APT tool does not give you an error message saying the repository has no public key. To do that:

wget http://apt.pearsoncomputing.net/public.gpg
sudo apt-key add public.gpg

You can then issue the apt-get update command and download the list of application that the repository hosts and use the Synaptic Package Manager to view what is available and install the applications that you want.

Note, you should only do this on Ubuntu 8.10 Intrepid as all the work the BackTrack team does is using this version of Ubuntu. I am assuming you are well versed in the ways of Ubuntu and know when you need to use root access to do some of the actions stated in this article.



Monday, July 6, 2009

Speeding up your Ubuntu updates -- Malaysian update

I had posted an article called Speeding up your Ubuntu updates on 7-Mar-2009. What I had failed to realise was the fact that Ubuntu updates are now hosted on a Malaysian site at the Multimedia University at archive.mmu.edu.my since 21-Jun-2008.

Jaunty users will see the Malaysian host when they run the Software Sources program in Ubuntu. Earlier distros will need to manually change the source in /etc/apt/source.list file. Go to this link for more details.

Saturday, May 30, 2009

Keeping yourself updated (really useful links) - 20090530...

I have found that no one person or website can keep track of security issues. Below are the addresses of some sites that I visit or subscribe to to keep me updated.

  1. http://www.darknet.org.uk/
  2. http://bugspy.net/
  3. http://secunia.com/

Tuesday, April 28, 2009

Sunday, April 26, 2009

Misc info...

Tenable has released Nessus 4, you can go give it a try at http://www.nessus.org/nessus/.

I have upgraded all my machines (except my EeePC) to Ubuntu 9.04 Jaunty Jackalope. So anything I post from now onwards is most probably done on a Jaunty build and maybe an Intrepid (my EeePC).

In case anyone is wondering, I have successfully upgraded my wubi installation of Ubuntu from 8.10 to 9.04.

Saturday, April 11, 2009

Installing Metasploit 3.2 on Ubuntu 9.04...

If you want to use Metasploit, you will need to install this program manually as it is not found in Ubuntu's repository (feel free to correct me on this).

You will first need to install the following libraries from Ubuntu's repositories:

sudo apt-get install subversion ruby libruby rdoc libyaml-ruby libzlib-ruby
sudo apt-get install libopenssl-ruby libdl-ruby libreadline-ruby
sudo apt-get install libiconv-ruby rubygems libgtk2-ruby libglade2-ruby

You will then need to download Metasploit 3.2 from the Metasploit website at URL:

http://spool.metasploit.com/releases/framework-3.2.tar.gz

The easiest way would be to use the wget command:

wget "http://spool.metasploit.com/releases/framework-3.2.tar.gz"

Unpack the program:

tar -zxvf framework-3.2.tar.gz

You will then need to update Metasploit with the latest exploits and updates by going into the framework-3.2 sub-directory and issuing the subversion update command:

sudo svn update

You now have the latest version of Metasploit. It is recommended that you issue the "sudo svn update" command every time you are about to use the program or at least once a week.

Tested this on Ubuntu 9.04 (Jaunty Jackalope) beta...