Oracle Pentesting requirements installation

Installation of tools (sqlplus) and needed libraries to use the oracle MSF modules

(This installation guide was created for version, change that name for the version that you download)

As root, create the directory /opt/oracle. Then download the Oracle Instant Client packages for your version of Kali Linux. The packages you will need are:




Unzip these under /opt/oracle, and you should now have a path called /opt/oracle/instantclient_12_1/. Next symlink the shared library that we need to access the library from oracle:

# ln
# ls -lh
lrwxrwxrwx 1 root root 17 Jun  1 15:41 ->
# ldconfig

You also need to configure the appropriate environment variables, add the following to either

  • ~/.bashrc

  • /etc/profile

export PATH=$PATH:/opt/oracle/instantclient_12_1
export SQLPATH=/opt/oracle/instantclient_12_1
export TNS_ADMIN=/opt/oracle/instantclient_12_1
export LD_LIBRARY_PATH=/opt/oracle/instantclient_12_1
export ORACLE_HOME=/opt/oracle/instantclient_12_1

Add Oracle libraries to ldconfig:

echo "/opt/oracle/instantclient_12_1/" >> /etc/

If you have succeeded, you should be able to run sqlplus from a command prompt (you may need to log out and log back in again):

sqlplus <username>/<password>@<ip_address>/<SID>;

Step Two — Install Ruby Gem ruby-oci8

These steps are needed to use metasploit oracle modules

Install other OS dependencies:

apt-get install libgmp-dev

Compile and install ruby-oci8 (root)

cd ruby-oci8-ruby-oci8-2.1.8/
make install
gem install ruby-oci8

Restart msfconsole (or restart the computer).

Last updated