Source-linked AI summary
Garlic in a Box: I2P Network Emulator
Siddique Abubakr Muntaka, Faiza Hussein, Boutros Farah, Anthony Kashi, Jacques Bou Abdo, Jacques Demerjian
TL;DR
I2P peer-selection mechanics matter because covert relay networks reuse techniques from anonymity systems, yet studying them on the live network raises ethical and reproducibility concerns. GARLIC-IN-A-BOX emulates unmodified routers in an isolated, geographically diverse network and evaluates peer selection with a two-stage model. Across five trials, the attack consistently reached the victim's eligible selection set, and the adversary was invited into tunnels at a higher rate than comparable peers.
Problem
Covert relay networks reuse anonymity-system peer-selection techniques, while live-network experiments raise ethical and reproducibility concerns.
Source: §1 · p. 1Method
The paper builds an isolated emulator of unmodified I2P routers and evaluates a two-stage peer-selection model using the victim router's own peer state.
Source: §1 · p. 1Results
ρ(agreedTo) = 1.38: the victim invited the adversary into tunnels at 1.38× the rate of comparable peers, alongside deterministic selection-stage success across five trials.
Source: §1 · p. 1, §5.3 · p. 6Takeaways & Limitations
The released platform and measurement scripts support reproducing the study and developing further research and training scenarios.
Source: §9 · p. 8Emergence must run uninterrupted; stopping and restarting mid-build leaves lower peer counts, making roughly twenty-five minutes a floor for a healthy fleet.
Source: §7 · p. 8
Abstract
from arXiv · showhide
The Invisible Internet Project (I2P) is a peer-to-peer anonymity network whose routing and peer-selection mechanics underlie a growing family of state-sponsored covert relay architectures. Studying these mechanics demands a controlled, reproducible environment. We present Garlic-in-a-Box, an installable emulator that deploys a fully isolated network of unmodified I2P Java routers on a single host or cluster of hosts. Each router runs in its own Linux network namespace. A filesystem bootstrap removes the dependency on signed reseed servers, and synthetic geographic diversity activates the same location-aware peer-selection code paths present on the live network. A fifty-router deployment across five geographic locations stabilises in about twenty-five minutes and uses roughly 21 GB of memory. To demonstrate the platform's value, we model I2P peer selection as a two-stage process and conduct a reputation attack. Across five independent trials, the attack promotes the adversary into the victim's eligible selection set with perfect consistency, and the adversary is chosen for 1.38x more tunnels than matched controls. The platform and its measurement pipeline are released to support reproducible I2P security research and hands-on cyber-defence training.
1. Introduction
I2P's peer-selection decisions shape anonymity and create an opportunity for manipulation. GARLIC-IN-A-BOX provides a controlled emulator for studying those mechanics and a safe environment for cyber-defence training.
1. Introduction
- Peer choices determine who can observe or correlate flows, making manipulation of a victim's selection process a potential threat to anonymity.Each router maintains its own reputation database and selects peers for its tunnels.Source: §1 · p. 1
- State-sponsored covert relay networks reuse anonymity-system peer-selection and relay-management techniques, making it important to understand how these networks direct traffic.The introduction cites ORB networks operated by APT28, Volt Typhoon, and SPACEHOP, and a CISA advisory identifying the ecosystems as a national security threat.Source: §1 · p. 1
- Live-network experiments raise ethical and reproducibility concerns, while manually assembled routers cannot capture realistic network-level behavior or provide a safe training environment.Source: §1 · p. 1
- GARLIC-IN-A-BOX runs unmodified I2P routers in isolated namespaces and provides researchers a controlled measurement platform and defenders a safe training range.Its contributions include a filesystem-bootstrap emulator, a two-stage peer-selection model, a profiles-based measurement method, and a five-trial reputation-attack study.Source: §1 · p. 1
2. Background and Related Work
I2P builds tunnels from peer profiles that are organized into tiers, so selection depends on locally observed peer behavior and stored bonuses. Prior research studied related mechanisms and attacks, but lacked a reusable, fully isolated testbed for the unmodified I2P router.
2. Background and Related Work
- I2P routers publish RouterInfo records to the netDb and select tunnel peers from local reputation databases; traffic travels through paired unidirectional tunnels.Tunnels are rebuilt approximately every ten minutes.Source: §2 · p. 2
- The ProfileOrganizer ranks peer profiles into fast and high-capacity tiers, while speedBonus and capacityBonus can alter standing without behavioral evidence.Herrmann and Grothoff found performance-based peer selection introduces measurable bias even when peers behave benignly.Source: §2 · p. 2
- Figure 1 traces the selection cycle from reseeding and local profile accumulation to tunnel-hop selection from the fast and high-capacity groups.GARLIC-IN-A-BOX reproduces the cycle without the external reseed dependency.Source: Figure 1 · p. 2, §2 · p. 2
- Earlier I2P studies examined crawling, attacks, profile bias, resilience, and data collection, but required bespoke testbeds; no equivalent supported the unmodified router in an isolated environment.Shadow supports Tor rather than I2P, while a reproducible 5G cyber range shows such packaging is achievable for another complex system,.Source: §2 · p. 2
3. The GARLIC-IN-A-BOX Emulator
GARLIC-IN-A-BOX deploys real I2P routers as a controlled, isolated network that operators can observe and configure. Its design combines protocol fidelity, reproducible deployment, synthetic geographic diversity, filesystem bootstrapping, and containment without external network contact.
3. The GARLIC-IN-A-BOX Emulator
- The emulator provides a complete I2P network with operator control over routers, tunnels, and peers, prioritizing fidelity, isolation, and reproducible installation.It uses the unmodified Java reference implementation and can be rebuilt from a topology file and installed from a Debian package.Source: §3 · p. 2
3.1. Architecture and Per-Router Isolation
- Each unmodified router runs in its own Linux network namespace, with separate identity, NetDB, tunnel, and peer state, allowing independent participants to coexist on one host.The deployment-stack figure depicts fifty namespace processes inside one Ubuntu guest.Source: Figure 2 · p. 2, §3.1 · p. 3
3.2. Scale and Geographic Realism
- Fifty routers span France, Germany, Japan, Lebanon, and the United States, with synthetic country and bandwidth profiles activating location-aware peer-selection logic.Five floodfills provide the NetDB backbone; fifty routers give floodfill selection diversity and non-trivial tunnel paths.Source: §3.2 · p. 3
3.3. Bootstrapping Without Signed Reseed
- A two-phase filesystem bootstrap preloads RouterInfo records to pass the known-peers threshold, then redistributes fresh records across the fleet without contacting public reseed servers.Routers ingest the updated peer view through I2P's directory watcher without restarting.Source: §3.3 · p. 3
3.4. Containment and Isolation Guarantee
- The isolated network built tunnels and exchanged I2P traffic internally, while packet captures found no external I2P traffic during hours of measurement.The namespaces have no default route to a physical interface, and the containment guarantee holds without virtualization layers.Source: §3.4 · p. 3
4. Deployment
The deployment uses a configurable 50-router topology across five geographic locations, with one floodfill per location. Synthetic geographic and bandwidth profiles activate location-aware peer selection, while the victim and attackers occupy separate subnet clusters.
4. Deployment
- Five locations each contain ten routers in a /27 subnet with one floodfill, and matching GeoIP and bandwidth profiles activate geographic diversity and the hop-per-addressblock cap.This is a study configuration, not a platform limit; the Topology Builder can generate other locations, subnets, and counts.Source: §4 · p. 3
- The Topology Builder specifies five locations, five subnets, 50 routers, and five floodfills, then produces the single JSON input to deployment.The live graph shows all 50 nodes active and identifies the five floodfills with bright outer rings.Source: Figure 4 · p. 4, Figure 5 · p. 4
- The victim and attackers occupy separate subnet clusters, so every attack-touched tunnel crosses subnet boundaries and exercises the address-diversity constraint.Figure 8 places attackers r45–r49 in the US cluster and victim r10 in a separate cluster.Source: §4 · p. 4, Figure 8 · p. 4
- The world map locates the 50 routers across France, Germany, Japan, Lebanon, and the USA, with dashed lines showing the floodfill backbone.Router 10's popup includes measurement-stability data and observed-path evidence.Source: Figure 6 · p. 4
- The churn panel configures random stop/start events on non-floodfill routers using adjustable intervals, downtime, and event count.The panel organizes the experiment lifecycle into Setup, Execution, and Campaign subtabs.Source: Figure 7 · p. 4
5. Testing
The evaluation models I2P peer selection as separate eligibility and delivery stages, measures the victim’s peer profiles, and tests a reputation attack across five trials. The attack consistently raises attacker eligibility and selection, while delivery and throughput outcomes show that selection alone does not ensure relaying.
5.1. A Two-Stage Model of Peer Selection
- Peer selection has two stages: a peer must enter the eligible set, then accept a build request and relay traffic.Stored bonuses augment measured speed and capacity, and peers clearing both thresholds enter the preferred set; delivery also depends on the peer’s acceptance rate.Source: §5.1 · p. 5
5.2. Measurement Methodology
- The measurement method reads peer profiles from disk without modifying the router, using a shutdown to flush a consistent snapshot.Each trial uses an anti-contamination gate to verify attacker bonuses are zero at baseline; pausing risks the coalescing timer overwriting injected values.Source: §5.2 · p. 5
5.3. Evaluation
- The fifty-router deployment used about 21 GB of memory, with memory the binding resource; five independent trials used a victim and matched attacker and control groups.The anti-contamination gate passed in all five trials, and the deployment stopped at fifty routers because five geographic locations made the topology representative.Source: §5.3 · pp. 5–6, Table 2 · p. 6
- Attackers received 10.76 ± 0.20 lifetime build requests versus controls’ 7.80±1.84, a 1.38 ratio; they were selected more often.Figure 10 distinguishes the request counts in its left panel from delivery-stage rejections in its right panel.Source: §5.3 · p. 6, Figure 10 · p. 6
- Attackers’ lifetime rejections were 265.8 ± 21.2 versus controls’ 77.0±16.5, a 3.45 ratio, despite receiving more build requests.The aggressive behavioral configuration led attackers to decline most builds; compromising selection is necessary, not sufficient, for traffic interception.Source: §5.3 · p. 6, Figure 10 · p. 6
- Attacker throughput was 0.127 ± 0.000 KBps versus controls’ 0.210 ± 0.072 KBps, a throughput ratio of 0.60.Under light testbed traffic, advertising a 16 MB/s bandwidth class did not raise measured throughput; injection was the effective component in this experiment.Source: §5.3 · p. 6
6. Cybersecurity and Cyberwarfare Training
GARLIC-IN-A-BOX provides a protocol-authentic environment for studying covert relay mechanics and training cyber operators. It supports configurable attack scenarios and red-team/blue-team exercises, with fresh testnets available in under thirty minutes.
6.1. Attack Scenario
- The scenario library includes reputation injection, Sybil flooding, bandwidth inflation, and churn, with templates runnable through the interface or headlessly.These scenarios examine peer profiles, netDb poisoning and floodfill recovery, bandwidth-tier selection, and tunnel-rebuild latency and anonymity-set reduction under attrition.Source: §6.1 · p. 7
6.2. Red-Team and Blue-Team Exercises
- Red teams launch scenarios while blue teams monitor telemetry, inspect profiles and logs, and locate anomalies; detected anomalies lead to debrief and defence.Undetected anomalies escalate and repeat, and a fresh testnet emerges in under thirty minutes, allowing multiple cycles in one session.Source: §6.2 · p. 7, Figure 13 · p. 7
6.3. Curriculum and Operator Readiness
- The teaching progression moves from I2P architecture and netDb mechanics to profile inspection, scenario interpretation, and countermeasure testing.Scenario History records run parameters and outcomes for after-action review.Source: §6.3 · p. 7
6. Cybersecurity and Cyberwarfare Training
- GARLIC-IN-A-BOX offers a safe, protocol-authentic setting to observe I2P peer-selection mechanics that ORB variants inherit from I2P.Operators can inspect router consoles, watch a reputation-poisoned peer rise in a victim’s profile and selection probability, and compare its log traffic signature with a legitimate peer.Source: §6 · pp. 6–7, §6.3 · p. 7
7. Lessons Learned
The emulator’s practical reliability depends on filesystem-based bootstrap and uninterrupted emergence; reliable measurement also requires careful snapshot timing, clean baselines, and live resource readings.
7. Lessons Learned
- Pairing the Phase A filesystem seed with the Phase B cross-pollination timer closes the reseed-loop failure that left some routers unable to integrate.Public reseed servers in early prototypes did not reliably integrate every router.Source: §7 · pp. 7–8
- The twenty-five-minute emergence window is a floor: pausing routers during first-tunnel construction leaves peer profiles and netDb entries half-expired and lowers peer counts after restart.Routers left undisturbed had healthier peer counts than those stopped and restarted mid-emergence.Source: §7 · p. 8
- Because a running router keeps profile data in memory, reliable on-disk measurement requires stopping it gracefully before snapshotting.Reading on-disk profiles while the router runs returned nothing and produced false negatives in early experiments.Source: §7 · p. 8
- A clean-baseline gate must run on every trial to catch injected values left over from earlier runs that can make an attack appear ineffective.A contaminated baseline produced a 9999 →9999 difference of zero.Source: §7 · p. 8
- 417 MB per router, 62% above the incorrect 257 MB estimate, came from live systemd cgroup measurement rather than partial static reading.The passage recommends measuring resource use on the running system.Source: §7 · p. 8
8. Discussion and Future Work
The discussion separates peer eligibility from traffic delivery to keep attack results interpretable. It proposes a selection-layer defense and identifies measurement, scaling, load, and scenario extensions for future work.
8. Discussion and Future Work
- Selection-stage success establishes that an adversary meets the criterion for eligibility; whether it carries traffic is a separate question with its own conditions.The authors identify selection as the prerequisite shared by a broad class of interception attempts and the more tractable point for defense.Source: §8 · p. 8
- A router could flag and discount an injected bonus that exceeds the distribution of its own legitimate measurements for that peer, while leaving earned standing untouched.The false-positive cost of this proposed defense remains to be quantified.Source: §8 · p. 8
- Future work includes authoritative tunnel-hop events for direct delivery measurement, encrypted multi-host deployment beyond roughly 90 routers, and traffic generation under realistic load.The authors also propose expanding scenarios to cover netDb eclipse and floodfill corruption.Source: §8 · p. 8
9. Conclusion
GARLIC-IN-A-BOX provides an installable environment for running unmodified I2P routers at useful scale and supports reproducible research and cyber-defence training. Its five-trial reputation-attack evaluation found deterministic selection-stage success and characterized delivery-stage behavior.
9. Conclusion
- The installable emulator runs unmodified I2P routers at useful scale with a control interface, scenario engine, and filesystem-based measurement pipeline.The platform is released with measurement scripts to support reproducing the study and further research and training.Source: §9 · p. 8
- Across five trials, the reputation attack achieved deterministic success at the selection stage and precisely characterized the delivery stage.The conclusion presents this as an evaluation of the platform.Source: §9 · p. 8
- The platform eliminates a reproducibility barrier to I2P security research and provides a protocol-authentic environment for cyber-defence exercises.The released platform and scripts support reproducing the study and building on its scenario library.Source: §9 · p. 8