Oracle TNS (1521)

Oracle-Tools-setup.sh

Oracle-Tools-setup.sh
#!/bin/bash

sudo apt-get install libaio1 python3-dev alien python3-pip -y
git clone https://github.com/quentinhardy/odat.git
cd odat/
git submodule init
sudo submodule update
sudo apt install oracle-instantclient-basic oracle-instantclient-devel oracle-instantclient-sqlplus -y
pip3 install cx_Oracle
sudo apt-get install python3-scapy -y
sudo pip3 install colorlog termcolor pycrypto passlib python-libnmap
sudo pip3 install argcomplete && sudo activate-global-python-argcomplete

Testing ODAT (Oracle Database Attacking Tool)

./odat.py -h

Footprinting using NMAP

sudo nmap -p1521 -sV 10.129.204.235 --open

SID (System Identifier)

  • unique name that identifies a particular database instance

  • essential part of the connection process, as it identifies the specific instance of the database the client wants to connect to

  • If the client specifies an incorrect SID, the connection attempt will fail.

Bruteforcing SID using NMAP

ODAT (run all modules i.e. brute sid and user/pass)

Logging in using SQLPlus

Logging in using SQLPlus as sysdba (if user has appropriate privs)

If SQLPlus shows error about libsqlplus.so

Oracle RDBMS Commands

Oracle RDBMS Extracting Password Hashes

Oracle RDBMS file upload (INTO OUTFILE)

  • /var/www/html for linux

  • C:\inetpub\wwwroot for windows

  • Try this only if there is a webserver

Last updated