HTB Academy - FOOTPRINTING - Oracle TNS

Dm me bro! I just turned notifications on. So ill be quick to reply this time…

HI,
Do you have this error ?

┌──(kali㉿kali)-[~/odat]
└─$ sudo apt install oracle-instantclient-basic oracle-instantclient-devel oracle-instantclient-sqlplus -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package oracle-instantclient-basic
E: Unable to locate package oracle-instantclient-devel
E: Unable to locate package oracle-instantclient-sqlplus
2 Likes

Yes, I’m running into the same issue. Were you able to find a solution?

Having same issue, need help solving this.

E: Unable to locate package oracle-instantclient-devel
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
E: Unable to locate package oracle-instantclient-sqlplus

1 Like

Read the last post. I was able to get it working by manually downloading the .deb packages and running dpkg -i

I had to follow this guide to install sqlplus successfully.

p.s. I tried DBeaver, but I had to update the software and drivers and still didn’t get the answer. sqlplus seemed easier imo.

Edit: I got DBeaver to work eventually. Updated to version 23.3.0, updated drivers when prompted, and the main thing is you MUST enable “Show system objects” to see Schemas>SYS>USERS$ (you can set the connection view to Advanced and this should auto enable it)

This module is so hard but I don’t know through will and determination for the past few 3 days, I finally got it.

Here’s some clues: don’t execute the bash file as they recommend.

  • copy each line code one by one and see where there are errors.
  • there are two ways to download the Oracle instant client. a zip or an rpm which u then later convert to a deb. I did the zip route.
  • running odat.py is not neccesarily in root. check where the file is from. Use pwnbox. give it time. mine took at least 13 mins to reveal the username and password.
  • follow @woadey link on how to install sqlplus and do the step line by line.

There might be some overlap over here and there, but most importantly is you get the job done.

I was able to list the salted hash for the user, but I’m told that my answer is incorrect.

I created a script to install SQLPLUS correctly

wget https://download.oracle.com/otn_software/linux/instantclient/214000/instantclient-basic-linux.x64-21.4.0.0.0dbru.zip && wget https://download.oracle.com/otn_software/linux/instantclient/214000/instantclient-sqlplus-linux.x64-21.4.0.0.0dbru.zip && sudo mkdir -p /opt/oracle && sudo unzip -d /opt/oracle instantclient-basic-linux.x64-21.4.0.0.0dbru.zip && sudo unzip -d /opt/oracle instantclient-sqlplus-linux.x64-21.4.0.0.0dbru.zip && cd /opt/oracle/instantclient_21_4 && find . -type f | sort && export LD_LIBRARY_PATH=/opt/oracle/instantclient_21_4:$LD_LIBRARY_PATH && export PATH=$LD_LIBRARY_PATH:$PATH && source ~/.bashrc && sqlplus -V

It was based on How to Install SQLplus on Linux? - GeeksforGeeks

1 Like

Hi All, I was stock for several hours trying to get odat.py work on my kali. Finally I got google it and found this link odat | Kali Linux Tools
It was straight forward. command is : sudo apt install odat and worked like a charm. From there all commands in the lesson worked for me to get the hash.

1 Like

This worked perfectly. Cheers mate!

Hi . How did gor the hash of DBSNMP?? I used several commands but it didnt worked. Please help me.



Instead of installing the components one by one, you can install odat and sqlplus from the apt repository. This cuts down a lot of the steps and hassle.

  1. Install the packages ==
    sudo apt install odat
    sudo apt install oracle-instantclient-sqlplus

  2. Get the version number of your sqlplus. ==
    You can do find / -name sqlplus 2>/dev/null. The result we need will look like “/usr/lib/oracle/19.6/client64/bin/sqlplus”. Copy the version number, 19.6 in this case, for the next step.

  3. Replace the curly brackets with your version number and enter this command
    sudo sh -c “echo /usr/lib/oracle/{VERSION #}/client64/lib > /etc/ld.so.conf.d/oracle-instantclient.conf”;sudo ldconfig
    (Credits)

  4. Technical Tips:

  • You need to use sudo for odat or it’ll break the passwordguesser module. (I got a permission error).
  • The --output-file function for odat is broken when installed this way I think. IIRC it worked when I used the standalone package, but that had its own quirks and was way slower imo.
  • Use --force-retry with odat to avoid the annoying prompts when the program retries guessing the passwords.

Then everything should be working. If things are slow when scanning, honestly just reset the target VM and or reboot your local VM and reset the VPN connection. I did the chapter on my local VM.

Wel it takes some ■■■■ amount of time even after changing to TCP . :kissing:
TIP - You can do next 2 module after entering the command.

Hello, I’m at Footprinting Module, Oracle TNS

I’m trying to do Oracle-Tools-setup.sh, but every time I do Testing ODAT “./odat.py -h” I get this error

I tried to do it at HTB web, command not found “I already created the bash file”

لقطة شاشة 2024-04-29 105657

Does anyone know how to solve this problem?

i can’t see the result of script sid brute