0% found this document useful (0 votes)
115 views112 pages

Networking For Hackers

The document provides an overview of networking concepts, including types of networks (LAN, WAN, MAN), IP addressing (IPv4 and IPv6), and the OSI model. It discusses the roles of client and server computers, network protocols, and the importance of MAC addresses. Additionally, it covers the need for networks, classification by geography and component roles, and the significance of NAT for IP address conservation.

Uploaded by

mercymoy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
115 views112 pages

Networking For Hackers

The document provides an overview of networking concepts, including types of networks (LAN, WAN, MAN), IP addressing (IPv4 and IPv6), and the OSI model. It discusses the roles of client and server computers, network protocols, and the importance of MAC addresses. Additionally, it covers the need for networks, classification by geography and component roles, and the significance of NAT for IP address conservation.

Uploaded by

mercymoy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 112

Networking for

Hackers!

Day12_network.md
Recalling!

LAST TIME
TOPICS
Topics

● Introduction to networking
● Classification of networks
● IP Address Technology
● Mac Address
● OSI Model
● TCP and UDP protocols
● TCP/IP Model
● Networking Devices
● Virtualization Network
Introduction to Networking

● A network consists of two or more entities or objects


sharing resources and information.
● A computer network consists of two or more
computing devices connected to each other to share
resources and information.
● The network becomes a powerful tool when
computers communicate and share resources with
other computers on the same network or entirely
distinct networks.

● Computers on a network can


act as a client or a server.
Client computer

● A client is a
computer that
requests for
resources.
Server computer

● A server is a computer
that controls and
provides access to
resources.
● But have higher
RAM,CPU and
STORAGE
example
Server Rack
- Switch
- Modem
- Servers
- Firewall
- Display
- …
Need of Networks

● Enhance communication.
● Share resources.
● Facilitate centralized management
● Internet
Classification of Networks

1. Classification by network geography.


2. Classification by component roles.
Classification by Network Geography

● Networks are frequently classified according to


the geographical boundaries spanned by the
network itself.
● LAN, WAN, and MAN are the basic types of
classification, of which LAN and WAN are
frequently used
Local area network (LAN)

○ A LAN covers a relatively small


area such as a classroom,
school, or a single building.
○ LANs are inexpensive to install
and also provide higher
speeds.
Metropolitan area network (MAN)

● A MAN spans the distance of a


typical metropolitan city.
● The cost of installation and
operation is higher.
● MANs use high-speed
connections such as fiber
optics to achieve higher
speeds
Wide area network (WAN)

● WANs span a larger area


than a single city.
● These use long distance
telecommunication
networks for connection,
thereby increasing the cost.
● The Internet is a good
example of a WAN.
Classification by Component Roles

● Networks can also be classified according to


the roles that the networked computers play
in the network’s operation.
● Peer-to-peer, server-based, and client-based
are the types of roles into which networks
are classified.
Peer-to-peer
● In a peer-to-peer network, all computers are considered equal.
● Each computer controls its own information and is capable of
functioning as either a client or a server depending upon the
requirement.
● Peer-to-peer networks are cheap and easy to install.
● They are popular as home networks and for use in small companies.
● Most operating systems come with built-in peer-to-peer networking
capability.
● The maximum number of peers that can operate on a peer-to-peer
network is ten.
● Each peer shares resources and allows others open access to them.
Peer-to-peer
Server based

● A server-based network offers centralized control


and is designed for secure operations.
● In a server-based network, a dedicated server
controls the network.
● A dedicated server is one that services the network
by storing data, applications, resources, and also
provides access to resources required by the client.
Server-based
Client-based

● Client-based network servers process requests from


clients and return just the results.
● These networks take advantage of the powerful
processing capabilities of both the client and the
server.
client-based
IP /Internet Protocol/ address

● IP (Internet Protocol) is a
Network Layer Protocol.
● A way to identify
machines on a network
● A unique identifier
USAGE of IP’s

● Used to connect to another computer


