azathoth_core/
lib.rs

1#![cfg_attr(all(not(feature = "std"), not(test)), no_std)]
2
3//! # Azathoth-core
4//! 
5//! `azathoth-core` provides low-level, platform-specific definitions and utilities used across the [Azathoth c2 framework](https://github.com/AzathothC2/)
6//! 
7//! It serves a `no_std`-compatible layer, containing:
8//! * Platform-specific structs, constants and type definitions for Windows and Linux
9//! * A `crc32` lookup table for fast hashing
10//! * The `AzError` trait error interface shared across the rest of the Azathoth Crates
11//! 
12//! > **WARNING**
13//! > This project is still in active development and may change at any time!
14//! 
15//! ## Installation
16//! * Manually, via `Cargo.toml`: `azathoth-core = "0.1.0"`
17//! * Using the `cargo` cli: `cargo add azathoth-core`
18//! 
19//! 
20//! ## Supported Platform Definitions
21//! The following structs (and related types) are included:
22//! * Windows:
23//!     * `Guid` 
24//!     * Windows Internals:
25//!         * `TEB` (Thread Environment Block)
26//!         * `PEB` (Process Environment Block)
27//!         * `RTL_USER_PROCESS_PARAMETERS`
28//!         * `UNICODE_STRING`
29//!         * `LIST_ENTRY`
30//!         * `LDR_DATA_TABLE_ENTRY`
31//!         * `PEB_LDR_DATA`
32//!     * PE/COFF structures:
33//!         * `IMAGE_DOS_HEADER`
34//!         * `IMAGE_NT_HEADERS64`
35//!         * `IMAGE_FILE_HEADER`
36//!         * `IMAGE_OPTIONAL_HEADER64`
37//!         * `IMAGE_DATA_DIRECTORY`
38//!         * `IMAGE_EXPORT_DIRECTORY`
39//!         * `IMAGE_SECTION_HEADER`
40//!         * `IMAGE_BASE_RELOCATION`
41//!         * `IMAGE_IMPORT_DESCRIPTOR`
42//!         * `IMAGE_IMPORT_DESCRIPTOR_0` (union)
43//!         * `IMAGE_THUNK_DATA64`
44//!         * `IMAGE_THUNK_DATA64_0` (union)
45//!         * `IMAGE_IMPORT_BY_NAME`
46//!         * `IMAGE_TLS_DIRECTORY64`
47//!     * `URL_COMPONENTSA`
48//!     * `RUNTIME_FUNCTION`
49//! * Linux:
50//!     * `Elf64Ehdr` (ELF64 File header)
51//!     * `Elf64Dyn` (ELF64 dynamic table entry)
52//!     * `Elf64Rela` (ELF64 Relocation entries)
53//!     * `Elf64Sym` (Symbol table entry)
54//!     * `Elf64Phdr` (ELF64 Program header)
55//!     * `Elf64Shdr` (ELF64 section header)
56
57extern crate core;
58extern crate alloc;
59
60//// Defines global error trait
61pub mod errors;
62
63/// Os-specific types, structs, consts, and function definitions
64pub mod os;
65
66mod crc_table;
67
68/// Crc32 table re-export 
69pub use crc_table::CRC32_TABLE;