LIEF: Library to Instrument Executable Formats
Version 2.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
lief-install
x86_64
static
include
LIEF
runtime
windows
PEB.hpp
Go to the documentation of this file.
1
/* Copyright 2017 - 2026 R. Thomas
2
*
3
* Licensed under the Apache License, Version 2.0 (the "License");
4
* you may not use this file except in compliance with the License.
5
* You may obtain a copy of the License at
6
*
7
* http://www.apache.org/licenses/LICENSE-2.0
8
*
9
* Unless required by applicable law or agreed to in writing, software
10
* distributed under the License is distributed on an "AS IS" BASIS,
11
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
* See the License for the specific language governing permissions and
13
* limitations under the License.
14
*/
15
#ifndef LIEF_RUNTIME_WINDOWS_PEB_H
16
#define LIEF_RUNTIME_WINDOWS_PEB_H
17
#include "
LIEF/iterators.hpp
"
18
#include "
LIEF/runtime/windows/LdrDataTableEntry.hpp
"
19
#include "
LIEF/visibility.h
"
20
#include <cstdint>
21
#include <memory>
22
23
24
namespace
LIEF::runtime::windows
{
25
class
Process
;
26
27
namespace
details
{
28
class
peb;
29
}
30
43
class
LIEF_API
PEB
{
44
public
:
45
friend
class
Process
;
46
47
PEB
() =
delete
;
48
PEB
(
const
PEB
&) =
delete
;
49
PEB
&
operator=
(
const
PEB
&) =
delete
;
50
51
PEB
(
PEB
&&) noexcept;
52
PEB
& operator=(
PEB
&&) noexcept;
53
55
using
entries_it
=
iterator_range
<
LdrDataTableEntry
::Iterator>;
56
58
bool
being_debugged
() const;
59
61
uintptr_t
ldr
() const;
62
64
uintptr_t
process_parameters
() const;
65
67
uintptr_t
atl_thunk_slist_ptr
() const;
68
70
uint32_t
atl_thunk_slist_ptr32
() const;
71
74
uintptr_t
post_process_init_routine
() const;
75
77
uint32_t
session_id
() const;
78
89
entries_it
entries
() const;
90
91
~
PEB
();
92
93
private:
94
static std::unique_ptr<
PEB
> create();
95
PEB
(std::unique_ptr<
details
::peb> impl);
96
std::unique_ptr<
details
::peb> impl_;
97
};
98
99
}
100
101
102
#endif
LdrDataTableEntry.hpp
LIEF::iterator_range
Definition
iterators.hpp:680
LIEF::runtime::windows::LdrDataTableEntry
This class exposes a user-friendly interface over a LDR_DATA_TABLE_ENTRY, the structure used by the W...
Definition
LdrDataTableEntry.hpp:38
LIEF::runtime::windows::PEB::process_parameters
uintptr_t process_parameters() const
Address of the process parameters (RTL_USER_PROCESS_PARAMETERS).
LIEF::runtime::windows::PEB::session_id
uint32_t session_id() const
Session ID associated with the current process.
LIEF::runtime::windows::PEB::atl_thunk_slist_ptr
uintptr_t atl_thunk_slist_ptr() const
Address of the per-process ATL thunk SList (single-linked list).
LIEF::runtime::windows::PEB::entries_it
iterator_range< LdrDataTableEntry::Iterator > entries_it
Iterator over the LdrDataTableEntry referenced by the loader data.
Definition
PEB.hpp:55
LIEF::runtime::windows::PEB::PEB
PEB()=delete
LIEF::runtime::windows::PEB::entries
entries_it entries() const
Return a bidirectional iterator over the modules referenced by the loader data (Ldr).
LIEF::runtime::windows::PEB::Process
friend class Process
Definition
PEB.hpp:45
LIEF::runtime::windows::PEB::post_process_init_routine
uintptr_t post_process_init_routine() const
Address of the routine called once the process completed its initialization (PostProcessInitRoutine).
LIEF::runtime::windows::PEB::being_debugged
bool being_debugged() const
Whether the current process is being debugged.
LIEF::runtime::windows::PEB::operator=
PEB & operator=(const PEB &)=delete
LIEF::runtime::windows::PEB::atl_thunk_slist_ptr32
uint32_t atl_thunk_slist_ptr32() const
32-bit value of the ATL thunk SList pointer.
LIEF::runtime::windows::PEB::ldr
uintptr_t ldr() const
Address of the loader data structure (PEB_LDR_DATA).
LIEF::runtime::windows::PEB::PEB
PEB(PEB &&) noexcept
LIEF::runtime::windows::PEB::PEB
PEB(const PEB &)=delete
LIEF::runtime::windows::Process
This class exposes Windows-specific API for the current process.
Definition
windows/Process.hpp:27
iterators.hpp
LIEF::runtime::windows::details
Definition
LdrDataTableEntry.hpp:30
LIEF::runtime::windows
Definition
windows/Host.hpp:23
visibility.h
LIEF_API
#define LIEF_API
Definition
visibility.h:44
Generated by
1.19.0