Metasploit - Failed to load the OCI library: no such file to load -- oci8
来源:互联网 发布:软件系统设计文档 编辑:程序博客网 时间:2024/05/29 13:03
Today, when I use oracle sql module (use auxiliary/admin/oracle/oracle_sql), metasplot console shows me “Failed to load the OCI library: no such file to load – oci8”.
Introduction
This page explains the way to install ruby-oci8 for Oracle Instant Client.
For Oracle Full Client, look at install-full-client. For Windows, look at install-binary-package unless you have a special need to compile ruby-oci8 by yourself.
Install Oracle Instant Client Packages
Donwload Instant Client Packages
Download the following packages from Oracle Technology Network.
- Instant Client Package - Basic or Basic Lite
- Instant Client Package - SDK
- Instant Client Package - SQL*Plus
Note: use 32-bit packages for 32-bit ruby even though the OS is 64-bit.
UNIX zip packages
Unzip the packages as follows:
mkdir /optmkdir /opt/oraclecd /opt/oracleunzip path/to/instantclient-basic-OS-VERSION.zipunzip path/to/instantclient-sdk-OS-VERSION.zipunzip path/to/instantclient-sqlplus-OS-VERSION.zip
If /opt/oracle/instantclient12_1/libclntsh.so is not found, make a symbolic link to link the library.
cd /opt/oracle/instantclient12_1ln -s libclntsh.so.12.1 libclntsh.so
For example:
$ LD_LIBRARY_PATH=/opt/oracle/instantclient_12_1$ export LD_LIBRARY_PATH
Installation
If you get a problem in the following steps, look at platform-specific-issues and report-installation-issue.
gem package
Run the following command.
gem install ruby-oci8
If you get a problem, look at platform-specific-issues and report-installation-issue.
tar.gz package
Download the latest tar.gz package from download page.
gzip -dc ruby-oci8-VERSION.tar.gz | tar xvf -cd ruby-oci8-VERSIONmakemake install
Metasploit - Exploit Oracle Database
Now, we can connect target oracle database with Metasploit.
msf auxiliary(oracle_sql) > show options Module options (auxiliary/admin/oracle/oracle_sql):Name Current Setting Required Description---- --------------- -------- -----------DBPASS TIGER yes The password to authenticate with.DBUSER SCOTT yes The username to authenticate with.RHOST yes The Oracle host.RPORT 1521 yes The TNS port.SID ORCL yes The sid to authenticate with.SQL select * from v$version no The SQL to execute.msf auxiliary(oracle_sql) > set RHOST 8.8.8.8RHOST => 8.8.8.8msf auxiliary(oracle_sql) > run[*] Sending statement: 'select * from v$version'...[-] ORA-12170: TNS:Connect timeout occurred[*] Auxiliary module execution completed
- http://www.rubydoc.info/gems/ruby-oci8/file/docs/install-instant-client.md
- http://leonjza.github.io/blog/2014/08/17/kali-linux-oracle-support/
- Metasploit - Failed to load the OCI library: no such file to load -- oci8
- Metasploit攻击Oracle的环境搭建(Failed to load the OCI library: no such file to load -- oci8)
- : "no such file to load -- sqlite3" Rails
- no such file to load -- readline
- no such file to load -- zlib
- no such file to load -- readline
- Failed to issue method call: Unit ssh.service failed to load: No such file or directory.
- Failed to restart network.service: Unit network.service failed to load: No such file or directory.
- Failed to restart network.service: Unit network.service failed to load: No such file or directory.
- Failed to issue method call: Unitmysql.service failed to load: No such file or directory.
- failed to load the jni shared library
- failed to load the jni shared library
- Failed to load the JNI shared library
- Failed to load the JNI shared library
- Failed to load the JNIshared library
- Failed to load the JNI shared library
- Failed to load the JNI shared library
- Failed to load the JNI shared library
- PDB文件:每个开发人员都必须知道的
- sql 谓词
- 什么是B2B,B2C,O2O?
- String对象的创建过程中的内存分配
- Android:高仿QQ头像截取
- Metasploit - Failed to load the OCI library: no such file to load -- oci8
- nginx安装
- poj 2201 笛卡尔树
- 设计模式之观察者模式
- linux IPC 之管道
- .net 笔记
- html5 获取你的位置信息
- 设计模式实践三-单一职责原则
- 方案制定的两难