Hack Whack and Smack

Enabling Oracle Support in Metasploit on Kali Linux

Enabling Oracle Support in Metasploit on Kali Linux

Hey Again, (Update for Kali Linux)

So the other week I was having major issues with my Oracle tools and could not get the latest version of Metasploit to fire exploits or auxiliarys at any Oracle service. I spent lots of time browsing the internet for forums and guides to install OCI8 for Metasploit.

After some time it became clear the issue is with Ruby built into the Metasploit Framework and does not co-inside with the native Ruby version. So when trying to install OCI8 for your native ruby version this does not work. With help from friends we found that if you install ruby version manager (RVM) it allows you to install OCI8 for the Metasploit version and works correctly. Here’s a quick guide to help you if you are experiencing the same issues I was.

#!/bin/bash
sudo su
cd /root/
[Obtain Oracle Instant Client v10.2]
mkdir -p /opt/oracle/
unzip instantclient_10_2.zip -d /opt/oracle/
echo “export PATH=$PATH:/opt/oracle/instantclient_10_2” >> /root/.bashrc
echo “export SQLPATH=/opt/oracle/instantclient_10_2” >> /root/.bashrc
echo “export TNS_ADMIN=/opt/oracle/instantclient_10_2” >> /root/.bashrc
echo “export LD_LIBRARY_PATH=/opt/oracle/instantclient_10_2” >> /root/.bashrc
echo “export ORACLE_HOME=/opt/oracle/instantclient_10_2” >> /root/.bashrc

Then run the following from the terminal
cd /opt/oracle/instantclient_10_2/
wget “http://www.hackwhackandsmack.com/ruby-oci8-2.0.3.tar.gz”
tar -zxvf ruby-oci8-2.0.3.tar.gz
cd ruby-oci8-2.0.3
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install

Testing it out
msfconsole
use use auxiliary/admin/oracle/oracle_login
set RHOST 127.0.0.1
run

Hope it works, if your having troubles feel free to email and I can try and help 🙂