Introduction to Services
Its another Monday and I am feeling moody. So instead of something that require me to think , such as programming , I am going to talk about something I am more familiar with , networking in general and services. If you have read the About Me , I am also a CCNA.
So what can I say about networking that has not been said a thousand times? Maybe something that is interesting. Ports. Of course , we all know what are ports. Don’t you? If were to go to this location on your Windows machine ,
C:WindowsSystem32driversetc
and open up the file called “services“. No extension , use notepad to open the file.
or on Linux do this,
cat /etc/services
and you shall see both files have the same information , for most parts. They both should look like this ,
echo 7/tcp echo 7/udp discard 9/tcp sink null discard 9/udp sink null systat 11/tcp users #Active users systat 11/udp users #Active users daytime 13/tcp daytime 13/udp qotd 17/tcp quote #Quote of the day qotd 17/udp quote #Quote of the day chargen 19/tcp ttytst source #Character generator chargen 19/udp ttytst source #Character generator ftp-data 20/tcp #FTP, data ftp 21/tcp #FTP. control ssh 22/tcp #SSH Remote Login Protocol telnet 23/tcp smtp 25/tcp mail #Simple Mail Transfer Protocol time 37/tcp timserver time 37/udp timserver rlp 39/udp resource #Resource Location Protocol nameserver 42/tcp name #Host Name Server nameserver 42/udp name #Host Name Server nicname 43/tcp whois domain 53/tcp #Domain Name Server domain 53/udp #Domain Name Server bootps 67/udp dhcps #Bootstrap Protocol Server bootpc 68/udp dhcpc #Bootstrap Protocol Client tftp 69/udp #Trivial File Transfer gopher 70/tcp finger 79/tcp http 80/tcp www www-http #World Wide Web
Of course , there will be Windows services not available in Linux and so on but you will also find common ports such as http , ftp , smtp , telnet , ssh , domain , finger and so on.
telnet and finger services should be disabled on your machine , whether be it Linux or Windows. Here is why.
[root@plato ~]# finger root Login: root Name: root Directory: /root Shell: /bin/bash On since Sun Sep 4 23:52 (EDT) on pts/0 from [IP-ADDRESS] No mail. No Plan.
Take a look at the information about root from a finger command. Btw , the IP address is a real ip address and I have edited to make sure you can’t see it. Of course there are a lot of information missing from it , such as my email , what kind of plans and so on. Any one of them could be used to plan an attack on the server. For example , you could check when was the last time I have logged in for a few days and figure out that I may be on leave.
As for telnet ,it is simply because it is insecure and there is a much better protocol available , ssh @ port 22. And interestingly enough , one of the first tasks that you should do as an admin is to change the default ports for some of the common programs. For example , ssh , it should never be on port 22. Because it is very common and so widely known that it is mist likely to be one of the first place start attacking. By changing its port , the hacker or cracker , would have have a much harder time.
Conclusion to Services
Hope this is a great help to you. Cya!