or network.
● Allows transfers of files and e-mail
● Identify a device
IP types

● Based On IP versions
○ IPv4
○ IPv6
IPv4 ( Internet protocol version 4)

● An IPv4 address is a 32-bit sequence of 1s and 0s.


● To make the IP address easier to use, the address is
usually written as four decimal numbers separated by
periods.
● This way of writing the address is called the dotted
decimal format.
● IP generated by DHCP or Manually
IP structure
● IP addresses consist of four sections

● Each section is 8 bits long


● Each section can range from 0 to 255
https://www.rapidtables.com/convert/number/binary-to-decimal.html
Which on are valid ip addresses?

1. 192.127.32.2
2. 192.259.22.1
3. 10.1.1.1
4. 192,168,1,1

● When you connect to some network an IP address will be


generated and given(automatically by DHCP or static way).
● Every IP address has two parts:
○ Network: to identify the network( የእናንተ,የጎረቤት)
○ Host: identify the user(ስልክ,PC)

● The first(1) host address is called GATEWAY


ADDRESS.

➔ There are 5 classes of private IP address A B C D


and E
➔ CLASS A: Governments
➔ CLASS B: medium Companies
➔ CLASS C: small companies
➔ CLASS D: MultiCasting(streaming)
➔ CLASS E: Future Use (IETF research)
CLASS A

● Have 24bit of space for HOSTS


CLASS B

● Have 16bit of space for HOSTS


CLASS C

● Have 8bit of space for HOSTS and 24-bit of network


CLASS C

● It is Used on Our Home,school and Office Network.


● As we saw the host changes on the last 8 bit only so devices in same
network have same starting numbers.
Reserved IP Addresses

● Certain host addresses are reserved and cannot be assigned to


devices on a network.
a. Addresses beginning 127 are reserved for loopback and internal
testing
b. An IP address that has binary 0s in all host bit positions is
reserved for the network address.
c. An IP address that has binary 1 or 255s in all host bit positions is
reserved for the broadcast address
Examples of Reserved addresses

● 0.0.0.0
● 127.0.0.0
● 128.0.0.0
● 191.255.0.0
● 192.0.0.0
● 223.255.255.0
IPv6 ( Internet Protocol Version 6)
● IPv6 is a 128-bit alphanumeric long value that identifies an
endpoint devices in IPv6 network.
● Format of an IPv6 address:
○ FE80:CD00:0000:0CDE:1257:0000:211E:729C
■ ALPHANumeric
■ Separated by colon(:)
■ IP generated automatically.
● The main difference is the IP-space(host holding) IPv4 holds 32-bit
ip address but IPv6 holds 128-bit ip Addresses.
● Total number of possible IPv4 addresses:
○ 232=4,294,967,296 (about 4.3 billion).
○ 2128=340,282,366,920,938,463,463,374,607,431,768,211,45
6. (Approximately 340 undecillion addresses).
Internet and intranet?

● Internet is the world Wide Network, that includes different


servers from all the world, to provide different services like,
database , Search engine, Social Medias.
● Intranet is a Local Organizational Level Network, that includes
Different Servers that bases inside that specific organization,
Still This network can have different databases, websites, Search
engines, and local social medias.
○ Here VPNs are used for Connecting different Regions.
To know your computer ip address

On windows:

ipconfig

On Linux

ifconfig
Public ip
Myth and truth
● WHY do we need IPv6?
○ Lack of IPv4, Even Class A with 16 Million Address is not enough for 8
billion Peoples. Peoples Came with Another Solution in addition to this,
“NAT”
● Internet Service Provider/ISP and IPv4’s
○ IP Address are limited, and Expensive
■ Specially in our country, we don’t have that much IP’s There for many
peoples have same IP address.
● Location of Person.
● Unique Identifier.
● Do Peoples Hack with IP address?
○ Static and Dynamic/DHCP
■ Client Computer and mobile Use Dynamic Assigning by default.
● Changed When you restart/reset ur phone or Router.
● Lack of IPv4 ( Poor Countries )
https://auctions.ipv4.global/
Network Address Translation ( NAT )

