Hacking the world’s most popular database
Based on NetworkChuck's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.
Oracle 23c can be deployed quickly for learning by running an Oracle Container Registry image in Docker and exposing the listener port 1521.
Briefing
Oracle Database 23c is presented as both a practical platform to build and a realistic target for ethical penetration testing—using Docker to stand up a local instance, then walking through Oracle’s distinctive architecture (CDB/PDB) before demonstrating how attackers enumerate and guess credentials.
The walkthrough starts by positioning Oracle SQL as “different” from MySQL, especially in how it organizes data and administration. A local Oracle 23c environment is deployed in minutes by installing Docker and running an Oracle 23c free container image with the listener port 1521 exposed. Inside the container, command-line access uses SQL Plus, logging in as the SYSDBA account (the system database administrator) to interact with Oracle’s internal structure.
From there, the core architectural concept is the multitenant model: a Container Database (CDB) root that hosts one or more Pluggable Databases (PDBs). The session shows how Oracle treats each PDB like an isolated “mini-database” with its own namespaces, users, tablespaces, and schemas. The tutorial then creates a new PDB named “matrix,” defines an admin user “Neo” inside it, and opens the PDB so it can be used. A key operational detail follows: users created in a PDB don’t automatically appear in the root container’s user list, and permissions must be granted within the correct container context.
To make Neo functional, the process grants Neo the privileges needed to operate: CREATE SESSION, CREATE TABLE, and UNLIMITED TABLESPACE. The workflow then switches into Neo’s SQL Plus session within the “matrix” PDB and creates a table (“Red Pill db”) with columns for id, name, real name, role, and ability. Data insertion, COMMIT, querying, and deletion mirror common SQL patterns, but the Oracle-specific naming and metadata queries differ—especially when listing tables via USER_TABLES and filtering by the owning user.
A major 23c feature is then introduced: JSON Relational Duality Views. Instead of treating JSON as a separate, awkward format, the example builds relational tables that store JSON-like key/value structures and then creates a duality view that behaves like JSON for application developers. The demonstration emphasizes bidirectional behavior: selecting from the duality view returns JSON-shaped documents, updates to underlying tables automatically reflect in the view, and inserting a pure JSON document into the view updates the relational tables underneath. The result is a blurring of lines between traditional relational SQL and NoSQL-style document workflows.
Finally, the ethical hacking portion uses Odat (run inside Docker) to enumerate and attack an Oracle instance. The approach checks for a reachable TNS listener on port 1521, identifies the correct SID (noting that PDBs share the root SID), and then uses a SID guessing module plus a brute-force-style password guessing module. By adding the expected SID and credentials to the tool’s wordlists, the run succeeds in finding valid SYSDBA credentials (SYS and password), illustrating why attackers focus on system-level accounts and why secure configuration and secrecy of connection details matter. The segment closes by framing the exercise as a high-level but concrete map of how Oracle’s multitenant design and new JSON capabilities intersect with real-world security testing.
Cornell Notes
Oracle Database 23c is set up locally using Docker, then accessed via SQL Plus to demonstrate Oracle’s multitenant architecture. A Container Database (CDB) root hosts Pluggable Databases (PDBs); the tutorial creates a new PDB named “matrix,” creates a user “Neo” inside it, and grants privileges (CREATE SESSION, CREATE TABLE, UNLIMITED TABLESPACE) before switching into Neo’s session. It also highlights Oracle’s metadata model: tables belong to schemas tied to users, so listing tables uses USER_TABLES rather than MySQL-style SHOW TABLES. The session then showcases JSON Relational Duality Views, where JSON-shaped queries and inserts automatically stay synchronized with underlying relational tables. The ethical hacking segment uses Odat to enumerate the TNS listener, guess the SID, and brute-force credentials, succeeding when SID and password lists are provided.
Why does Oracle’s multitenant design (CDB/PDB) change how users and metadata appear?
What privileges does Neo need to create and use objects inside the PDB?
How do Oracle table listings differ from MySQL-style commands?
What does JSON Relational Duality Views change for developers?
How does Odat’s attack workflow map to Oracle’s network and identity layers?
Review Questions
- When switching between CDB root and a PDB, which commands or connection parameters ensure the session is in the correct container, and why does that matter for user visibility?
- How do schema ownership and USER_TABLES affect what a connected user can list and query in Oracle compared with MySQL’s SHOW TABLES approach?
- In JSON Relational Duality Views, what evidence shows that inserts/updates are synchronized between the JSON view and the underlying relational tables?
Key Points
- 1
Oracle 23c can be deployed quickly for learning by running an Oracle Container Registry image in Docker and exposing the listener port 1521.
- 2
Oracle’s multitenant architecture splits administration and metadata across a CDB root and one or more PDBs, so users and tables appear differently depending on the active container.
- 3
Creating a PDB requires opening it before use, and users created inside a PDB must be granted the right privileges within that PDB context.
- 4
Oracle object visibility is schema-driven; listing tables typically uses USER_TABLES (and DBA_TABLES for broader access), not MySQL-style SHOW TABLES.
- 5
JSON Relational Duality Views allow JSON-shaped querying and insertion while keeping relational tables underneath, with updates reflecting both directions.
- 6
Odat-based ethical testing follows a practical chain: confirm TNS listener reachability, determine the correct SID (root SID shared by PDBs), then attempt credential guessing using SID plus wordlists.
- 7
Successful credential guessing in the demo depends on providing the correct SID and candidate credentials; without that, enumeration and brute force become much harder.