LIEF: Library to Instrument Executable Formats Version 0.16.0
Loading...
Searching...
No Matches
LoadConfigurationV6.hpp
Go to the documentation of this file.
1/* Copyright 2017 - 2024 R. Thomas
2 * Copyright 2017 - 2024 Quarkslab
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#ifndef LIEF_PE_LOAD_CONFIGURATION_V6_H
17#define LIEF_PE_LOAD_CONFIGURATION_V6_H
18#include <ostream>
19
20#include "LIEF/visibility.h"
21
23
24namespace LIEF {
25namespace PE {
26
27namespace details {
28template<class T>
30}
34 public:
35 static constexpr VERSION WIN_VERSION = VERSION::WIN_10_0_15002;
36
38
39 template<class T>
40 LIEF_LOCAL LoadConfigurationV6(const details::load_configuration_v6<T>& header);
41
42 LoadConfigurationV6& operator=(const LoadConfigurationV6&) = default;
43 LoadConfigurationV6(const LoadConfigurationV6&) = default;
44
45 VERSION version() const override {
46 return WIN_VERSION;
47 }
51 return guardrf_verify_stackpointer_function_pointer_;
52 }
53 uint32_t hotpatch_table_offset() const {
56 return hotpatch_table_offset_;
57 }
58
60 guardrf_verify_stackpointer_function_pointer_ = value;
61 }
62 void hotpatch_table_offset(uint32_t value) {
63 hotpatch_table_offset_ = value;
64 }
65
66 static bool classof(const LoadConfiguration* config) {
67 return config->version() == WIN_VERSION;
68 }
69
70 ~LoadConfigurationV6() override = default;
71
72 void accept(Visitor& visitor) const override;
73
74 std::ostream& print(std::ostream& os) const override;
75
76 protected:
77 uint64_t guardrf_verify_stackpointer_function_pointer_ = 0;
78 uint32_t hotpatch_table_offset_ = 0;
79};
80}
81}
82
83#endif
LoadConfigurationV5.hpp
LIEF::PE::LoadConfigurationV5
Load Configuration enhanced with Return Flow Guard.
Definition LoadConfigurationV5.hpp:32
LIEF::PE::LoadConfigurationV6
Load Configuration enhanced with Hotpatch and improved RFG.
Definition LoadConfigurationV6.hpp:33
LIEF::PE::LoadConfigurationV6::LoadConfigurationV6
LoadConfigurationV6(const LoadConfigurationV6 &)=default
LIEF::PE::LoadConfigurationV6::guard_rf_verify_stackpointer_function_pointer
uint64_t guard_rf_verify_stackpointer_function_pointer() const
VA of the Function verifying the stack pointer.
Definition LoadConfigurationV6.hpp:50
LIEF::PE::LoadConfigurationV6::print
std::ostream & print(std::ostream &os) const override
LIEF::PE::LoadConfigurationV6::guard_rf_verify_stackpointer_function_pointer
void guard_rf_verify_stackpointer_function_pointer(uint64_t value)
Definition LoadConfigurationV6.hpp:59
LIEF::PE::LoadConfigurationV6::LoadConfigurationV6
LoadConfigurationV6()=default
LIEF::PE::LoadConfigurationV6::accept
void accept(Visitor &visitor) const override
LIEF::PE::LoadConfigurationV6::version
VERSION version() const override
(SDK) Version of the structure
Definition LoadConfigurationV6.hpp:45
LIEF::PE::LoadConfigurationV6::classof
static bool classof(const LoadConfiguration *config)
Definition LoadConfigurationV6.hpp:66
LIEF::PE::LoadConfigurationV6::~LoadConfigurationV6
~LoadConfigurationV6() override=default
LIEF::PE::LoadConfigurationV6::LoadConfigurationV6
LoadConfigurationV6(const details::load_configuration_v6< T > &header)
LIEF::PE::LoadConfigurationV6::operator=
LoadConfigurationV6 & operator=(const LoadConfigurationV6 &)=default
LIEF::PE::LoadConfigurationV6::hotpatch_table_offset
uint32_t hotpatch_table_offset() const
Offset to the hotpatch table.
Definition LoadConfigurationV6.hpp:55
LIEF::PE::LoadConfigurationV6::hotpatch_table_offset
void hotpatch_table_offset(uint32_t value)
Definition LoadConfigurationV6.hpp:62
LIEF::PE::LoadConfiguration::version
virtual VERSION version() const
(SDK) Version of the structure
Definition LoadConfiguration.hpp:64
LIEF::PE::details
Definition CodeIntegrity.hpp:26
LIEF::PE
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
LIEF
LIEF namespace.
Definition Abstract/Binary.hpp:36
LIEF::PE::details::load_configuration_v6
Definition LoadConfigurationV6.hpp:29
visibility.h
LIEF_API
#define LIEF_API
Definition visibility.h:41
LIEF_LOCAL
#define LIEF_LOCAL
Definition visibility.h:42