● NAT is a method used by routers to map multiple private IP addresses within a local
network to a single public IP address (or a few public IP addresses).
○ This allows devices in a private network to access the internet while conserving
public IP addresses.
● Provides a basic level of security by hiding internal IP addresses from the external
network (internet).
Private and Public IP addresses.

● Any HOST have 2 different IP’s


● Public IP:
○ is an ip address that is given to the host on the
WAN network
● Private IP:
○ is ip that is given to the host on LAN network.

Just like Ethiopian Digital ID and Passport


Network Division

- A Network That is Divided from Big network is called


Subnet/Sub-network.
- We Can Use Some techniques To Segment and Classify Our Networks.
- If we Have A Company/Organization, ISP Gives Us 1 Address of Class A/B
So we have to Segment and Use this IP Effectively for Each Department,
for this we Use Some Techniques:
1. Virtual Local Area Network(VLAN)
a. This means Creating Different Virtual LAN’s Based on 1 IP.
2. Subnetting
a. This is Segmenting the IP Address Based on Subnet Masks.
MAC(Media Access Control) Address

● It is Given by A manufacturer of that


network adapter.
● Network adapter is a hardware device
that helps us to have connection ( our
wifi adapter or our ethernet port)
● It is Alphanumeric, with 2 part
○ Organizational Unique Id
○ Universally Administered Address
MAC(Media Access Control) Address

● Flat name space of 48 bits


○ Typically written in six octets in hex
○ E.g., 00-15-C5-49-04-A9 for my Ethernet
● Organizationally unique identifier
○ Assigned by IEEE Registration Authority
○ Determines the first 24 bits of the address
○ E.g., 00-15-C5 corresponds to “Dell Inc”
● Remainder of the MAC address
○ Allocated by the manufacturer
○ E.g., 49-04-A9 for my Ethernet card
BREAK TIME
Try to Go through what
we have seen, Any
Question?
OSI(Open Systems Interconnection) Reference
model

● Back in the Days, Different Company Devices can’t


Communicate or create network with each other.
○ Ex: HP and Dell, Samsung and Apple
● OSI Reference Model - internationally standardised network
architecture.
● Specified in ISO 7498.
● It is an idea model to show the way of network work
● Model has 7 layers.
● It shows How Data transfers between 2 hosts/servers

● Layers 1-4 relate to


communications technology.
● Layers 5-7 relate to user
applications.
● The sequence be reversed
when sender and receiver use
it, But we Consider and Count it
from the Receiver Side
The way data transfer
Network Protocol

- Network protocols are the rules and conventions that govern how data is
transmitted and received over a network. They define the methods for
communication between network devices, ensuring data is properly
packaged, transmitted, and understood.
- These Protocols have their own, name and Abbreviation.
● Common Network Protocols
○ HTTP/HTTPS: Foundation of web browsing, used for transferring web pages.
○ TCP/IP: Core protocols for the Internet, managing data transmission.
○ FTP: Used for transferring files between computers.
○ DNS: Translates domain names into IP addresses.
○ SMTP: Protocol for sending emails.
Layer 7: Application Layer
● Level at which applications access network services.
○ Represents services that directly support
software applications for file transfers, database
access, and electronic mail, BROWSERS etc.
● Your data is DATA
○ PROTOCOLS: HTTP,FTP,SMTP
Layer 6: Presentation Layer
● Related to representation of transmitted data
○ Translates different data representations from the
Application layer into uniform standard format
● Providing services for secure efficient data
transmission
○ e.g. data encryption, and data compression.
● Your data is DATA
● PROTOCOLS: SSL
Layer 5: Session Layer
● Allows two applications on different computers to
establish, use, and end a session.
○ e.g. file transfer, remote login
● Establishes dialog control
○ Regulates which side transmits, when and how long it
transmits.
● Performs token management and synchronization.
● Your data is DATA
● PROTOCOLS: RPC,NETBIOS
Layer 4: Transport Layer
● Manages transmission packets
○ Repackages long messages when necessary into small packets for transmission
[ sender ]
○ Reassembles packets in correct order to get the original message. [ receiver ]
● Handles error recognition and recovery.
○ Transport layer at receiving acknowledges packet delivery.
○ Resends missing packets
● Your data is SEGMENTS
● PROTOCOLS: TCP,UDP
Layer 3: Network Layer

