LIEF: Library to Instrument Executable Formats
Version 1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
install
linux
x86_64
sdk
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 <cstdint>
19
#include <memory>
20
#include <
LIEF/visibility.h
>
21
#include <
LIEF/iterators.hpp
>
22
#include <
LIEF/runtime/windows/LdrDataTableEntry.hpp
>
23
24
namespace
LIEF
{
25
namespace
runtime
{
26
namespace
windows
{
27
class
Process
;
28
29
namespace
details
{
30
class
peb;
31
}
32
45
class
LIEF_API
PEB
{
46
public
:
47
friend
class
Process
;
48
49
PEB
() =
delete
;
50
PEB
(
const
PEB
&) =
delete
;
51
PEB
&
operator=
(
const
PEB
&) =
delete
;
52
53
PEB
(
PEB
&&) noexcept;
54
PEB
& operator=(
PEB
&&) noexcept;
55
57
using
entries_it
=
iterator_range
<
LdrDataTableEntry
::Iterator>;
58
60
bool
being_debugged
() const;
61
63
uintptr_t
ldr
() const;
64
66
uintptr_t
process_parameters
() const;
67
69
uintptr_t
atl_thunk_slist_ptr
() const;
70
72
uint32_t
atl_thunk_slist_ptr32
() const;
73
76
uintptr_t
post_process_init_routine
() const;
77
79
uint32_t
session_id
() const;
80
91
entries_it
entries
() const;
92
93
~
PEB
();
94
95
private:
96
static std::unique_ptr<
PEB
> create();
97
PEB
(std::unique_ptr<
details
::peb> impl);
98
std::unique_ptr<
details
::peb> impl_;
99
};
100
101
}
102
}
103
}
104
#endif
LdrDataTableEntry.hpp
LIEF::iterator_range
Definition
iterators.hpp:603
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:40
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:57
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:47
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:29
iterators.hpp
LIEF::runtime::windows::details
Definition
LdrDataTableEntry.hpp:32
LIEF::runtime::windows
Definition
windows/Host.hpp:25
LIEF::runtime
Definition
android/Host.hpp:24
LIEF
LIEF namespace.
Definition
Abstract/Binary.hpp:41
visibility.h
LIEF_API
#define LIEF_API
Definition
visibility.h:45
Generated by
1.18.0