On this page Home Docs Operations Pivoting Overview# Pivoting allows you to route agent communication through other compromised hosts, enabling access to network segments that aren’t directly reachable from the teamserver.
Pivot Concepts# Parent-Child Agent Relationships# In JustC2, pivoting creates parent-child relationships between agents:
Parent agent — An agent with direct or relayed access to the teamserverChild agent — An agent that communicates through the parentTeamserver ←── HTTP ──→ Agent A (Parent)
│
SMB/TCP
│
Agent B (Child)Pivot Data# Each pivot relationship is tracked with:
Field Description Pivot ID Unique identifier Pivot Name Display name Parent Agent ID The agent relaying traffic Child Agent ID The agent being relayed
Setting Up a Pivot# Scenario: HTTP → SMB Chain# Agent A has a BeaconHTTP session on a host with access to the internal networkStart a BeaconSMB listener on the teamserverDeploy Agent B on an internal host, configured to connect via SMBAgent A relays Agent B’s SMB traffic to the teamserver Both agents appear in the sessions table, with Agent B shown as a child of Agent A Scenario: HTTP → TCP Chain# Agent A has a BeaconHTTP session on the perimeterStart a BeaconTCP listener Use Agent A to deploy Agent B with TCP bind configuration on an internal host The pivot forwards Agent B’s TCP traffic through Agent A’s HTTP channel Data Flow# Teamserver
↑↓ HTTP
Agent A (Parent - DMZ)
↑↓ SMB/TCP
Agent B (Child - Internal)
↑↓ SMB/TCP
Agent C (Grandchild - Secure Zone)Each hop adds latency but extends your reach into the network.
Viewing Pivots in the Graph# The Sessions Graph visualizes pivot relationships:
Lines between nodes indicate pivot connections The direction shows parent → child relationships Color coding distinguishes direct and pivoted sessions Managing Pivots# Pivot Tasks# When a parent agent packs tasks, it includes tasks for its child agents. The PivotPackData() function handles encoding child agent data for relay through the parent.
Pivot Reliability# If a parent agent goes offline, all child agents lose connectivity Consider redundant paths when possible Monitor parent agent health closely Best Practices# Plan your pivot chain before deploying — map the network segments you need to traverseKeep chains short — Each hop adds latency and reduces reliabilityUse appropriate protocols — SMB for Windows-to-Windows internal pivots, TCP for cross-platformMonitor parent agents — Parent stability is critical for all child sessionsConsider redundancy — Deploy multiple paths to critical network segmentsMatch protocols to the environment — Use SMB where SMB traffic is normal, TCP where general TCP is expected