Fix homebrew / metasploit with ruby 2.0 on OS X

If like me you use the Metasploit Framework (MSF) under OS X using homebrew, you have undoubtably had the issue with the latest release of ruby 2.0. Once I had upgraded to the latest version of ruby I ran the usual brew cleanup command which removed my ruby193 formula and on launching MSF I was greetedd with a bunch of errors. D’oh.

It turns out there are some issues with MSF and ruby 2.0 require(). Here is a solution that worked for me to revert back to ruby 1.9.3

  1. Download the ruby193 formula from here and copy the file to /usr/local/Library/Forumla

  2. Run: brew install ruby193

  3. Finally run: brew link —overwrite ruby193

If you run ruby -v you should see you are running version 1.9.3p392. Thats it. The brew link command has updated all the symlinks for the binaries, you are ready to go.

13. March 2013 by Matt
Categories: apple, Tutorial | Tags: , , , , , , , , | Comments Off

OS X Packet Forwarding

Wow, first post of 2013.

Here is a quick python script I put together to enable/disable packet forwarding in OS X. To be used in conjunction with arp spoofing etc.

19. February 2013 by Matt
Categories: apple, Hacking, Programming, Python | Tags: , , , , , , , , , , , | Leave a comment

Installing Tor & Proxychains in OS X

In a previous post I talked about using proxychains with tor on a linux system. Today I will give you a quick lesson on getting the same setup running under OS X.

First of all you need to head over the Mac AppStore and install the latest version of XCODE. This is as simple as doing a search and clicking the install button. Once XCODE is installed, you need to open the application and goto the preferences window. Under the download tab there is the option to install command line tools, install this and then quit XCODE.

Next we need to install homebrew. As the homebrew team put it; “Homebrew installs the stuff you need that Apple didn’t”. Homebrew is pretty much apt-get for OS X. To get homebrew installed fire up a terminal and enter:

Now that homebrew is downloaded, compiled and installed you need to run the following command make sure the homebrew binary path takes precedent over OS X:

When you have set your path you will need to reboot for the changes to take effect. After the reboot, run the following command to configure and start using homebrew:

You should now be raring to brew. To install tor simply run the command:

Homebrew will now download, configure, build & install tor. Once this is complete we need to get proxychains. To download the homebrew proxychains formula, run the following command:

When the download is complet, change into the new proxychains directory and rename the single ruby (.rb) file to proxychains.rb. Now copy the proxychains.rb file to /usr/local/Library/formula. You are no ready to install proxychains:

As with tor, this command will download build & install proxychains.

And thats it! You now have homebrew, proxychains and tor installed on your mac.

18. November 2012 by Matt
Categories: apple, Hacking, internet, linux, Tutorial | Tags: , , , , , , , | 3 comments

Debian backports

Debian is my personal favourite Linux distribution. I have used it for many years. I have tried other flavours but I always end up back where I started.

I like to run the most stable releases on my machines, currently Debian 6 squeeze. The only problem with using stable builds of Debian is they tend to be less up-to-date than other distributions such as mint or ubuntu. This can make supporting new devices such as solid state drives a pain in the ass.

Fortunately there is Debian backports. Backports are recompiled packages from testing and unstable in a stable environment so that they will run without new libraries on a Debian stable distribution. This means we can get packages such as the latest backport kernel (currently 3.2) with out compromising the stability of our system.

Setting up backports is very easy. Create a new file in /etc/apt/sources.list.d/ called backports.list. Then run the following command as root:

Then run apt-get update to refresh your package list. Now we have access to the backport repos and can begin installing some up-to-date applications. For example, here is the command I would use to upgrade my system to the latest kernel:

Notice I use install -t squeeze backports package, this is because all backports are disabled by default so you need to prefix the above command to tell apt you want to install from backports.

Thats pretty much all I have for you, if you would like more information on Debian backports and a list of available packagaes you can visit the website here.

15. August 2012 by Matt
Categories: linux, Tutorial | Tags: , , , , | Leave a comment

Staying anonymous with tor & proxychains

I am going to give you a quick demo on getting tor installed along with proxychains to route network based applications through the tor network.

This is aimed at debian based systems but the code can be used over any linux distro, just switch out the package manger code for your own distro.

Firstly we need to download and install proxychains and some required dependencies for compiling and installing tor.

Next we need to download and unpack tor.

Now we are ready for compiling. Change to your unpacked tor directory and run the following commands:

After a few minutes you should be back at your bash prompt following a successful install of tor. Now we just need to check the /etc/proxychains.conf file to make sure it reads socks4 127.0.0.1 9050 at the end of the file. This line enables you to route applications anonymously through the tor network.

We are all set. To start tor open a terminal and simply enter tor and hit return, this will initiate the connection to the tor network. Open up a new terminal tab and use proxychains to route any network application. For example:

Here is a little bash script to automate downloading and installing tor: http://pastebin.com/X4ubkrbe

06. August 2012 by Matt
Categories: internet, linux, Tutorial | Tags: , , , , , , | Leave a comment

← Older posts