Arion 1.0.2-alpha
A high-performance C++ framework for emulating executable binaries.
 
Loading...
Searching...
No Matches
lnx_baremetal_loader.hpp
Go to the documentation of this file.
1#ifndef ARION_LNX_BAREMETAL_LOADER_HPP
2#define ARION_LNX_BAREMETAL_LOADER_HPP
3
6#include <cstdint>
7#include <memory>
8#include <string>
9
10#define LINUX_BAREMETAL_CODE_ALIGN 0x1000
11
12#define LINUX_BAREMETAL_CODE_PERMS 0x5
13
14namespace arion
15{
16
19{
20 private:
26 ADDR map_code(std::vector<uint8_t> code);
27
28 protected:
35 void setup_specific_auxv(std::shared_ptr<LNX_LOADER_PARAMS> params, uint16_t arch_sz) override;
36
37 public:
44 LinuxBaremetalLoader(std::weak_ptr<Arion> arion, const std::vector<std::string> program_args,
45 const std::vector<std::string> program_env)
51 std::unique_ptr<LNX_LOADER_PARAMS> process() override;
52};
53
54}; // namespace arion
55
56#endif // ARION_LNX_BAREMETAL_LOADER_HPP
A Linux loader implementation for baremetal (shellcode) injection/execution without a full ELF file s...
Definition lnx_baremetal_loader.hpp:19
std::unique_ptr< LNX_LOADER_PARAMS > process() override
void setup_specific_auxv(std::shared_ptr< LNX_LOADER_PARAMS > params, uint16_t arch_sz) override
ADDR map_code(std::vector< uint8_t > code)
LinuxBaremetalLoader(std::weak_ptr< Arion > arion, const std::vector< std::string > program_args, const std::vector< std::string > program_env)
Definition lnx_baremetal_loader.hpp:44
Abstract base class for Linux-specific executable loading and setup routines.
Definition lnx_loader.hpp:121
const std::vector< std::string > program_env
Vector of environment variables.
Definition lnx_loader.hpp:146
const std::vector< std::string > program_args
Vector of command-line arguments.
Definition lnx_loader.hpp:144
Definition arch_x86-64.hpp:11
uint64_t ADDR
Identifies a memory address.
Definition global_defs.hpp:36