Pivoting
Mugen supports two pivoting methods: SMB named pipes (Windows-to-Windows) and TCP transport (Windows Demon to Linux Tengu).
SMB pivot (Demon -> Demon)
Section titled “SMB pivot (Demon -> Demon)”A pivot agent runs on an intermediate host and relays traffic between the teamserver and a deeper agent over a Windows named pipe. No direct HTTP connectivity is required from the deep host to the teamserver.
Teamserver <--HTTP--> Pivot (DMZ host) <--SMB pipe--> Deep agent (internal host)1. Create an SMB listener
Section titled “1. Create an SMB listener”In the profile or via View -> Listeners -> Add -> SMB:
Listeners { Smb { Name = "smb-pivot" PipeName = "mugen_pipe" }}2. Generate an SMB payload
Section titled “2. Generate an SMB payload”Generate a Demon payload targeting the SMB listener. Deploy and execute it on the internal host.
3. Connect from a pivot session
Section titled “3. Connect from a pivot session”From an existing Demon session on the intermediate host:
pivot connect <ip_or_hostname> <pipe_name>Example:
pivot connect 10.10.10.50 mugen_pipeOn success, the internal agent appears in the session table linked to its parent pivot.
Pivot commands
Section titled “Pivot commands”| Command | Description |
|---|---|
pivot connect <ip> <pipe> |
Connect to an SMB agent |
pivot list |
List all active pivot connections |
pivot disconnect <agent_id> |
Disconnect from a pivot agent |
Disconnecting does not kill the remote agent process - it stays alive and waits for a reconnection.
TCP pivot (Demon -> Tengu)
Section titled “TCP pivot (Demon -> Tengu)”A Windows Demon agent can act as a TCP relay for a Linux Tengu child. The Tengu payload is compiled with the TCP transport and points to the parent Demon’s listening port. Traffic flows: teamserver -> Demon (Windows) -> Tengu (Linux) over a raw TCP socket.
Teamserver <--HTTP--> Demon (Windows) <--TCP--> Tengu (Linux)- Create a TCP listener via View -> Listeners -> Add -> TCP
- Generate a Tengu payload targeting that TCP listener
- Deploy the Tengu payload on the Linux target - it connects back to the Demon agent’s TCP port
- The Demon agent relays the traffic to the teamserver automatically
No commands are needed on the Demon side - relay happens transparently once the TCP listener is configured.
Session graph
Section titled “Session graph”View -> Session Graph shows the full chain visually with parent/child arrows between pivot sessions.
