Default Ports: 1521 (TNS Listener), 1630 (iSQL*Net)
Oracle is the enterprise database you’ll mostly run into in large corporations and government environments, usually holding exactly the kind of sensitive data that makes it worth the extra effort. It’s also considerably more involved to attack than MySQL or MSSQL: connecting requires knowing a SID (System Identifier) up front, not just a hostname, and that extra layer is itself worth enumerating before anything else.
TNS Listener
The gateway every connection passes through first. It needs the right SID before the actual database login even happens, which makes SID discovery a required step, not an optional one.
Database Session
Once connected with a valid SID and credentials, Oracle’s own PL/SQL and Java execution features open up command execution, file access, and SSRF directly from SQL.
Connecting
odat all runs sidguessing, default credential testing, and a broad privilege/vulnerability check against the target in one pass, the single most useful first command against an unknown Oracle target.
Recon and SID Enumeration
Unlike MySQL or MSSQL, Oracle requires a valid SID before you can even attempt a login, which makes guessing it a required enumeration step rather than an optional one.Common default SIDs worth trying even without a wordlist:
ORCL, XE, XEXDB, PROD, DEV, TEST.Default and Weak Credentials
Oracle installs frequently retain well-known default accounts, worth testing before any brute-force attempt.Brute Forcing
Manual Enumeration
Table, schema, and privilege enumeration
Table, schema, and privilege enumeration
File Upload and Read/Write
UTL_FILE, without needing ODAT:
Command Execution via Java
Oracle can compile and run Java code directly inside the database, which, combined with a PL/SQL wrapper, gives arbitrary command execution.1
Grant the necessary Java permissions
2
Create a Java class that runs OS commands
3
Wrap it in a callable PL/SQL function
4
Execute commands
Network Operations (SSRF and Exfiltration)
Oracle’sUTL_* packages make outbound network requests directly from SQL, useful for SSRF against internal services or simple data exfiltration when direct file access isn’t available.
Password Hash Extraction and Cracking
Privilege Escalation and Persistence
Useful PL/SQL Packages
| Package | Capability |
|---|---|
DBMS_JAVA | Java execution, the basis for OS command execution |
UTL_FILE | Read and write files on the server |
UTL_HTTP | Outbound HTTP requests, useful for SSRF |
UTL_TCP | Raw TCP connections, usable for port scanning |
UTL_INADDR | DNS resolution, useful for blind exfiltration |
UTL_MAIL | Send email directly from the database |
DBMS_SCHEDULER | Schedule jobs, a persistence mechanism |
Quick Reference Tools
Hackviser: Oracle
Quick-reference pentesting guide for Oracle Database.
HackTricks: Oracle Listener
Deeper breakdown of TNS Listener enumeration and exploitation.
ODAT
Oracle Database Attacking Tool, automates most of the techniques on this page.
Oracle SQL*Plus Reference
Official command reference for SQL*Plus.

