Dark Arts
  • index
  • BUY ME A BOOK
  • 🪄Dark Magic
    • Pentesting
      • Industry Methodologies
    • Scopes of Testing
    • Reconnaissance
      • Passive
        • WHOIS
        • DNS
          • nslookup
          • dig
        • WAF
        • Subdomain
        • Google Dork
        • Misc. Techniques
        • Leaked Passwords
      • Active
        • Browser & Plugins
        • ping & traceroute
        • fping
        • telnet & netcat
        • DNS
          • Zone Transfer
          • DNS Amplification DDoS Attack Breakdown
        • Misc. Techniques
    • Vulnerability Assessment
    • Attack Types
  • 🕷️Aragoogs Nest
    • Web Application Overview & Security
      • Security Testing
      • Common Threats & Risks
    • Web Application Architecture
      • Technologies
    • HTTP/S
      • Message
      • Request
      • Response
        • Status Code
    • Crawling/Spidering
  • 🧪Potions
    • Web Browsers
    • Computer Networking
      • Network Protocol
      • Packets
      • OSI Layer
        • Layer 3: Network
        • Layer 4: Transport
      • DNS
        • Primary-Secondary
        • Local Name Resolution
        • Domain Hierarchy
        • FQDN
        • Lookups
        • DNS Resolution
        • DNS Records
        • Security: Attack-Defense (Default)
  • 🎆Spells
    • 📜Linux Scroll
    • 📜WebShell Scroll
    • git
      • Attacks + Vulnerabilities
  • 🖼️Flaws w/ Magical Frameworks
    • Windows
      • In a Nutshell
      • CVE-2019-0708: BlueKeep
      • CVE-2017-0144: EternalBlue: MS17-010
      • Attacking Services
        • MS IIS - WebDAV
        • SMB
        • HTTP File Server (HFS)
        • Apache Tomcat Web Server
        • RDP
        • WinRM
      • File System Vulnerabilities
      • Credential Dumping
        • Password Search in Windows Configuration Files
        • Mimikatz
        • Pass-the-Hash Attack
    • Linux
      • In a Nutshell
      • CVE-2014-6271: Shellshock
      • Attacking Services
        • FTP
        • SSH
        • SAMBA
        • SMTP
        • RSYNC
      • Dumping Hashes
  • 🌼Marauder's Boost
    • Privilege Escalation
    • Windows PrivEsc
      • Windows Kernel Exploit
      • Bypassing UAC
      • Access Token Impersonation
    • Linux PrivEsc
      • Linux Kernel Exploit
      • Misconfigured Cron Jobs
      • Exploiting SUID Binaries
      • shells
      • File Permissions
  • ☠️Death Eaters
    • Post Exploitation
      • Windows
      • Linux
  • 🪄OLLIVANDERS
    • nmap
      • Host Discovery
      • Port Scan
      • Service & OS
      • NSE
      • Firewall/IDS Evasion
      • Scan Optimization
      • Misc. Methods
    • ffuf
    • Hydra
    • Metasploit Framework
      • Architecture
      • Must to Know
      • msfvenom
      • Auxiliary Modules
      • Service Enumeration
      • Vulnerability Scanning
      • Imports
      • Automating
    • Vulnerability Scanners
    • Wireshark
  • 🚂Platform 9(3/4)
    • Auth-Auth
      • Authentication
        • Password-based Authentication
        • Basic Authentication
        • Multi-factor Authentication
        • Access Token
        • Token-based Authentication
          • JWT
          • OAuth 2.0
    • Secure Headers
      • Content-Security-Policy (CSP)
    • Cryptography
      • Caesar Cipher
  • ⛲Port Pensieve
    • Enumeration
      • SMB & NetBIOS
      • SNMP
    • Wordlists
  • 🔆DUELS
    • Pivoting
    • SMB Relay Attack
  • 🗺️Marauder's Map
    • Web Application Pentesting
    • API Pentesting
      • GraphQL
        • Primer
    • Mobile Application Pentesting
  • 🎧SIDE CHANNEL
    • Side Channel Analysis
    • Timing Side-Channel Attacks
      • Vulnerable Login
  • 🥃Sky
    • Cloud Basics
    • Cloud Management
      • Shared Responsibility Model
    • Using Cloud Resources
      • Monitoring & Alerts
      • Identity & Access Management
      • Scalability & Availability
      • Solution Design
    • Cloud Providers
    • Cloud Security & Regulatory Compliance
      • Resource Protection
      • ICCA: Cloud Security & Regulatory Compliance
    • ICCA Preparation
      • Knowledge Tests
      • Lab
  • 🔷Obsidian
    • Pentest Engagement
      • Scoping
    • Pentest Ethics
      • Rules of Engagement
    • Auditing Fundamentals
      • Process/Lifecycle
      • Pentest & Security Auditing
      • GRC
      • Standards, Frameworks & Guidelines
      • From Audit to Pentest
  • 💢Threat Modeling
    • Why Threat Model?
  • 📡THREAT INTEL
    • Threat Intelligence
    • Tool Dump
  • 📱Anything-Mobile-IoT
    • Firmware
    • Firmware Analysis
      • Example: CVE-2016-1555
    • Firmware Installation/Flashing
  • 🎉Mischeif
    • Social Engineering
    • Phishing
      • GoPhish
    • Pretexting
Powered by GitBook
On this page
  • Header
  • Payload
  • Encapuslation/Decapsulation
  • Encapsulation
  • Decapsulation
  1. Potions
  2. Computer Networking

Packets

PreviousNetwork ProtocolNextOSI Layer

Last updated 9 months ago

Packets are the fundamental units of data transmitted across a network. The primary goal of networking is to enable the exchange of information between networked computers, and this information is transferred through packets. A packet is essentially a stream of bits transmitted as electrical signals over physical media such as Ethernet cables or WiFi. These signals are then interpreted as binary data (bits) that represent the information being shared.

Every packet, regardless of the protocol, follows a specific structure:

Header

The header contains protocol-specific information that ensures the receiving host can interpret the packet correctly. It includes details such as the source and destination addresses, packet length, and information necessary for the proper handling of the data.

Payload

This is the actual data being transmitted, like a segment of an email, part of a web page, or content from a file being downloaded.

This structured approach allows various protocols to facilitate communication between different hosts and handle large volumes of data seamlessly.

Encapuslation/Decapsulation

Encapsulation

Encapsulation is the process of adding headers (and sometimes trailers) to data as it moves down the layers of a network protocol stack (such as the OSI or TCP/IP model). This process ensures that data can be properly transmitted and understood by devices on a network.

At each layer, specific information is added to the data:

  • Application Layer: The data starts as application-specific information (e.g., a web request).

  • Transport Layer: A TCP or UDP header is added, containing information like port numbers, sequence numbers, and checksums.

  • Network Layer: An IP header is added, with information such as the source and destination IP addresses.

  • Data Link Layer: A frame header is added, including MAC addresses and other link-specific details.

  • Physical Layer: Finally, the data is converted to electrical, optical, or radio signals for transmission across the physical medium.

As data moves down the layers, each layer encapsulates the data from the previous layer with its own protocol information, resulting in a fully encapsulated packet, frame, or segment that can be transmitted across the network.

Decapsulation

Decapsulation is the reverse process of encapsulation, where the headers (and trailers) added during encapsulation are removed as data moves up the protocol stack on the receiving device.

As the data moves up through the layers:

  • At the Physical Layer, the electrical signals are interpreted as bits.

  • At the Data Link Layer, the frame is received, and the header is removed to reveal the encapsulated packet.

  • At the Network Layer, the IP header is removed, revealing the transport layer data (e.g., a TCP segment).

  • At the Transport Layer, the TCP or UDP header is removed, exposing the application data.

  • Finally, the Application Layer reads the data in its original form.

This decapsulation process allows the receiving host to interpret the transmitted data correctly and deliver it to the appropriate application.

🧪
Data Encapsulation and De-encapsulation ExplainedComputerNetworkingNotes
Logo