Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Instant Oracle SQLPLus SDK +oci8
########### Build to attack Oracle in under 20 mins ###########
[] Kali 2018.1 (64bit)
root@kali:~# mkdir /opt/oracle
root@kali:~# cd /opt/oracle
root@kali:/opt/oracle# wget instantclient-basic-linux.x64-12.2.0.1.0.zip (68mb)
root@kali:/opt/oracle# wget instantclient-sqlplus-linux.x64-12.2.0.1.0.zip (1mb)
root@kali:/opt/oracle# wget instantclient-sdk-linux.x64-12.2.0.1.0.zip (1mb)
[] Download from http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html (x86_64) xce/orc
root@kali:/opt/oracle# unzip ./instantclient-basic-linux.x64-12.2.0.1.0.zip
root@kali:/opt/oracle# unzip ./instantclient-sqlplus-linux.x64-12.2.0.1.0.zip
root@kali:/opt/oracle# unzip ./instantclient-sdk-linux.x64-12.2.0.1.0.zip
root@kali:/opt/oracle# cd instantclient_12_2
root@kali:/opt/oracle/instantclient_12_2# ln libclntsh.so.12.1 libclntsh.so
root@kali:/opt/oracle/instantclient_12_2# export PATH=$PATH:/opt/oracle/instantclient_12_2
root@kali:/opt/oracle/instantclient_12_2# export SQLPATH=/opt/oracle/instantclient_12_2
root@kali:/opt/oracle/instantclient_12_2# export TNS_ADMIN=/opt/oracle/instantclient_12_2
root@kali:/opt/oracle/instantclient_12_2# export LD_LIBRARY_PATH=/opt/oracle/instantclient_12_2
root@kali:/opt/oracle/instantclient_12_2# export ORACLE_HOME=/opt/oracle/instantclient_12_2
root@kali:/opt/oracle/instantclient_12_2# apt-get install libaio1
root@kali:/opt/oracle/instantclient_12_2# LD_LIBRARY_PATH=/opt/oracle/instantclient_12_2
root@kali:/opt/oracle/instantclient_12_2# export LD_LIBRARY_PATH
root@kali:/opt/oracle/instantclient_12_2# apt-get install libgmp-dev
root@kali:/opt/oracle/instantclient_12_2# wget https://github.com/kubo/ruby-oci8/archive/ruby-oci8-2.1.8.zip
root@kali:/opt/oracle/instantclient_12_2# unzip ruby-oci8-2.1.8.zip
root@kali:/opt/oracle/instantclient_12_2# cd ruby-oci8-ruby-oci8-2.1.8
root@kali:./ruby-oci8-ruby-oci8-2.1.8# export PATH=/opt/metasploit/ruby/bin:$PATH
root@kali:./ruby-oci8-ruby-oci8-2.1.8# make
root@kali:./ruby-oci8-ruby-oci8-2.1.8# make install
root@kali:./ruby-oci8-ruby-oci8-2.1.8# apt-get install python-scapy
root@kali:./ruby-oci8-ruby-oci8-2.1.8# apt-get install python-pip
root@kali:./ruby-oci8-ruby-oci8-2.1.8# pip install colorlog termcolor pycrypto passlib
root@kali:./ruby-oci8-ruby-oci8-2.1.8# pip install argcomplete && activate-global-python-argcomplete
########### SQLplus Test ###########
root@kali:/opt/oracle/instantclient_12_2# sqlplus
SQL*Plus: Release 12.2.0.1.0 Production on Fri Apr 13 20:52:56 2018
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Enter user-name: ^C
#done#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.