Skip to main content

Crate mythic

Crate mythic 

Source
Expand description

§mythic-c2

Mythic C2 agent protocol library — message encoding/decoding, AES-256-CBC-HMAC encryption, and transport abstraction.

#![no_std] compatible with alloc, suitable for embedded agent binaries.

§Quick Example

use mythic::{C2Transport, MythicAgent, MythicError};
use uuid::Uuid;

let c2 = HttpC2;
let payload_uuid = Uuid::parse_str("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee").unwrap();

let agent = MythicAgent::easy_checkin(
    payload_uuid,
    &c2,
    vec!["10.0.0.1".into()],
    Some("linux".into()),
    Some("root".into()),
    Some("web01".into()),
    Some(1337),
    Some("x86_64".into()),
    None, None, None, None, None, None,
)
.unwrap();

println!("callback UUID: {}", agent.callback_uuid());

Re-exports§

pub use agent::MythicAgent;
pub use error::MythicError;
pub use error::MythicResult;
pub use transport::C2Transport;
pub use protocol::*;

Modules§

agent
High-level agent facade — build, send, and parse Mythic protocol messages.
error
Unified error type for the full mythic-c2 lifecycle — codec, crypto, transport, protocol, task execution, and runtime.
protocol
Protocol layer — message types, wire codec, and AES-256-CBC-HMAC crypto.
transport
Transport abstraction — deliver messages to the Mythic server.