Sie sind auf Seite 1von 32

By:

Cyber Security Trainer


Cyberops Infosec LLP
info@cyberops.in

1
Cyberops Infosec
NETWORKING FUNDAMENTALS

Session Flow
• IPv4/IPv5/IPv6
• Calculate Subnetting
• IPv4 Class Divisions
• Services, Ports & Protocols
• Connection Mechanism (TCP V/s UDP)
• NetCat – A Swiss Army Knife
• Domain Name System
• Working of DNS
• Dynamic Domain Name System

Cyberops Infosec
NETWORKING FUNDAMENTALS

Internet Protocol (IP)


IPv4
⁻ The range of the address is 0.0.0.0 to 255.255.255.255
⁻ IPv4 is a 32 bit addressing protocol.
⁻ Have two parts
1. Host bits
2. Network bits

Cyberops Infosec
NETWORKING FUNDAMENTALS

Internet Protocol (IP)


IPv5
It was introduced but because of some technical errors it got rejected and new version of IP
came.

Cyberops Infosec
NETWORKING FUNDAMENTALS

Internet Protocol (IP)


IPv6
IPv6 is a 128 bit addressing protocol.
Written in eight groups of four hexadecimal digits.
E.g.:
2001:0db8:85a3:0000:0000:8a2e:0370:7334

Cyberops Infosec
NETWORKING FUNDAMENTALS

Internet Protocol (IP)


IPv4 Class Division
• There are basically five types of classes on which the IP addresses are distinguished and
assigned. They are:
• Class A, B, C are used by the Internet Service provider to assign for different networks and
computers for home use.
• Class D is used by media and multicast purposes.
• Class E is allocated for scientific research and development area.

Cyberops Infosec
NETWORKING FUNDAMENTALS

Internet Protocol (IP)


Subnetting
• Subnetting is a concept which improve the performance and utilization of IP address.
• Use of Subnet Mask depends on Host Bits and Network Bits.
• An IPv4 Address contains 32 bits i.e. 4 block of 8 bits or 4 octets.

Cyberops Infosec
NETWORKING FUNDAMENTALS

Internet Protocol (IP)


IPv4 Class Division:

Default
Class Leading bits Start End
subnet mask

Class A 0 0.0.0.0 127.255.255.255 255.0.0.0

Class B 10 128.0.0.0 191.255.255.255 255.255.0.0

Class C 110 192.0.0.0 223.255.255.255 255.255.255.0

Class D
1110 224.0.0.0 239.255.255.255 not defined
(multicast)

Class E (reserved) 1111 240.0.0.0 255.255.255.255 not defined

Cyberops Infosec
NETWORKING FUNDAMENTALS

Classification of Subnetting
Octets
• The 32-bit IP address is broken up into 4 octets, which are arranged into a dotted-decimal
notation scheme.
• An octet is a set of 8 bits & not a musical instrument.
• Example of an IP version 4:
172.64.126.52

Cyberops Infosec
NETWORKING FUNDAMENTALS

Classification of Subnetting
• Using the ranges, you can determine the class of an address from its 1st octet value.
• An address beginning with 120 is a Class A address, 155 is a Class B address & 220 is a Class
C address.

Cyberops Infosec
NETWORKING FUNDAMENTALS

Classification of Subnetting
The 32 bits of the IP address are divided into Network & Host portions, with the octets assigned
as a part of one or the other.

Network & Host Representation


By IP Address Class
Class Octet1 Octet2 Octet3 Octet4

Class A Network Host Host Host

Class B Network Network Host Host

Class C Network Network Network Host

Cyberops Infosec
NETWORKING FUNDAMENTALS

Classification of Subnetting
• Each Network is assigned a network address & every device or interface (such as a router
port) on the network is assigned a host address.
• There are only 2 specific rules that govern the value of the address.
• A host address cannot be designated by all zeros or all ones.
• These are special addresses that are reserved for special purposes.

Cyberops Infosec
NETWORKING FUNDAMENTALS

Services, Ports & Protocols


• Servers are simply computer system with some specific software installed and high
configurations.
• Those software provide some services like : web service, file transfer service, mail service
etc.
• These services are provided on specific port number.
• Only one service at a time can be provided on a port number.
• User have to request for service on its corresponding port number.

Cyberops Infosec
NETWORKING FUNDAMENTALS

Services, Ports & Protocols


• For communication, A system/server must have an open port, a way like door in it.
• Ports: In digital world port is defined as the end point of any communication channel.
• There are two type of ports:
• Physical/external : usb, vga, lan
• Internal ports
• There are total 65,535 internal ports in a computer system.

Cyberops Infosec
NETWORKING FUNDAMENTALS

Services, Ports & Protocols

Port 21

Port 25

Port 80

Port 443

Cyberops Infosec
NETWORKING FUNDAMENTALS

Services, Ports & Protocols


These ports are classified in 3 parts:

