LIEF: Library to Instrument Executable Formats Version 0.17.0
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
16#ifndef LIEF_PE_LOAD_CONFIGURATION_V1_H
17#define LIEF_PE_LOAD_CONFIGURATION_V1_H
38 static constexpr VERSION WIN_VERSION = VERSION::WIN_8_1;
40 enum class IMAGE_GUARD : uint32_t {
42 CF_INSTRUMENTED = 0x00000100,
43 CFW_INSTRUMENTED = 0x00000200,
44 CF_FUNCTION_TABLE_PRESENT = 0x00000400,
45 SECURITY_COOKIE_UNUSED = 0x00000800,
46 PROTECT_DELAYLOAD_IAT = 0x00001000,
47 DELAYLOAD_IAT_IN_ITS_OWN_SECTION = 0x00002000,
48 CF_EXPORT_SUPPRESSION_INFO_PRESENT = 0x00004000,
49 CF_ENABLE_EXPORT_SUPPRESSION = 0x00008000,
50 CF_LONGJUMP_TABLE_PRESENT = 0x00010000,
51 RF_INSTRUMENTED = 0x00020000,
52 RF_ENABLE = 0x00040000,
53 RF_STRICT = 0x00080000,
54 RETPOLINE_PRESENT = 0x00100000,
55 EH_CONTINUATION_TABLE_PRESENT = 0x00200000,
63 LoadConfigurationV1&
operator=(
const LoadConfigurationV1&) =
default;
72 return guard_cf_check_function_pointer_;
77 return guard_cf_dispatch_function_pointer_;
83 return guard_cf_function_table_;
89 return guard_cf_function_count_;
96 bool has(IMAGE_GUARD flag)
const;
104 guard_cf_check_function_pointer_ = check_pointer;
107 guard_cf_dispatch_function_pointer_ = dispatch_pointer;
110 guard_cf_function_table_ = guard_cf_function_table;
113 guard_cf_function_count_ = guard_cf_function_count;
119 static bool classof(
const LoadConfiguration* config) {
120 return config->
version() == WIN_VERSION;
125 void accept(Visitor& visitor)
const override;
127 std::ostream&
print(std::ostream& os)
const override;
130 uint64_t guard_cf_check_function_pointer_ = 0;
131 uint64_t guard_cf_dispatch_function_pointer_ = 0;
132 uint64_t guard_cf_function_table_ = 0;
133 uint64_t guard_cf_function_count_ = 0;
134 IMAGE_GUARD flags_ = IMAGE_GUARD::NONE;
LoadConfiguration enhanced with SEH.
Definition LoadConfigurationV0.hpp:32
LoadConfiguration enhanced with Control Flow Guard.
Definition LoadConfigurationV1.hpp:36
void guard_cf_function_count(uint64_t guard_cf_function_count)
Definition LoadConfigurationV1.hpp:112
LoadConfigurationV1(const LoadConfigurationV1 &)=default
void guard_cf_function_table(uint64_t guard_cf_function_table)
Definition LoadConfigurationV1.hpp:109
IMAGE_GUARD guard_flags() const
Control Flow Guard related flags.
Definition LoadConfigurationV1.hpp:93
uint64_t guard_cf_function_count() const
The count of unique RVAs in the LoadConfigurationV1::guard_cf_function_table.
Definition LoadConfigurationV1.hpp:88
void guard_cf_check_function_pointer(uint64_t check_pointer)
Definition LoadConfigurationV1.hpp:103
void guard_cf_dispatch_function_pointer(uint64_t dispatch_pointer)
Definition LoadConfigurationV1.hpp:106
IMAGE_GUARD
Definition LoadConfigurationV1.hpp:40
static bool classof(const LoadConfiguration *config)
Definition LoadConfigurationV1.hpp:119
LoadConfigurationV1()=default
~LoadConfigurationV1() override=default
void accept(Visitor &visitor) const override
void guard_flags(IMAGE_GUARD flags)
Definition LoadConfigurationV1.hpp:115
bool has(IMAGE_GUARD flag) const
Check if the given flag is present in LoadConfigurationV1::guard_flags.
std::ostream & print(std::ostream &os) const override
uint64_t guard_cf_check_function_pointer() const
The VA where Control Flow Guard check-function pointer is stored.
Definition LoadConfigurationV1.hpp:71
std::vector< IMAGE_GUARD > guard_cf_flags_list() const
LoadConfigurationV1::guard_flags as a list of LIEF::PE::GUARD_CF_FLAGS.
VERSION version() const override
(SDK) Version of the structure
Definition LoadConfigurationV1.hpp:66
uint64_t guard_cf_dispatch_function_pointer() const
The VA where Control Flow Guard dispatch-function pointer is stored.
Definition LoadConfigurationV1.hpp:76
LoadConfigurationV1 & operator=(const LoadConfigurationV1 &)=default
LoadConfigurationV1(const details::load_configuration_v1< T > &header)
uint64_t guard_cf_function_table() const
The VA of the sorted table of RVAs of each Control Flow Guard function in the image.
Definition LoadConfigurationV1.hpp:82
virtual VERSION version() const
(SDK) Version of the structure
Definition LoadConfiguration.hpp:64
#define ENABLE_BITMASK_OPERATORS(X)
Definition enums.hpp:24
Definition CodeIntegrity.hpp:26
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
const char * to_string(DataDirectory::TYPES e)
LIEF namespace.
Definition Abstract/Binary.hpp:36
Definition LoadConfigurationV1.hpp:31
#define LIEF_API
Definition visibility.h:41
#define LIEF_LOCAL
Definition visibility.h:42