Showing posts with label installation. Show all posts
Showing posts with label installation. Show all posts

Thursday, November 24, 2011

Browser Exploitation Framework on Mac OSX 10.6


As you know BeEF is a good framwork for browser exploitation.Here is a guide to install it in Mac,as the original documentation doesnt work most of the times with OSX.


Check your ruby version first (Im assuming you have ruby gem,rvm and svn already installed,if not install them first.)

ruby --version

i had 1.8,updated to 1.9 through rvm and made it default.
create a folder for beef and checkout the latest code,
mkdir beef
cd !$
svn checkout http://beef.googlecode.com/svn/trunk/ beef-read-only
cd beef-read-only
ruby beef
You may see some Load errors,don't be panic..we can easily fix it.

Beef requires some ruby gems,if it is not there inside your system,It will throw load errors,to fix those get what gem is missing and install it using the following command
Lets say you saw one error like ,

/Users/r3dsm0k3/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/
site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- ansi (LoadError)
from /Users/r3dsm0k3/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /users/r3dsm0k3/Desktop/stuffhack/beef/beef-read-only/core/loader.rb:23:in `'
from :29:in `require'
from :29:in `require'
from beef:37:in `
'

from the first line it is sure that,there is no gem called "ansi"
just install it then,
gem install ansi


done, :)
Try running beef again.If it fails,install the missing gem like before.
I got issues with the following gems,
ansi
erubis
term/ansicolor (
gem install term-ansicolor
)
librex (for librex, the installation is quite different as beef needs 0.0.52 version of librex,but when you install from gem it will be the latest,so install the corresponding version like
gem install librex --version 0.0.52 --no-rdoc --no-ri 
)

After all your dependencies are fulfilled run beef.

ruby beef

Enjoy your pwnage,Errr...Pentest :)

Saturday, October 15, 2011

Un-Fuck the VirtualBox

If you are like me who tried to configure ssh working from  Host OS to Guest OS by doing the steps from this Blog and got this   "Configuration error: Failed to get the "MAC" value. 
VBox status code: -2103 (VERR_CFGM_VALUE_NOT_FOUND). " error while starting the machine,Here is how to fix that annoying error.
Just open a terminal window and do
You have to replace the <Machine name> with your Virtual Machine,and use escape the spaces with a backslash like "Ubuntu\ 10.10"


$ VBoxManage getextradata <Machine name> enumerate







This will display the keys that you have configured for your machine,you will have to unset the keys that you have added.
You can do this simply providing an empty value for the key.


Im just pasting my output to make things clear for a newbie.



aji@mbp:~$ VBoxManage getextradata Ubuntu\ 11.04 enumerate
Key: GUI/LastCloseAction, Value: shutdown
Key: GUI/LastGuestSizeHint, Value: 640,480
Key: GUI/LastNormalWindowPosition, Value: 480,141,640,342,max
Key: GUI/LastScaleWindowPosition, Value: 550,118,640,480
Key: GUI/MiniToolBarAlignment, Value: top
Key: GUI/SaveMountedAtRuntime, Value: yes
Key: GUI/ShowMiniToolBar, Value: yes
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort, Value: 22
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort, Value: 2222
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol, Value: TCP
I have added the last 3 keys manually,so lets just go ahead and remove the custom keys by executing the following 3 commands.


aji@mbp:~$ VBoxManage setextradata Ubuntu\ 11.04  VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort
aji@mbp:~$ VBoxManage setextradata Ubuntu\ 11.04 VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort
aji@mbp:~$ VBoxManage setextradata Ubuntu\ 11.04 VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol


And we're done.Now start your VirtualBox,it will run without any problems.
Hope this helps someone.