Using NMAP To Find The Ports For Oracle Apps, OBIEE, Listener

Not finding a port with netstat? Nmap finds what netstat does not. Nmap can also point out your servers’ vulnerabilities.

On my server, there are a number of applications that work via a browser. Each with an associated port.

Usually, I’ll use netstat to find the port.
netstat -a | grep 9704

You can also find the unix process that is using the port by adding the flag, -al.
netstat -al | grep -i 9704

tcp 0 0 *:* LISTEN oracle 162677
tcp 0 0 fe80::200:ff:fe00:0:9704 *:* LISTEN oracle 162676
tcp 0 0 ::ffff: *:* LISTEN oracle 162675
tcp 0 0 localhost.localdomain:9704 *:* LISTEN oracle 162674
tcp 0 0 localhost6.localdomain:9704 *:* LISTEN oracle 162673
tcp 0 0 fe80::223:54ff:fe73:5f:9704 *:* LISTEN oracle 162672

However, netstat doesn’t find a number of processes or ports. Such as these important ports and applications:
1521 – Oracle listener
1158 – enterprise manager
7003 – Oracle Weblogic/OBIEE admin
8000 – Oracle Applications

I always found this really aggravating. I knew the port was in use. Why didn’t netstat find it? Then recently, I discovered that nmap will find the ports that netstat does not.

nmap -v

Starting Nmap 4.11 ( ) at 2012-01-18 15:51 CST
Initiating Connect() Scan against ( [1680 ports] at 15:51
Discovered open port 22/tcp on
Discovered open port 6000/tcp on
Discovered open port 929/tcp on
Discovered open port 5520/tcp on
Discovered open port 8000/tcp on
Discovered open port 7003/tcp on
Discovered open port 12345/tcp on
Discovered open port 1521/tcp on
Discovered open port 1158/tcp on
Discovered open port 111/tcp on
The Connect() Scan took 0.04s to scan 1680 total ports.
Host ( appears to be up … good.
Interesting ports on (
Not shown: 1670 closed ports
22/tcp open ssh
111/tcp open rpcbind
929/tcp open unknown
1158/tcp open lsnr
1521/tcp open oracle
5520/tcp open sdlog
6000/tcp open X11
7003/tcp open afs3-vlserver
8000/tcp open http-alt
12345/tcp open NetBus

There the ports are! Very cool!

So, if you can’t figure out what port your application was supposed to use, if you know that the processes are running, you can probe the ports with nmap. If you change some ports, you can check to see if they show up with nmap.


Lots Of Options:

Nmap comes with many options. nmap –help returns 88 lines! You can do many kinds of searches. And get lots of detailed, and different information back.

There is also a GUI version for Linux: nmapfe. For nmap front end.

NmapFE v4.11 Nmap Front End

NmapFE v4.11 Nmap Front End

There is a GUI version for Windows too. This one is actually called Zenmap. It is a GUI front end to an nmap backend.

Zenmap for Windows

Zenmap for Windows

The interfaces, while similar, are rather different. Even the predetermined scans are different.

The nice thing about these GUIs is that they have a number of predetermined scans. Just pick the type, and click the button.


Protect Your Machines!

The scary thing is, you can also scan all the ports of a remote computer. I scanned the ports of my windows machine. While the machine was being probed, I noticed in Task Manager that the network activity of the Windows machine went up to 200 to 300K per second.


You can even scan machines on the web. Here, I scan

nmap -v

Starting Nmap 4.11 ( ) at 2012-01-21 01:47 CST
Warning: Hostname resolves to 4 IPs. Using
Machine MIGHT actually be listening on probe port 80
DNS resolution of 1 IPs took 0.13s.
Initiating Connect() Scan against ( [1680 ports] at 01:47
Discovered open port 80/tcp on
Discovered open port 443/tcp on
The Connect() Scan took 48.01s to scan 1680 total ports.
Host ( appears to be up … good.
Interesting ports on (
Not shown: 1678 filtered ports
80/tcp open http
443/tcp open https

I’ve read that much of the hacking that goes on in the world, uses nmap.  So you can also use nmap to check your vulnerabilities, and either be aware of them, or close them.

It’s scary what you can do with nmap. Or what the nasty people can do to you via the web! Use your protection!


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: