How to get started in CyberSecurity

Cyber Security / Ethical Hacking Boot-camp

Welcome back to the BWithHacker's blog

Hey, guys welcome back to the Ethical Hacking Boot-camp. According to our modules set for the Cyber Security/Ethical Hacking Boot-camp. Now we will be continuing with our first module in the Boot-camp .i.e. Networking Fundamentals. We will not dig deep in the networking so, don't worry. All we need to know is some basic networking stuff.

Networking Concepts

Let's start the networking basics without any other nonsense.
Talking about networking, the first question that arises is that What is a network and networking....... So, in layman's term networking is something which gives us the power to connect our two or more electronic devices, so that they can communicate with each other, do file transfer, call others living far away.
Formally, a network can be defined as a group of two or more computer systems or devices that are linked together to exchange data.

Now, you know what networking is, so now the question arises what networking stuff do we actually need in the ethical hacking. Let's dive into the answer to our question here.

We will be learning:
1.Network components
2. Ports
3. Protocols

1. Network Components

There are various types of networking components:
  • Routers: A router is a device that routes the data traffic from one device to another. Router stores that route in its routing table so that it remembers the route if those particular devices wanna communicate again. A router has to maintain all the routes of from a device to all the other devices connected in its network. 
    Router
  • Hub: Hub is a network hardware device for connecting multiple devices and making them act as a single network segment. A hub is a dumb machine if a device connected to a hub makes a request to let's say, Facebook, it will broadcast the response to all the devices connected to the hub. A hub works on the physical layer of the OSI model. 
    Hub
  • Switch: Switch is a device that filters and forwards packets between LAN segments. Switches are intelligent versions of hubs, switches will send the response and request to the desired device only unlike the hubs. Switches operate at the data link layer of the OSI model.
    Switch
  • Access Point(AP): A hardware device or a computer's software that acts as a communication hub for users to connect all their wireless devices.
    Wireless Access Point (WAP)

2. Ports

Ports in a computer can be understood as gates by which we can enter a computer. Computers can have 65,535 TCP ports. So there are a lot of ways by which we can enter a device. As we need an open gate to enter a house; we need an open port to enter a computer. Not all ports are always open, some ports are only open when the user has set them to open or when the user is using that port for a particular service.

There are some well-known ports, some registered ports, and some dynamic ports.

Well-known ports range from (0-1023), these ports are reserved for services and applications. Most probably a computer will have an open port from these ports only.

Registered Ports are ports ranging from (1024-49151). These port numbers are assigned to user processes and/or applications

Dynamic ports or private ports (49152-65535). These ports are usually assigned dynamically to client applications when initiating a connection.

3. Protocols

Protocols

 

Protocols are rules, like the ones in your school or college, such that how you guys should behave, on what time you will have to enter a class, etc. More formally, we say that Protocols are set of rule that defines how things will work out in a NETWORK. Protocols will define:
  • how a connection will get established in two devices,
  • how two devices will get uniquely identified,
  • how two devices will share information,
  • how will you get connected to the Internet,
