Unit 5
Unit 5
At its core, networking is the practice of connecting computers and other devices (like printers,
servers, and smartphones) together so they can communicate and share resources. For
example, in a company’s office, the computers might be connected to a file server, which
allows users to access documents and programs stored on that server.
For ethical hackers, understanding networking is essential because it helps identify how
information travels across networks and where vulnerabilities might exist. Network traffic can be
intercepted, redirected, or manipulated if security measures are weak.
The Internet:
The Internet is essentially the largest WAN (Wide Area Network) connecting millions of
private, public, academic, business, and government networks worldwide. When you browse a
website, send an email, or access a cloud service, you're interacting with the Internet.
Example: When you visit a website, your browser sends a request over the Internet, which is
routed through various networks before reaching the web server hosting the site. The server
processes the request and sends the web page data back to you, all happening in a matter of
seconds.
Types of Networks:
Examples:
Web Browsing: When you open a web browser (like Chrome or Firefox) and visit a
website, the browser communicates with the web server using protocols like HTTP/HTTPS
at this layer.
Email: When you use an email client (e.g., Outlook, Gmail), it communicates with the
email server using SMTP or IMAP.
Scenario:
Vulnerabilities in this layer often come from weak application design or improper input
handling, which can lead to SQL injection, cross-site scripting (XSS), or cross-site
request forgery (CSRF) attacks. Ethical hackers often test web applications for these
vulnerabilities using tools like Burp Suite or OWASP ZAP.
Examples:
Data Encryption: If you are visiting a website with HTTPS, the Presentation Layer
encrypts the data sent between your browser and the web server using SSL/TLS.
Data Compression: Sometimes data is compressed (e.g., ZIP files) to reduce the amount
of data being transmitted over the network.
Scenario:
Weak encryption protocols can expose sensitive data to attackers. Ethical hackers check if
outdated encryption algorithms like DES (Data Encryption Standard) are used and may
exploit this weakness. Tools like Wireshark or SSL Labs can be used to analyze the
encryption strength.
The session layer is responsible for establishing, managing, and terminating communication
sessions between applications. It maintains the communication state during an active session.
Examples:
Remote Desktop Protocol (RDP): When connecting to a computer remotely using RDP,
the session layer ensures the session remains open and active during the connection.
Video Conferencing: During a video call (e.g., Skype, Zoom), the session layer ensures
the session is maintained for the duration of the call.
Scenario:
An attacker can hijack a session if the session management is not handled correctly, such
as through session fixation or session hijacking. Ethical hackers often test session
integrity using tools like Hideman or Burp Suite.
The transport layer is responsible for the end-to-end communication between devices, breaking
down large messages into smaller packets and ensuring they are correctly delivered to the
destination.
Examples:
TCP (Transmission Control Protocol): TCP ensures reliable data transfer, such as when
you're sending an email or browsing a website. It establishes a connection between
devices before data is transferred and ensures packets are delivered in order.
UDP (User Datagram Protocol): Used for real-time communications like VoIP calls or
live streaming, where speed is more important than guaranteed delivery.
Scenario:
Ethical hackers often perform DoS (Denial of Service) attacks, like SYN flood attacks, at
this layer to overload a system. They also test the resilience of services that rely on UDP
to check if an attacker could disrupt them.
Examples:
IP (Internet Protocol): Every device on the Internet has a unique IP address. When you
send an email or access a website, the network layer ensures that the data reaches the
correct destination by routing it through intermediate devices like routers.
ICMP (Internet Control Message Protocol): Used by utilities like ping to test network
connectivity between devices.
Scenario:
Examples:
MAC Addresses: Devices within the same network communicate with each other using
MAC (Media Access Control) addresses. For instance, when two devices communicate
over Ethernet, the data link layer ensures the data is sent to the correct device.
Ethernet: Ethernet is a widely used technology at this layer, allowing devices to
communicate over a wired network.
Scenario:
MAC Spoofing is an attack where an attacker changes the MAC address of their device
to impersonate another device. ARP poisoning (Address Resolution Protocol) can also be
used by hackers to intercept or alter traffic on a local network.
The physical layer deals with the physical transmission of data over cables or wireless signals.
It defines the hardware devices involved in network communication, such as cables, switches,
routers, and wireless access points.
Examples:
Ethernet Cables: These cables physically transmit data between devices within a local
area network.
Wi-Fi: Wireless networks use radio waves to transmit data between devices.
Scenario:
While physical layer attacks are more difficult to execute, cable tapping or intercepting
wireless signals (Wi-Fi hacking) can provide attackers with access to network traffic.
Tools like or Wireshark can be used for wireless network analysis.