share

Ports and Firewalls

 


Ports, which are also sometimes called sockets, were one of the hardest Fundamental concepts for me to wrap my head around when I first started Learning networking engineering and computer hacking years ago. Basically, they are numeric values that are part of the TCP/IP protocol suite that is used to Tag different types of traffic. By tagging the traffic, devices like firewalls can take Different actions when different data streams flow through a network. There are literally thousands of different ports that are each used for different types of traffic and applications, but only a few of these are well-known Protocols. Some software developers reserve certain ports for their custom Application traffic, but you only need to be concerned with the well-known ports to get your feet wet with hacking. You must have a basic understanding of ports because later we will go through the process of port Scanning on your local network to ascertain which of these ports are open and Which are closed.


The following are some of the most common ports and their respective protocols

And traffic types:

-Port 80: HTTP (Hyper Text Transfer Protocol – used for web browsing and web

Pages)

-Port 20/21: FTP (File Transfer Protocol – used to download files remotely)

-Port 443: HTTPS (Hyper Text Transfer Protocol Secure – encrypted HTTP)

-Port 22: SSH (Secure Shell – used to remotely run command line procedures)

-Port 53: DNS (Domain Name System – used to bind IP addresses to URLs)

-Port 547: DHCP Server (Dynamic Host Configuration Protocol – automatic IP

Address assignment)


As you can see, each network protocol is assigned its own unique port number. These ports provide a way to handle various types of traffic differently. For Example, if I didn’t want anyone to download files from a personal file server I was hosting on my network, I would block connection attempts on ports 20 and 21 (FTP). This is an extremely basic example but understand that if you see a Host with an open port, that host will accept connections using that specific type Of traffic. As another example, consider a web server that hosts a website. It will Have either port 80 (HTTP) or port 443 (HTTPS) open, and clients can make a Connection on those ports with the server to download the webpages to their Browser. These ideas bring us to the next important concept: firewalls. The term ‘firewall’ is thrown around in the movies a lot, but most people don’t understand what they do. Though they have many advanced features, one of a Firewall’s most basic functions is to permit or deny traffic to a network. Firewalls in home environments act as a single point of failure – meaning that all Of the data in transit to/from the local network needs to first pass through the Firewall. Because it acts as the only way into a network, the firewall can prevent Hackers from making connections on specified ports to protect the local network. This concept refers to a hardware firewall, but there are software firewalls Aswell. For example, just consider the program adequately named Windows Firewall. It is a piece of software that will prevent the networking card in your computer from making connections on any of the ports you choose to block. We Will see how to scan a target system later with a port scanner to see which ports Are open and potentially exploitable. You should also know how to run a ping as well as view your IP address, subnet Mask, and MAC address. These are extremely simple commands, and they are used frequently by networking security professionals. They are all run from the Command prompt, so in Windows open up the command prompt by searching for it or hitting your Windows key and typing ‘cmd.’ the application’s icon is a Black box, and once you run this program you see a prompt with a blinking Underscore. To view your IP address, subnet mask, and default gateway, just type ipconfig into the command prompt. On the other hand, if you want to see your Maladdress', just type ipconfig /all into the command prompt. If you are using a Maco Linux computer, the command is only slightly different. On these systems the Command is ipconfig.



Next Post Previous Post
No Comment
Add Comment
comment url