● Manages addressing/routing of data within the ip range


○ Addresses messages and translates logical addresses and names
into physical addresses.
○ Determines the route from the source to the destination
computer
○ Manages traffic problems, such as switching, routing, and
controlling the congestion of data packets.
● Your data is PACKETS
● PROTOCOLS: ICMP,ARP,NAT,IP
Layer 2: Data Link Layer
● Packages raw bits from the Physical layer into frames
(logical, structured packets for data). [ receiver ]
● Provides reliable transmission of frames
○ It waits for an acknowledgment from the receiving
computer.
○ Retransmits frames for which acknowledgement not
received
● Your data is FRAMES
● PROTOCOLS: PPP,NDP,CDP
Layer 1: Physical Layer
● Transmits bits from one computer to another
● Regulates the transmission of a stream of bits over a physical medium.
● Defines how the cable is attached to the network adapter and what
transmission technique is used to send data over the cable. Deals with issues
like
○ The definition of 0 and 1, e.g. how many volts represents a 1, and how
long a bit lasts?
○ How many pins a connector has, and what the function of each pin is?
● Your data is Bits
● PROTOCOLS/DEVICES: RS-449
Summary
TCP and UDP

What Is TCP (Transmission Control Protocol)?

● Reliable
● Connection-Oriented protocol
○ Means it establishes a connection between the receiver
and sender.
■ It uses 3 way HandShake ( more on Network
Hacking Class )
● Used on emails, Chat,watching online videos, simple
browsing.

What is UDP(User Datagram Protocol)?


● Connectionless
● less reliable, but faster and more straightforward.
● It’s often used in situations where higher speeds
are crucial, like in streaming or gaming.
TCP/IP model

● It is A reference model like the OSI model


● TCP/IP is the new and most used Model
at this time.
● This model have 4 layers(used to be 5
layer)

● Application,Presentation
and session layers are
combined together and
called APPLICATION
● Data link layer and
physical layer combined
and called network access
layer.
Networking tools

● In Networking there are many


hardware devices That are used to
Connect Different Computers and
Create Network.
● To Understand the Devices Let’s
Classify them Based on The OSI Layers
We have Learned.
Devices On each OSI Layer

● Layer 7: Firewall
● Layer 6: NO DEVICE
● Layer 5: NO DEVICE
● Layer 4: NO DEVICE
● Layer 3: Routers, Layer 3 Switch
● Layer 2: Switch, Bridge
● Layer 1: Hub, Cables, Repeater
Layer 1: Hub

● A basic device that connects multiple devices


in a network.
● It broadcasts data to all devices connected to
it.
Layer 1: Repeater

● Helps To
boost/amplify
the speed of the
internet, in long
route
Layer 1: Network Cables

● These are Cables which are used to connect 2 different


Network Devices/Computers
● There are many Cables types.
○ Coaxial Cable
○ Twisted Pair Cable
○ Fiber Optics Cable
Coaxial Cable

● Primarily used for cable television,


internet connections, and other types
of data transmission over long
distances.
● It is capable of carrying
high-frequency signals with minimal
interference.
● Coaxial cables are thicker and less
flexible, making installation more
difficult in tight spaces.
Twisted Pair

● Widely used in
telecommunication and computer
networks, including Ethernet
networks (e.g., Cat5e, Cat6
cables).
● Over long distances, twisted pair
cables are more susceptible to
signal degradation compared to
coaxial and fiber optic cables.
Fiber Optics

