A Linux loader implementation for baremetal (shellcode) injection/execution without a full ELF file structure.
More...
#include <lnx_baremetal_loader.hpp>
|
| std::weak_ptr< Arion > | arion |
| | Weak pointer back to the main Arion instance.
|
| |
| const std::vector< std::string > | program_args |
| | Vector of command-line arguments.
|
| |
| const std::vector< std::string > | program_env |
| | Vector of environment variables.
|
| |
A Linux loader implementation for baremetal (shellcode) injection/execution without a full ELF file structure.
◆ LinuxBaremetalLoader()
| arion::LinuxBaremetalLoader::LinuxBaremetalLoader |
( |
std::weak_ptr< Arion > |
arion, |
|
|
const std::vector< std::string > |
program_args, |
|
|
const std::vector< std::string > |
program_env |
|
) |
| |
|
inline |
Builder for LinuxBaremetalLoader instances.
- Parameters
-
| [in] | arion | Weak pointer to the Arion emulator instance. |
| [in] | program_args | Vector of command-line arguments. |
| [in] | program_env | Vector of environment variables. |
◆ map_code()
| ADDR arion::LinuxBaremetalLoader::map_code |
( |
std::vector< uint8_t > |
code | ) |
|
|
private |
Maps the raw machine code (shellcode) into the emulator's memory space.
- Parameters
-
| [in] | code | Vector of bytes representing the machine code. |
- Returns
- The base virtual address where the code was mapped.
◆ process()
Processes the baremetal loading, mapping the code, setting up the stack, and finalizing the loader parameters.
- Returns
- A unique pointer to the finalized loader parameters (
LNX_LOADER_PARAMS).
Implements arion::LinuxLoader.
◆ setup_specific_auxv()
| void arion::LinuxBaremetalLoader::setup_specific_auxv |
( |
std::shared_ptr< LNX_LOADER_PARAMS > |
params, |
|
|
uint16_t |
arch_sz |
|
) |
| |
|
overrideprotectedvirtual |
Sets up architecture-specific Auxiliary Vector (AUXV) entries before execution starts. This implementation is typically minimal for baremetal loading.
- Parameters
-
| [in] | params | Shared pointer to the loader parameters structure. |
| [in] | arch_sz | The size of the architecture (32 or 64 bit). |
Implements arion::LinuxLoader.
The documentation for this class was generated from the following file: