943,960 Members | Top Members by Rank

Ad:
Dec 15th, 2008
0

use netcat to find process for udp port

Expand Post »
Hi,

I noticed that on my solaris 8 server, netstat revealed some UDP ports are open that have no corresponding processes and are listed as "reserved" on IANA. When I reboot the server they go off but later after the server is up they are on. I do not see the ports in any startup scripts, they are not in /etc/inetd.conf, so I was wondering if I could use netcat in some way to try and find a process that might light-up if I send something to the port. I have tried to use "nemesis" to send packets to the port but I don't see anything.

Any suggestions would be helpful.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
csross is offline Offline
4 posts
since Dec 2008
Dec 28th, 2008
0

Re: use netcat to find process for udp port

Well, since UDP is connectionless, you are going to have a heck of a time with traditional tools like that. My personal suggestion, is get wireshark, and set the filters to only deal with UDP, and only deal with the ports in question. Then run wireshark, and keep an eye on it.... when data is either sent to or received from the port, wireshark will show it to you, and I believe pretty much in all the layers of the OSI model (at least up to session and down to data-link). At the very least, this can help you see what information is being transmitted on these ports... which should help narrow down WHAT exactly you are dealing with.
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Dec 29th, 2008
0

Re: use netcat to find process for udp port

Thank you for the information. I noticed when I rebooted one of the servers that has a number of the strange ports listed, the ports went off. Then sometime before the next morning when I checked again, they were on.

Can I leave wireshark on and have it post to a log that I can check from time to time to see if the ports are on and what turned it on? Is it very resource intensive becuase the server with alot of the ports on is a production server.

Thank you very much.

Christine
Reputation Points: 10
Solved Threads: 0
Newbie Poster
csross is offline Offline
4 posts
since Dec 2008
Dec 29th, 2008
0

Re: use netcat to find process for udp port

Yes, Yes you can. However, wireshark may use a lot of hard-drive space if you leave it running for a long time (and there is a lot of activity on those ports). See, each time a packet is sent or received wireshark records it... if you set filters, then you can tell it to only record say, UDP traffic, or specific port numbers, or only specific port numbers with UDP traffic, etc. So, you run the program, take the port numbers in question, and tell wireshark to filter out everything except UDP traffic on those specific ports. Then, whenever UDP data is sent or received on those ports.... wireshark will record it. So if these ports send data, say, every three minutes... and you go home, when you come back 8 hours later, you are probably going to have quite a large log file or memory consumption.... if it only sends data once an hour, then you won't have much used at all.
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Dec 29th, 2008
0

Re: use netcat to find process for udp port

Thank you. I did some research and see it is/was ethereal. I have used that. I have tried to use lsof to see if it revealed anything but I don't get any output. ONe server has only one of the ports in a "bound" tcp state, so I would think lsof would produce something, but it doesn't.

Thank you for your help.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
csross is offline Offline
4 posts
since Dec 2008
Dec 29th, 2008
0

Re: use netcat to find process for udp port

I would really like to see what turned those on? I don't have alot of services running and I've stopped alot of the rc2 startup scripts that I don't need.

I was hoping if I sent enough packets to the ports that maybe the top command might reveal something.

Any suggestions that way?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
csross is offline Offline
4 posts
since Dec 2008
Dec 29th, 2008
0

Re: use netcat to find process for udp port

Well first, since this seems to be a timed thing... check cron. See what cron is up to. If that isn't much help, you could consider crufting up a quick script or app that uses sockets and binds to the given port numbers... then the program that is trying to connect to (ie open the ports) will crap on itself (Address already in use) and might help you to catch the output.... other than sniffing the packets, to catch the destination address, you're hands are pretty much tied.
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Linux Applications and Software Forum Timeline: Packaging software
Next Thread in Linux Applications and Software Forum Timeline: OpenVPN how disable CSR?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC