How upuneetu/implementation-of-optimistic-ack-attack-ns3 works
This project is built on ns-3 and extends its capabilities with an implementation that simulates an “Optimistic ACK” attack—a network-level exploit in which ACK packets are sent prematurely to falsely indicate successful data delivery. The simulation code is implemented within ns-3’s framework (which is organized in many modules such as core, network, applications, etc.) and the attack-specific scenario is located in the “scratch” directory (namely “optimistic-ack-simulator.cc”).
Main Components
• ns-3 Core Simulator Kernel: This includes the discrete event scheduler, simulation time management, and fundamental GUI or logging interfaces.
• Network Protocol Modules: Emphasize the layered protocol stack – the physical, MAC, network, and transport layers. In this context, highlight the TCP module where modifications for handling optimistic acknowledgments occur.
• Optimistic ACK Attack Module: Depicted as a specialized component (or enhancement) integrated with the TCP congestion control logic. It “injects” premature ACKs when running the simulation with the “--Opt-Ack” flag.
• Simulation Scenario & Configuration: Illustrated by the “scratch/optimistic-ack-simulator.cc” module, which sets up the network topology, simulation parameters (like enabling the attack and activating CSV logging), and initiates simulation runs.
• Output Data Generation: A component that captures simulation results (CSV file with congestion window vs. time) and possibly interfaces with post-processing or visualization modules.
• How the Simulation Kernel triggers events that propagate through the protocol stack.
• Output component to the simulation core to reflect its role in gathering and saving metrics, thereby creating the CSV file.
Architectural Patterns and Design Principles
• ns-3 is modular and object-oriented—each network protocol is encapsulated in its own module.
• The system follows the discrete event simulation pattern, in which events (packet transmissions, ACK receipts, etc.) interact via the simulation kernel.
• Integration points for command-line configuration (via waf) and logging/CSV export functionality.
Relevant Technologies and Frameworks
• The core ns-3 framework (C++ based) for simulation.
• The “waf” build system (shown in the file tree by “waf”, “wscript”) which orchestrates builds and execution.
• CSV output mechanism integrated in the simulation to capture the evolution of the sender’s congestion window.