5

How can I find out the list of all services running on my computer that might give access to hackers to log in to my computer?

One day I looked at my /var/log/auth.log from my computer and I discovered there had been several ssh login attempts and that ssh server was installed in my computer. But I couldn't remember me installing ssh server on this computer. I must have installed some package that depends on ssh package. Made me wonder what other services is running in this computer that I don't know of.

1
  • 2
    The ssh server shouldn't be a dependency of anything. Most distros install it by default though. Aug 29, 2009 at 21:25

5 Answers 5

3

The services need not be running at the time you do your check in order to present a security risk. I'd recommend using a port scanning tool like Nessus or nmap (from an outside machine) to see what ports are open. Then you can look in /etc/services and /etc/xinetd.d to figure out which services are associated with the open ports, and decide whether they can be turned off or blocked.

1
  • 1
    +1 best way is to nmap your machine and see what ports are open. Aug 29, 2009 at 21:25
8

netstat -lp will give you a list of running servers, along with their pid.

1
  • Note that you may want to run that with sudo netstat -lp or as root. Otherwise the process ID info may not be there.
    – keithosu
    Aug 30, 2009 at 3:28
0

socklist (if installed) - or a portscan from outside (with nmap)

0

netstat -lp is best way get info who got login to ur server or systemlink text

same good way to block all.

0

What distro?
You may be able to use a distro specific built in command to determine a bit more.

Exapmle on CentOS / Redhat: chkconfig --list | grep ":on"

will provide you with a listing of services that are up and running and their respective run level.

You could also nmap yourself to see what is listening, in addition to all the excellent netstat suggestions above...

2
  • I'm using Ubuntu 8.10.
    – RamyenHead
    Aug 30, 2009 at 14:40
  • Looks like the service command is what you may be looking for here is a link: ubuntugeek.com/… ;-)
    – ForgeMan
    Aug 31, 2009 at 0:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .