libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
OBJECT_HEADER.hh
Go to the documentation of this file.
1/*
2 * Copyright 2021 Assured Information Security, Inc.
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#pragma once
17
23
26
28
29#include <cstdint>
30#include <memory>
31
32namespace introvirt {
33namespace windows {
34namespace nt {
35
43 public:
47 virtual uint8_t TypeIndex() const = 0;
48
52 virtual guest_ptr<void> Body() const = 0;
53
60 virtual const OBJECT_HEADER_CREATOR_INFO& CreatorInfo() const = 0;
61
68 virtual const OBJECT_HEADER_HANDLE_INFO& HandleInfo() const = 0;
69
76 virtual const OBJECT_HEADER_NAME_INFO& NameInfo() const = 0;
77
84 virtual const OBJECT_HEADER_PROCESS_INFO& ProcessInfo() const = 0;
85
92 virtual const OBJECT_HEADER_QUOTA_INFO& QuotaInfo() const = 0;
93
97 virtual bool has_creator_info() const = 0;
98
102 virtual bool has_handle_info() const = 0;
103
107 virtual bool has_name_info() const = 0;
108
112 virtual bool has_process_info() const = 0;
113
117 virtual bool has_quota_info() const = 0;
118
122 virtual ObjectType type() const = 0;
123
127 virtual guest_ptr<void> ptr() const = 0;
128
129 static std::unique_ptr<OBJECT_HEADER> make_unique(const NtKernel& kernel,
130 const guest_ptr<void>& ptr);
131
132 virtual ~OBJECT_HEADER() = default;
133};
134
135} /* namespace nt */
136} /* namespace windows */
137} /* namespace introvirt */
Definition guest_ptr.hh:88
Abstraction for the Windows NT kernel.
Definition NtKernel.hh:37
Class for the Windows NT OBJECT_HEADER_CREATOR_INFO structure.
Definition OBJECT_HEADER_CREATOR_INFO.hh:27
Class for the Windows NT OBJECT_HEADER_HANDLE_INFO structure.
Definition OBJECT_HEADER_HANDLE_INFO.hh:30
Class for the Windows NT OBJECT_HEADER_NAME_INFO structure.
Definition OBJECT_HEADER_NAME_INFO.hh:31
Class for the Windows NT OBJECT_HEADER_PROCESS_INFO structure.
Definition OBJECT_HEADER_PROCESS_INFO.hh:30
Class for the Windows NT OBJECT_HEADER_QUOTA_INFO structure.
Definition OBJECT_HEADER_QUOTA_INFO.hh:30
Wrapper for the Windows OBJECT_HEADER structure.
Definition OBJECT_HEADER.hh:42
static std::unique_ptr< OBJECT_HEADER > make_unique(const NtKernel &kernel, const guest_ptr< void > &ptr)
virtual bool has_quota_info() const =0
virtual const OBJECT_HEADER_NAME_INFO & NameInfo() const =0
Get the name information.
virtual ObjectType type() const =0
virtual bool has_process_info() const =0
virtual guest_ptr< void > Body() const =0
virtual const OBJECT_HEADER_PROCESS_INFO & ProcessInfo() const =0
Get the process information.
virtual bool has_creator_info() const =0
virtual guest_ptr< void > ptr() const =0
virtual const OBJECT_HEADER_CREATOR_INFO & CreatorInfo() const =0
Get the creator information.
virtual bool has_handle_info() const =0
virtual const OBJECT_HEADER_QUOTA_INFO & QuotaInfo() const =0
Get the quota information.
virtual const OBJECT_HEADER_HANDLE_INFO & HandleInfo() const =0
Get the handle information.
virtual bool has_name_info() const =0
virtual uint8_t TypeIndex() const =0
Get the index into the Type table.
Type-safe guest virtual address pointer and guest_ptr template.
ObjectType
Enum for Windows kernel object types.
Definition ObjectType.hh:31
Core IntroVirt classes.
Definition Cr0.hh:20