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
* Copyright 2017 - 2026 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_RUNTIME_WINDOWS_PEB_H
17
#define LIEF_RUNTIME_WINDOWS_PEB_H
18
#include "
LIEF/iterators.hpp
"
19
#include "
LIEF/runtime/windows/LdrDataTableEntry.hpp
"
20
#include "
LIEF/visibility.h
"
21
#include <cstdint>
22
#include <memory>
23
24
25
namespace
LIEF::runtime::windows
{
26
class
Process
;
27
28
namespace
details
{
29
class
peb;
30
}
31
44
class
LIEF_API
PEB
{
45
public
:
46
friend
class
Process
;
47
48
PEB
() =
delete
;
49
PEB
(
const
PEB
&) =
delete
;
50
PEB
&
operator=
(
const
PEB
&) =
delete
;
51
52
PEB
(
PEB
&&) noexcept;
53
PEB
& operator=(
PEB
&&) noexcept;
54
56
using
entries_it
=
iterator_range
<
LdrDataTableEntry
::Iterator>;
57
59
bool
being_debugged
() const;
60
62
uintptr_t
ldr
() const;
63
65
uintptr_t
process_parameters
() const;
66
68
uintptr_t
atl_thunk_slist_ptr
() const;
69
71
uint32_t
atl_thunk_slist_ptr32
() const;
72
75
uintptr_t
post_process_init_routine
() const;
76
78
uint32_t
session_id
() const;
79
90
entries_it
entries
() const;
91
92
~
PEB
();
93
94
private:
95
static std::unique_ptr<
PEB
> create();
96
PEB
(std::unique_ptr<
details
::peb> impl);
97
std::unique_ptr<
details
::peb> impl_;
98
};
99
100
}
101
102
103
#endif
LdrDataTableEntry.hpp
LIEF::iterator_range
Definition
iterators.hpp:591
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:39
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:56
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:46
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:28
iterators.hpp
LIEF::runtime::windows::details
Definition
LdrDataTableEntry.hpp:31
LIEF::runtime::windows
Definition
windows/Host.hpp:24
visibility.h
LIEF_API
#define LIEF_API
Definition
visibility.h:45
Generated by
1.18.0