Port Scanning Tutorial for Hackers

First part consists of:
1. Introduction of Ports and Port Number
2. What is port scanning and how it works
3. How to protect yourself from port scanners
Second part will contain:
1. Different types of port scanning.
2. How different types of port scanning works.
Third part will contain:
1. Practical implementation of port scanning.
2. Port scanning using NMAP.
3. NMAP tutorial Basics.
Fourth Part:
NMAP advanced tutorial for Hackers and Network administrators.

So lets start from the very first part. So friends lets begin our learning:
First of all, you all must know what is port and for what purpose it is used. Port is a medium between two devices(can be two computers) to communicate with each other. A port is always associated with an IP address (usually of host) and the type of protocol (TCP or UDP) used for communication. A port is identified for each IP address and protocol by a 16-bit number, commonly known as the port number. The port number completes the destination address for a communication’s session means which service has to be invoked.

Since its a 16 bit number so there are 2^16 (means 0 to 65535) ports exists each for UDP and TCP protocols. Out of these first 1k ports are fixed for system services and rest we can configure according to our choice.
List of Common Port Numbers:
Some default useful ports that we use in day to day life(:P Hackers and network administrators) :
Port number       Service
7                                 Ping
21                               FTP(File transfer protocol)
22                               SSH (Secure shell)
23                               Telnet
25                               SMTP (Mail)
43                               WHOIS
53                               DNS
80                               HTTP
110                             POP3 (Mail Access)
119                             Network News Transfer Protocol (NNTP)
143                             Internet Message Access Protocol (IMAP)
161                             Simple Network Management Protocol (SNMP)
443                             HTTP Secure (HTTPS)
513                             Remote login
8080                           Proxy
Port Scanning:
From above you might have guessed that what is port scanning. Now lets understand what actually port scanning technique is? Port scanning is one of the most important step in gathering the information(reconnaissance phase) about the victim against whom you want to launch attack or simply gathering loop holes of your own system(like network and system administrators) to prevent that from hackers. Port scanning is done to get the current state of the port means Port is open, close, filtered or prevented. I usually prefer NMAP for port scanning because it is simply best port scanner available online.
Note: Most of us think that port scanners is only used by hackers. But port scanners serve more to security administrators rather than hackers. Network security administrators use port scanners on regular basis to monitor all the ports status. So either you are a hacker or a security expert, knowledge of port scanning is must for both.
Port scanning help the hackers to find out the open ports on a host. Let me relate it to some practical example of our daily life. Port scanning is basically like ringing a door bell of someone’s house, if somebody respond to ringing door bell, it means somebody is at home. If no one respond then there will be two situation’s, First members in house is busy or nobody is at home. Similarly in case of Hacking, you send a request to host for checking that particular port is live or not. If it responds back means its live other wise its closed or inactive. Now you all must be wondering why i am focusing too much on this. Consider an example, what will happen if you left your home gate always open. :P, its absolutely similar to unprotected PC which has left its ports open.
How to Protect Your Self?
To help ensure that your network is protected and secure you may wish to perform your own port scans.To get accurate results it may be best to perform the port scan from a remote location using non-company equipment and a different ISP. Using software such as NMap you can scan a range of IP addresses and ports and find out what an attacker would see if they were to port scan your network. NMap in particular allows you to control almost every aspect of the scan and perform various types of port scans to fit your needs. Once you find out what ports respond as being open by port scanning your own network you can begin to work on determining whether its actually necessary for those ports to be accessible from outside your network. If they’re not necessary you should shut them down or block them. If they are necessary, you can begin to research what sorts of vulnerabilities and exploits your network is open to by having these ports accessible and work to apply the appropriate patches or mitigation to protect your network as much as possible.
That’s all for today my friends. I will extend the tutorial on Port Scanning in my next article tomorrow. So friends keep reading. In my next class i will explain you different types of port scanning techniques and much more.
If you have any queries ask me in form of comments.

Leave a comment