Oracle Transparent Network Substrate (TNS) server is a communication protocol that facilitates communication between Oracle databases and applications over networks.TCP/1521 port.tnsnames.ora and listener.ora and are typically located in the $ORACLE_HOME/network/admin directory.tnsnames.ora file is used by Oracle databases to store connection details for different services. Each entry in the file includes a name for the service, the network location (address and port), and the database or service name. This helps clients easily connect to the correct database or service.Tnsnames.ora
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.129.11.102)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
Here we can see a service called ORCL, which is listening on port TCP/1521 on the IP address 10.129.11.102. Clients should use the service name orcl when connecting to the service.
Listener.ora
ID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PDB1)
(ORACLE_HOME = C:\\oracle\\product\\19.0.0\\dbhome_1)
(GLOBAL_DBNAME = PDB1)
(SID_DIRECTORY_LIST =
(SID_DIRECTORY =
(DIRECTORY_TYPE = TNS_ADMIN)
(DIRECTORY = C:\\oracle\\product\\19.0.0\\dbhome_1\\network\\admin)
)
)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = orcl.inlanefreight.htb)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = C:\\oracle
sudo nmap -p1521 -sV 10.10.10.10 --opensudo nmap -p1521 -sV 10.10.10.10 --open --script oracle-sid-brute - SID Bruteforcing./sqlplus dbsnmp/dbsnmp@10.129.231.147/XE