CyberHunter
Local dataset, no network
// Databases & caches

Port 1521: Oracle Database

Oracle Database TNS listener (IANA lists ncube-lm, but 1521 is Oracle's default).

Oracle TNS Listener
1521

How Oracle Database works

Databases & caches
app:1521SELECTTLS only if enabled app:1521SELECTTLS only if enabled

The application sends a SQL query to the Oracle Database server on port 1521, which returns rows from its tables. Encryption is optional: traffic is only protected if TLS is enabled on the server and the client.

Transport
TCP · UDP
Exposure risk
8/10 high if reachable from the Internet
Encryption
Optional TLSTLS only if negotiated
IANA status
Assignedcommon use differs from the registry
Range
Registered (1024-49151)
01 Security

Is port 1521 dangerous?

Common attacks and weaknesses

  • SID enumeration and brute force.
  • TNS poisoning on old versions.
  • Default accounts (scott/tiger).

How to secure it

  • Restrict to application servers.
  • Enable native network encryption or TLS.
  • Lock default accounts.

Unofficial use. The IANA assignment below differs from what is usually found on this port in practice.

02 Registry

IANA registry entries for port 1521

ServicePortTransportDescriptionReferenceUpdated
ncube-lm 1521 TCP, UDP nCube License Manager
Reported: Unauthorized Use Known on port 1521
- 2022-02-14

// source: IANA service name and port number registry

03 Check it

Which program uses port 1521, and is it reachable?

Linux

sudo ss -ltnup 'sport = :1521'      # process listening on 1521
sudo lsof -nP -i :1521

macOS

sudo lsof -nP -i :1521

Windows (PowerShell)

Get-NetTCPConnection -LocalPort 1521 -State Listen | Select LocalAddress, OwningProcess
Get-NetUDPEndpoint -LocalPort 1521
netstat -ano | findstr :1521

From another machine

nmap -p 1521 -sV <host>
sudo nmap -sU -p 1521 <host>
nc -zv <host> 1521

Block it in the firewall

sudo ufw deny 1521/tcp                                         # Linux (ufw)
New-NetFirewallRule -DisplayName "Block 1521" -Direction Inbound -LocalPort 1521 -Protocol TCP -Action Block  # Windows
04 FAQ
What is port 1521 used for?

Oracle Database TNS listener (IANA lists ncube-lm, but 1521 is Oracle's default).

Is port 1521 TCP or UDP?

Port 1521 is registered for TCP and UDP. In practice the service mostly uses TCP.

Is it safe to open port 1521?

It is rated 8/10 (high) when exposed to the Internet. SID enumeration and brute force. Restrict to application servers.

How do I check if port 1521 is open?

On Linux run "ss -ltnup 'sport = :1521'", on macOS "lsof -nP -i :1521", and on Windows "netstat -ano | findstr :1521" to see the local process. From another machine, "nmap -p 1521 <host>" shows whether it is reachable.

05 Related

Latest vulnerability news

All news