Results 1 to 7 of 7

Thread: Metasploit pcaprub fix in BT5

  1. #1
    Good friend of the forums scottm99's Avatar
    Join Date
    Feb 2010
    Location
    underwater
    Posts
    371

    Default Metasploit pcaprub fix in BT5

    I just installed BT5 (32-bit GNOME) and discovered this build did not have the pcaprub extensions installed. So, Metasploit won't do anything with the raw socket modules except give an error. In the interest of saving others time, below is a cut-and-paste from the Metasploit wiki on how to do this (Note that the Metasploit wiki says "# cd /pentest/svn/framework3/external/pcaprub", but that's incorrect for BT5)

    # cd /pentest/exploits/framework3/external/pcaprub
    # ruby extconf.rb
    # make && make install

    Hope this helps!

  2. #2
    Member DigiP's Avatar
    Join Date
    Jan 2010
    Location
    NJ
    Posts
    57

    Default Re: Metasploit pcaprub fix in BT5

    Just tried this today and didn't work for me but I'm using the KDE x64 bit version of BT5. Not sure if that is an issue at this time and only works in 32bit versions. Will put in a bug report if I can't find any other solutions.

  3. #3
    Just burned his ISO DementiaPraecox's Avatar
    Join Date
    Feb 2011
    Posts
    9

    Default Re: Metasploit pcaprub fix in BT5

    You should try update msf but not by Package Manager but rather by msfupdate located in "Linux menu start" so to speak and then

    # cd opt/framework3/msf3/external/pcaprub
    # ruby extconf.rb && make && make install

    I know that both paths point to the same location but trying with /pentest/exploits/... I just couldn't get it to work. Got errors again ang again.

    After that open msfconsole with Befepgs's technique(http://www.backtrack-linux.org/forum...e-problem.html at the bottom):

    # ruby /pentest/exploits/framework3/msfconsole

    althoug I found this ineffective in my case so I tried:

    # ruby /opt/framework3/msf3/msfconsole

    Again these are pointing to the same directory, but with /pentest/... I tried so many times and nothing and with /opt/... just worked after first try and I tried to scan my network with 'ipidseq' and evertyting works great from now on. And I didn't downloaded any packages on my own. Everything provided by BT.

    I think that this could be the method of setting pcaprub up and running msf varies on type of machine you have (not just x86/x64) and hardware that's inside, maybe how it's configured by BT during installation. It seems stupid but everyone has the same copy and most people do the same thing: install, reboot, update everything with package manager and start msf to check with one of the scanners if pcaprub is installed. And look how many possibilites there are to get around this problem and how many people found their own ways to set up everything. Of course there are lucky who have no problems with their computers and BT5.
    But now I'm just thinkin' out loud.

  4. #4
    Good friend of the forums scottm99's Avatar
    Join Date
    Feb 2010
    Location
    underwater
    Posts
    371

    Default Re: Metasploit pcaprub fix in BT5

    Have you tried opening a terminal window & running msfconsole straight from the Metasploit directory? You may find the pcaprub extensions work properly then (they did for me).

  5. #5
    Just burned his ISO
    Join Date
    Jun 2011
    Posts
    1

    Default Re: Metasploit pcaprub fix in BT5

    Hi,
    If anyone is still having problems with this (I couldn't find any answers in this or in any other thread) - even after doing the famous
    Code:
    cd /pentest/exploits/framework3/external/pcaprub
    ruby extconf.rb && make && make install
    For me, after doing this, msfconsole still would not load this library, and when i tried
    Code:
    gem install pcaprub
    I got a symbol load error - which I was getting nowhere with...

    Simple solution, when you run msfconsole - it actually runs a few scripts and then loads the console, one of them sets up the environment (/opt/framework3/scripts/setenv.sh).
    so simple - after making and installing (which gives you a pcaprub.so file) you just add the path to it to the setenv.sh script to the RUBYLIB path.

    so the whole thing is:
    Code:
    cd /pentest/exploits/framework3/external/pcaprub
    ruby extconf.rb && make && make install
    then:
    Code:
    gedit /opt/framework3/scripts/setenv.sh &
    go down to where it says:
    Code:
    ##### RUBY ENV #####
    # Don't override GEM_PATH so users can install gems for the system ruby and
    # they at least have a chance of working with ours
    GEM_HOME="/opt/framework3/ruby/lib/ruby/gems/1.9.1"
    RUBY_HOME="/opt/framework3/ruby"
    RUBYLIB="..."
    there will be a LOT of paths in RUBYLIB, separated by ":" just add ":/opt/framework3/msf3/external/pcaprub" to the end, close it, restart the console - and it should work fine. I tried it on both the gnome 32 and 64 bit releases of backtrack5.

  6. #6
    Just burned his ISO
    Join Date
    Jun 2011
    Posts
    5

    Default Re: Metasploit pcaprub fix in BT5

    Quote Originally Posted by DementiaPraecox View Post
    You should try update msf but not by Package Manager but rather by msfupdate located in "Linux menu start" so to speak and then

    # cd opt/framework3/msf3/external/pcaprub
    # ruby extconf.rb && make && make install

    I know that both paths point to the same location but trying with /pentest/exploits/... I just couldn't get it to work. Got errors again ang again.

    After that open msfconsole with Befepgs's technique(http://www.backtrack-linux.org/forum...e-problem.html at the bottom):

    # ruby /pentest/exploits/framework3/msfconsole

    althoug I found this ineffective in my case so I tried:

    # ruby /opt/framework3/msf3/msfconsole

    Again these are pointing to the same directory, but with /pentest/... I tried so many times and nothing and with /opt/... just worked after first try and I tried to scan my network with 'ipidseq' and evertyting works great from now on. And I didn't downloaded any packages on my own. Everything provided by BT.

    I think that this could be the method of setting pcaprub up and running msf varies on type of machine you have (not just x86/x64) and hardware that's inside, maybe how it's configured by BT during installation. It seems stupid but everyone has the same copy and most people do the same thing: install, reboot, update everything with package manager and start msf to check with one of the scanners if pcaprub is installed. And look how many possibilites there are to get around this problem and how many people found their own ways to set up everything. Of course there are lucky who have no problems with their computers and BT5.
    But now I'm just thinkin' out loud.
    Same for me here, the only way to make pcaprub work with msf on my backtrack kde 32bit is using the method mentioned by DementiaPraecox above. Thanks for the post

  7. #7
    Just burned his ISO
    Join Date
    Apr 2011
    Posts
    5

    Default Re: Metasploit pcaprub fix in BT5

    Quote Originally Posted by DementiaPraecox View Post
    You should try update msf but not by Package Manager but rather by msfupdate located in "Linux menu start" so to speak and then

    # cd opt/framework3/msf3/external/pcaprub
    # ruby extconf.rb && make && make install

    I know that both paths point to the same location but trying with /pentest/exploits/... I just couldn't get it to work. Got errors again ang again.

    After that open msfconsole with Befepgs's technique(http://www.backtrack-linux.org/forum...e-problem.html at the bottom):

    # ruby /pentest/exploits/framework3/msfconsole

    althoug I found this ineffective in my case so I tried:

    # ruby /opt/framework3/msf3/msfconsole

    Again these are pointing to the same directory, but with /pentest/... I tried so many times and nothing and with /opt/... just worked after first try and I tried to scan my network with 'ipidseq' and evertyting works great from now on. And I didn't downloaded any packages on my own. Everything provided by BT.

    I think that this could be the method of setting pcaprub up and running msf varies on type of machine you have (not just x86/x64) and hardware that's inside, maybe how it's configured by BT during installation. It seems stupid but everyone has the same copy and most people do the same thing: install, reboot, update everything with package manager and start msf to check with one of the scanners if pcaprub is installed. And look how many possibilites there are to get around this problem and how many people found their own ways to set up everything. Of course there are lucky who have no problems with their computers and BT5.
    But now I'm just thinkin' out loud.
    this has been driving me nuts, thanks for the fix !

Similar Threads

  1. Replies: 1
    Last Post: 05-07-2011, 01:35 PM
  2. Replies: 17
    Last Post: 04-07-2011, 10:00 PM
  3. [Howto] [Metasploit] Introducao ao Metasploit - Parte 01
    By espreto in forum Tutoriais e Howtos
    Replies: 16
    Last Post: 10-13-2010, 04:21 PM
  4. Replies: 1
    Last Post: 04-18-2010, 06:37 PM
  5. metasploit o non metasploit, questo è il problema!
    By eqweo in forum Discussioni Generali
    Replies: 2
    Last Post: 01-14-2010, 12:16 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •