1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! # 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
//!
//! ```no_run
//! use mythic::{C2Transport, MythicAgent, MythicError};
//! use uuid::Uuid;
//!
//! # struct HttpC2;
//! # impl C2Transport for HttpC2 {
//! # fn checkin(&self, p: &str) -> Result<String, MythicError> { Ok(String::new()) }
//! # fn get_tasking(&self, p: &str) -> Result<String, MythicError> { Ok(String::new()) }
//! # fn post_response(&self, p: &str) -> Result<String, MythicError> { Ok(String::new()) }
//! # }
//! 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());
//! ```
extern crate alloc;
pub use MythicAgent;
pub use ;
pub use *;
pub use C2Transport;