● Used for high-speed data transmission,


especially in internet backbones,
long-distance telecommunication
networks, and in environments requiring
high bandwidth, such as data centers.
● Fiber optic cables are more expensive and
delicate compared to coaxial and twisted
pair cables. Installation requires
specialized skills.
Fiber Under Sea
Cont…
Layer 1 & 2: Network interface card (NIC)

● A network interface card (NIC) is a


hardware component, typically a circuit
board or chip, installed on a computer
so it can connect to a network.
● The NIC is both a physical layer and
data link layer device,
○ as it provides physical access to a
networking medium and,
○ provides a low-level addressing
system through the use of MAC
addresses that are uniquely
assigned to network interfaces.
Cont…

Many Types of NIC’s


Layer 2: Switches

● Operates at Layer 2 to
connect devices within
the same network.
● It uses MAC addresses
to forward data to the
correct destination.
● Vlans are done on
Switches
5,24,48,.. Ports
Layer 3: Routers

● Routes data between


192.168.1.1
different networks by
using IP addresses.
● It determines the best
path for data to travel
across networks. 192.168.2.1
Modern wifi routers

Then Contain Different


Devices in one.
1. Router
2. Switch
3. Wireless AP
4. Modem
Layer 7: Firewall

● A firewall is a network security device that monitors


incoming and outgoing network traffic and decides
whether to allow or block specific traffic based on a
defined set of security rules.
● It is Just A collection of rules to allow and deny network
traffics
● Ex: You can’t directly access some host directly from other
Network.
Firewall
Firewall as Software

every OS have firewall Built-in


Firewall As Device
Server Rack
- Switch
- Modem
- Servers
- Firewall
- Display
- …
Cisco Packet Tracer

https://www.netacad.com/cisco-packet-tracer
Virtualization Network

● Virtualization networking, or network virtualization


(NV), is the process of combining network resources and
functionality into a software-based virtual network.
● This allows administrators to create and manage virtual
networks independently of the physical hardware that
traditionally delivered those resources
● On Our Previous Classes we have Learned About
Virtualization Technology.
○ Virtualization Examples: HyperVisor, Oracle VirtualBox,
VMware, qemu,...
● Those Virtual Hosts, Will Have A Different Networking
Settings Like, Bridged, NAT, Host only, Internal Network
How do they work?
Types of Virtual Networks
1) Bridged Networking
Internet

○ Connects virtual machines (VMs)


directly to the physical network.
○ Each VM gets its own IP address.
2) NAT (Network Address Translation)
Networking

○ VMs share the host


machine's IP address.
○ Suitable for isolating VMs
from the external network.

192.168.1.2
3) Host-Only Networking

○ Allows communication only between


VMs and the host.
○ Ideal for development and testing.
Thats All ⚡

● At this stage, you have a solid understanding


of networking basics.
● Network engineers handle the practical
aspects like configuring devices and
preparing cables.
● The topics covered are more than sufficient
for our cybersecurity class.
Assignment on Subnetting 5pts

Video: https://www.youtube.com/watch?v=qulRjRFavJI

Questions
1. Submit the decimal representation of the subnet mask from the following CIDR:
10.200.20.0/27 (2pts)
2. Submit the broadcast address of the following CIDR: 10.200.20.0/27 (2pts)
3. Split the network 10.200.20.0/27 into 4 subnets and submit the network address of
the 3rd subnet as the answer. (3pts)
4. Split the network 10.200.20.0/27 into 4 subnets and submit the broadcast address of
the 2nd subnet as the answer. (3pts)

Will be posted on the google form , Use Google, Youtube and ChatGPT you have 15 days.
you will learn lot of things about subnetting, CIDR notations…, your season 2 exam will
include some part from it.
Season 1 Class is OVER

1) Do note
2) Read it again
3) ASK
4) Prepare Your Kali linux/Parrot machine

You have 1 week break and exam when you come back, also
finish Tuition Fee for Season 2(if you have paid let as know).

You might also like