Different types of Protocols in Networking are as follows(which we'll be needing in the Cyber Security)
  • IP
  • DHCP
  • HTTP
  • HTTP/s
  • FTP
  • SMTP

   -> DHCP

The Dynamic Host Configuration Protocol (DHCP) is a network management protocol used on UDP/IP networks. A DHCP server will dynamically allocate you with an IP address and other network configuration parameters so that you can communicate to the other devices in the network.

 -> HTTP

HyperText Transfer Protocol (HTTP)

 

HyperText Transfer Protocol (HTTP) is a  protocol used by the World Wide Web (WWW) and this protocol, by default works on Port number 80. The primary goal of HTTP is to send data between a web browser and a website. In HTTP, the data flow in plain text. So, if you have to login to a website in HTTP, then your login credentials will flow as plain text and a hacker can easily catch your login credentials. If it is urgent you have to login to an HTTP site then you should always use your network, other than a WiFi network

 ->HTTP/S

HyperText Transfer Protocol over Secure Socket Layer (HTTP/S)

 

HTTPS is an upgraded version of HTTP, it is not a different protocol, it is just HTTP over SSL, .i.e Secure Socket Layer. HTTPS, by default, works on port number 443. The goal here is the same, here also your login credentials will flow but now your credentials will flow in an encrypted format so that a hacker can not steal your login credentials from you.

 ->FTP

File Transfer Protocol (FTP)
 

File Transfer Protocol (FTP), as the name, suggests it is used when you have to transfer files to and from a device. By default FTP works on port number 21. FTP will be responsible for the transmission of files on two or more devices.

 -> SMTP

Simple Mail Transfer Protocol (SMTP)

 

Simple Mail Transfer Protocol (SMTP) is a protocol used when we send emails over a network. Sending and receiving mail requires SMTP running, by default SMTP works on port number 25.

->INTERNET PROTOCOL (IP):

Internet Protocol (IP)

Internet Protocol(IP) itself is a topic itself. I'll try not to bore you guys in IPs. But you can understand that a device can have 3 different IPs at a given instant of time .i.e. Localhost, Private IP and Public IP.
Internet Protocol (IP) is generally the unique address assigned to your computer machine for communication over the Network.
As we humans have our own identity to communicate, computers need an identity to communicate over the Internet and IP is the identity for the computers, mobiles, tablets, smartwatches, smart TVs, and others is an IP.

 - Versions of IP

  • IPv4
IPv4 address is a 32-bit binary address (divided into four 8-bit blocks). Each block in IPv4 is separated by a full-stop(.). An IPv4 address consists of two parts; network part and host part.
Example: 192.168.1.55
  • IPv6 
IPv6 address is a 128-bit hexadecimal address (divided into eight 16-bit blocks). Each block in IPv6 address will have 4-digit hexadecimal numbers separated by a semicolon(;).
Example: 2001:0000:3238:DFE1:63:0000:0000:FEFB

 - Types of IP

There are generally two types of IPs:
  • Public IP
  • Private IP

Private IP

A private IP address is a non-Internet facing IP address. Private IP addresses are provided by network devices, such as routers, using Network Address Translation (NAT). Private IP is given to the devices connected to a networking device so that they communicate internally. Private IP is used in intranet communication, so the devices under the same network can share files.

Private IP can be understood as your identity (like a cute nickname) in the home given by your parents. If you have siblings then every child will have their own identity so that your parents can uniquely identify you and provide you with the required information.
You can understand your parents as your router and consider yourself as a computing device like a mobile phone, laptop or whatever you wanna consider.

Public IP

A public IP address is an IP address that can be accessed over the Internet. The public IP address is a globally unique IP address assigned to a computing device. Public IP is assigned to you by your Internet Service Provider (ISP) so that you can connect to the Internet and you have a unique address. Public IP is the internet-facing IP address of your networking device like, router.

Public IP is provided to you so that you can communicate to the outer world. Public IP can be understood as your official name as on your school record, the identity by which you are identified by your schoolmates, teachers, neighbors, etc.

LocalHost

You might be thinking that a computing device can only have a private IP or a public IP but that's not the case, your device will always have localhost as its IP, even if it's connected to a network or not. Localhost is your identity as you can also communicate with yourself(I communicate with myself whenever I want expert adviceπŸ‘…).

  - Classes of IPv4 address

There are five classes of IP addresses, they are Class A, Class B, Class C, Class D, and Class E, where only A, B, and C are commonly used.

Classes of IPv4

  • Class A: In Class A we use 10.x.x.x as Private IP.
  • Class B: In Class B we use 172.16.x.x as Private IP.
  • Class C: In Class C we use 192.168.x.x as Private IP.
  • Class D and Class E are reserved, we can't use them for Private IP.

Comments

Popular posts from this blog

How to get started in CyberSecurity

How to get started in CyberSecurity

How to get started in CyberSecurity