MCPcopy Index your code
hub / github.com/MythicAgents/poseidon

github.com/MythicAgents/poseidon @Mythic3.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release Mythic3.2 ↗ · + Follow
898 symbols 2,092 edges 235 files 224 documented · 25%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Poseidon

Poseidon Logo

Poseidon is a Golang agent that compiles into Linux and macOS x64 executables. This Poseidon instance supports Mythic 3.0.0 and will be updated as necessary. It does not support Mythic 2.3 and lower.

Poseidon's Icon

poseidon's icon made by Eucalyp from www.flaticon.com

How to install an agent in this format within Mythic

When it's time for you to test out your install or for another user to install your agent, it's pretty simple. Within Mythic you can run the mythic-cli binary to install this in one of three ways:

  • sudo ./mythic-cli install github https://github.com/user/repo to install the main branch
  • sudo ./mythic-cli install github https://github.com/user/repo branchname to install a specific branch of that repo
  • sudo ./mythic-cli install folder /path/to/local/folder/cloned/from/github to install from an already cloned down version of an agent repo

Now, you might be wondering when should you or a user do this to properly add your agent to their Mythic instance. There's no wrong answer here, just depends on your preference. The three options are:

  • Mythic is already up and going, then you can run the install script and just direct that agent's containers to start (i.e. sudo ./mythic-cli start agentName and if that agent has its own special C2 containers, you'll need to start them too via sudo ./mythic-cli start c2profileName).
  • Mythic is already up and going, but you want to minimize your steps, you can just install the agent and run sudo ./mythic-cli start. That script will first stop all of your containers, then start everything back up again. This will also bring in the new agent you just installed.
  • Mythic isn't running, you can install the script and just run sudo ./mythic-cli start.

Documentation

The Poseidon documentation source code can be found in the documenation-payload/poseidon directory. View the rendered documentation by clicking on Docs -> Agent Documentation in the upper right-hand corner of the Mythic interface.

Building Outside of Mythic

If you want to build outside of Mythic, you can use the Makefile included in the project's agent_code directory. You will need to modify the variables at the top of the Makefile to match the C2 profile information you want to build into your agent. To get all the pieces you need (like UUID and AES key), you need to build the agent within Mythic (or at least kick off an unsuccessful build), then copy that information. To find the information you need, simply go to the Payloads page and click the blue info icon. You'll see the UUID, encryption key, and any other information you need for building to put into your Makefile.

Extension points exported contracts — how you extend this code

Profile (Interface)
Profile is the primary client interface for Mythic C2 profiles This is what starts listening/beaconing [5 implementers]
Payload_Type/poseidon/poseidon/agent_code/pkg/utils/structs/definitions.go
Listtasks (Interface)
(no doc) [6 implementers]
Payload_Type/poseidon/poseidon/agent_code/listtasks/listtasks.go
Process (Interface)
Taken directly from Sliver's PS command. License file included in the folder Process - platform agnostic Process interfa [2 …
Payload_Type/poseidon/poseidon/agent_code/ps/ps.go
P2PProcessor (Interface)
P2PProcessor is baked into the agent for all P2P profiles so that egress agents can always link to P2P profiles [2 implementers]
Payload_Type/poseidon/poseidon/agent_code/pkg/utils/structs/definitions.go
JxaRun (Interface)
(no doc) [4 implementers]
Payload_Type/poseidon/poseidon/agent_code/jsimport_call/jsimport_call.go

Core symbols most depended-on inside this repo

SetError
called by 131
Payload_Type/poseidon/poseidon/agent_code/pkg/utils/structs/definitions.go
NewResponse
called by 79
Payload_Type/poseidon/poseidon/agent_code/pkg/utils/structs/definitions.go
Close
called by 62
Payload_Type/poseidon/poseidon/agent_code/keylog/keystate/keystate_unix.go
Name
called by 38
Payload_Type/poseidon/poseidon/agent_code/ps/ps.go
Contains
called by 31
Payload_Type/poseidon/poseidon/agent_code/xpc/xpc_darwin.go
String
called by 28
Payload_Type/poseidon/poseidon/agent_code/xpc/xpc_darwin.go
IncrementFailedConnection
called by 24
Payload_Type/poseidon/poseidon/agent_code/pkg/profiles/profile.go
Read
called by 24
Payload_Type/poseidon/poseidon/agent_code/keylog/keystate/keystate_unix.go

Shape

Function 426
Method 302
Struct 145
Interface 10
Class 6
TypeAlias 6
Enum 2
FuncType 1

Languages

Go96%
C3%
C++1%

Modules by API surface

Payload_Type/poseidon/poseidon/agent_code/pkg/utils/structs/definitions.go57 symbols
Payload_Type/poseidon/poseidon/agent_code/xpc/xpc_darwin.go47 symbols
Payload_Type/poseidon/poseidon/agent_code/pkg/profiles/dynamichttp.go47 symbols
Payload_Type/poseidon/poseidon/agent_code/pkg/profiles/httpx.go46 symbols
Payload_Type/poseidon/poseidon/agent_code/pkg/profiles/websocket.go28 symbols
Payload_Type/poseidon/poseidon/agent_code/pkg/profiles/poseidon_tcp.go27 symbols
Payload_Type/poseidon/poseidon/agent_code/xpc/xpc_wrapper_darwin.c21 symbols
Payload_Type/poseidon/poseidon/agent_code/ps/ps_linux.go20 symbols
Payload_Type/poseidon/poseidon/agent_code/pkg/profiles/http.go20 symbols
Payload_Type/poseidon/poseidon/agent_code/ps/ps_darwin.go19 symbols
Payload_Type/poseidon/poseidon/agent_code/pkg/profiles/profile.go18 symbols
Payload_Type/poseidon/poseidon/agent_code/ps/ps.go17 symbols

For agents

$ claude mcp add poseidon \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact