Wednesday, November 2, 2011

Quick RVM + BeEF install guide


Disclaimer: This is only a recipe I wrote for me. But I thought it could be useful for other people so I decided to share it. Of course, no guarantee! So if you encounter any problem, then I can only say this: RTFM! :-)

Note #1: I used Debian 5.x but it should work for other UNIXes.
Note #2: Perhaps you'll need to invoke "apt-get" with some *-dev/lib packages. Unfortunately I didn't take note of that.


RVM.-

1/ Install on ~/.rvm
$ bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )

$ echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile

$ rvm requirements

$ rvm list known

$ rvm install 1.9.2

2/ We test "rvm"...
$ rvm use 1.9.2

$ ruby -v

Optionally, you can set a version of Ruby to use as the default for new shells. Note that this overrides the 'system' ruby:
$ rvm use 1.9.2 --default

For turning back to system default Ruby:
$ rvm use system


BEEF.-

3/ Set up Ruby environment for BeEF
$ rvm use 1.9.2
$ rvm gemset create beef
$ rvm 1.9.2@beef

4/ Dowload from svn
$ svn checkout http://beef.googlecode.com/svn/trunk/ beef-read-only

Then rename to "beef" & cd to it.

5/ Execute BeEF installer:
$ ruby install

And then choose "automatic install". Otherwise, ask the installer what to install and then manually install it:
$ gem install ansi term-ansicolor dm-core json data_objects do_sqlite3 sqlite3 dm-sqlite-adapter parseconfig erubis dm-migrations librex --no-rdoc --no-ri

6/ Change default user/pass:
beef / beef

By editing the file:
extensions/admin_ui/config.yaml

7/ We also can change listening host & port by editing the file:
config.yaml

8/ Create startup script: "beefstart"

#!/bin/bash

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function

# Beef environment setup
rvm 1.9.2@beef

# Don't forget to change this according to your needs!
cd /home/roman/tools/beef

# Run BeEF
./beef

# Return to system Ruby
rvm system

9/ Now, to run BeEF
$ ./beefstart

(we can just add BeEF directory to $PATH)

No comments:

Post a Comment