• Well Known Ports (0-1023): used by system processes that provide widely used
types of network services.
• Registered Ports (1024-49151): for specific service upon application by a requesting
entity
• Dynamic Ports (49152-65535): This range is used for private, or customized services
or temporary purposes and for automatic allocation of ephemeral ports

Cyberops Infosec
NETWORKING FUNDAMENTALS

Services, Ports & Protocols

Requesting page i.e. Connecting


www.google.com on Port 80 [Web Service]

Replying back i.e. connecting


on port 53343 [random dynamic port]

user Google server

Cyberops Infosec
NETWORKING FUNDAMENTALS

Connection Mechanism (TCP V/s UDP):

• There are two type of connection establishment techniques:

• TCP Connection (connection oriented): Responsible for each packets that it is


delivered properly or not.
• UDP Connection (connectionless): Only transmit data and doesn't care if its received
by receiver properly or not.

Cyberops Infosec
NETWORKING FUNDAMENTALS

Connection Mechanism (TCP V/s UDP):

User 1 User 2

Cyberops Infosec
NETWORKING FUNDAMENTALS

Connection Mechanism (TCP V/s UDP):

• A TCP request can be called as TCP packet which contains:


• Header
• Data
• And because sending TCP packet to receiver/server is simply connecting to that
receiver/server thus it is obvious that TCP header will contain destination IP address + Port
number.

Cyberops Infosec
NETWORKING FUNDAMENTALS

Connection Mechanism (TCP V/s UDP):

• A TCP header contains total 32 bits which looks like below:

Cyberops Infosec
NETWORKING FUNDAMENTALS

Connection Mechanism (TCP V/s UDP):

• There are many fields but specifically some fields are important to know:

• Source Port: Port number of the sender, on which receiver will respond/connect if
connection goes successful.

• Destination Port: Port number of receiver on which sender wants to connect.

Cyberops Infosec
NETWORKING FUNDAMENTALS

Dynamic Host Control Protocol:

• The Dynamic Host Configuration Protocol (DHCP) is a network protocol that is used to
configure network devices so that they can communicate on an IP network.
• DHCP consists of two components: a protocol for delivering host-specific configuration
parameters from a server to a host and a mechanism for allocation of network addresses to
hosts.

Cyberops Infosec
NETWORKING FUNDAMENTALS

Dynamic Host Control Protocol:

IP Address Allocation
• DHCP supports three mechanisms for IP address allocation.
• Automatic allocation -- in which a permanent IP address is assigned to the client.
• Dynamic allocation -- in which the address is assigned for a limited period of time (a
"lease").
• Manual allocation -- in which the address is assigned manually by the network
administrator.

Cyberops Infosec
NETWORKING FUNDAMENTALS

Assign Static IP:

Assign Static Private IP Allocation

::Demonstration(Windows)::

Cyberops Infosec
NETWORKING FUNDAMENTALS

Assign Static IP:

Assign Static Private IP Allocation

::Demonstration(Linux)::

Cyberops Infosec
NETWORKING FUNDAMENTALS

NetCat – A Swiss Army Knife:

• It is a computer networking utility for reading from and writing to network connections
using TCP or UDP.

• Lets do some practical with our previous knowledge about IP Address, Port number,
TCP/UDP connections and all.

Cyberops Infosec
NETWORKING FUNDAMENTALS

NetCat – A Swiss Army Knife:

• Downloading Netcat
• Installing in Windows
• Basic Windows Commands like (cd, cp, dir etc)
• Working with Netcat
• Getting Help
• Chat Server
• File Transfer
• Getting Shell/CMD access

Cyberops Infosec
NETWORKING FUNDAMENTALS

DNS (Domain Name System):

• Domain Name: A collection of strings which serve to identify Internet resources, such as
computers, networks, and services.
E.g.

cyberops.in
microsoft.com
google.com
• Subdomain: Subdomain names are Web addresses created by adding a third-level domain
to your existing domain name.
E.g.

Images.google.com

mail.example.com

Cyberops Infosec
NETWORKING FUNDAMENTALS

DNS (Domain Name System):


Working of DNS
• Every request made for a website like google, facebook, twitter goes to a IP address of its
server.
• So now Imagine how hard it will be if you have to remember IP addresses for facebook,
google and every site you open.
• DNS translate internet domain and hostname into IP address of that server.

Cyberops Infosec
NETWORKING FUNDAMENTALS

DNS (Domain Name System):


Working of DNS
• There are three level of queries i.e. your system can ask about IP address of a website to
these:
• System itself
• Internet Service Provider DNS
• Root DNS

Cyberops Infosec
NETWORKING FUNDAMENTALS

DNS (Domain Name System):


Working of DNS
• In windows there is a HOST file which is responsible for first action on Domain entered in
URL.

• Its path is C:/windows/system32/drivers/etc/host

Demonstration :

Cyberops Infosec

Das könnte Ihnen auch gefallen