libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
MEMORY_BASIC_INFORMATION.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
18#include "MEMORY_INFORMATION.hh"
19
24
25namespace introvirt {
26namespace windows {
27namespace nt {
28
35 public:
36 virtual uint64_t BaseAddress() const = 0;
37 virtual uint64_t AllocationBase() const = 0;
39 virtual uint64_t RegionSize() const = 0;
40 virtual MEMORY_ALLOCATION_TYPE State() const = 0;
41 virtual PAGE_PROTECTION Protect() const = 0;
42 virtual MEMORY_ALLOCATION_TYPE Type() const = 0;
43
44 static std::unique_ptr<MEMORY_BASIC_INFORMATION>
45 make_unique(const NtKernel& kernel, const guest_ptr<void>& ptr, uint32_t buffer_size);
46};
47
48} // namespace nt
49} // namespace windows
50
51namespace inject {
52
53template <>
54class GuestAllocation<windows::nt::MEMORY_BASIC_INFORMATION> final
55 : public GuestAllocationComplexBase<windows::nt::MEMORY_BASIC_INFORMATION> {
56 public:
58};
59
60} // namespace inject
61} // namespace introvirt
Definition guest_ptr.hh:88
Definition GuestAllocation.hh:179
Definition GuestAllocation.hh:31
Class for MEMORY_ALLOCATION_TYPE flags.
Definition MEMORY_ALLOCATION_TYPE.hh:54
MEMORY_BASIC_INFORMATION structure parser.
Definition MEMORY_BASIC_INFORMATION.hh:34
virtual PAGE_PROTECTION AllocationProtect() const =0
virtual PAGE_PROTECTION Protect() const =0
static std::unique_ptr< MEMORY_BASIC_INFORMATION > make_unique(const NtKernel &kernel, const guest_ptr< void > &ptr, uint32_t buffer_size)
virtual MEMORY_ALLOCATION_TYPE Type() const =0
virtual MEMORY_ALLOCATION_TYPE State() const =0
An abstract class reprseneting a more specific memory information buffer.
Definition MEMORY_INFORMATION.hh:36
virtual uint32_t buffer_size() const =0
Get the size of the buffer.
virtual guest_ptr< void > ptr() const =0
Get the address that the buffer is at.
Abstraction for the Windows NT kernel.
Definition NtKernel.hh:37
Definition PAGE_PROTECTION.hh:30
Core IntroVirt classes.
Definition Cr0.hh:20