libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
NtAllocateVirtualMemoryEx.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
17/* This file is automatically generated. Do not edit. */
18#pragma once
19
20#include "NtSystemCall.hh"
23
24#include <memory>
25
26namespace introvirt {
27namespace windows {
28namespace nt {
29
34 public:
35 /* Direct parameter getters */
36
42 virtual uint64_t ProcessHandle() const = 0;
48 virtual guest_ptr<void> BaseAddressPtr() const = 0;
54 virtual guest_ptr<void> RegionSizePtr() const = 0;
66 virtual PAGE_PROTECTION Protect() const = 0;
72 virtual guest_ptr<void> ParametersPtr() const = 0;
78 virtual uint32_t ParameterCount() const = 0;
79
80 /* Direct parameter setters */
81
87 virtual void ProcessHandle(uint64_t ProcessHandle) = 0;
93 virtual void BaseAddressPtr(const guest_ptr<void>& pBaseAddress) = 0;
99 virtual void RegionSizePtr(const guest_ptr<void>& pRegionSize) = 0;
111 virtual void Protect(PAGE_PROTECTION Protect) = 0;
117 virtual void ParametersPtr(const guest_ptr<void>& pParameters) = 0;
123 virtual void ParameterCount(uint32_t ParameterCount) = 0;
124
125 /* Helper methods */
126 virtual size_t BaseAddress() const = 0;
127 virtual void BaseAddress(size_t BaseAddress) = 0;
128 virtual size_t RegionSize() const = 0;
129 virtual void RegionSize(size_t RegionSize) = 0;
130
131 /*
132 * System call injection support. You probably want to use
133 * inject::system_call<NtAllocateVirtualMemoryEx>.
134 */
135 static NTSTATUS inject(uint64_t ProcessHandle, size_t& BaseAddress, size_t& RegionSize,
137 const guest_ptr<void>& pParameters, uint32_t ParameterCount);
138};
139
140} /* namespace nt */
141} /* namespace windows */
142} /* namespace introvirt */
Definition guest_ptr.hh:88
Class for MEMORY_ALLOCATION_TYPE flags.
Definition MEMORY_ALLOCATION_TYPE.hh:54
Status codes returned by Windows NT system calls.
Definition NTSTATUS.hh:34
Handler class for the NtAllocateVirtualMemoryEx system call.
Definition NtAllocateVirtualMemoryEx.hh:33
virtual guest_ptr< void > ParametersPtr() const =0
Getter for ParametersPtr.
virtual void ParameterCount(uint32_t ParameterCount)=0
Setter for ParameterCount.
virtual void ProcessHandle(uint64_t ProcessHandle)=0
Setter for ProcessHandle.
virtual PAGE_PROTECTION Protect() const =0
Getter for Protect.
virtual MEMORY_ALLOCATION_TYPE AllocationType() const =0
Getter for AllocationType.
virtual void RegionSize(size_t RegionSize)=0
virtual void RegionSizePtr(const guest_ptr< void > &pRegionSize)=0
Setter for RegionSizePtr.
static NTSTATUS inject(uint64_t ProcessHandle, size_t &BaseAddress, size_t &RegionSize, MEMORY_ALLOCATION_TYPE AllocationType, PAGE_PROTECTION Protect, const guest_ptr< void > &pParameters, uint32_t ParameterCount)
virtual uint64_t ProcessHandle() const =0
Getter for ProcessHandle.
virtual void BaseAddressPtr(const guest_ptr< void > &pBaseAddress)=0
Setter for BaseAddressPtr.
virtual guest_ptr< void > RegionSizePtr() const =0
Getter for RegionSizePtr.
virtual void BaseAddress(size_t BaseAddress)=0
virtual uint32_t ParameterCount() const =0
Getter for ParameterCount.
virtual guest_ptr< void > BaseAddressPtr() const =0
Getter for BaseAddressPtr.
virtual void ParametersPtr(const guest_ptr< void > &pParameters)=0
Setter for ParametersPtr.
virtual void AllocationType(MEMORY_ALLOCATION_TYPE AllocationType)=0
Setter for AllocationType.
virtual void Protect(PAGE_PROTECTION Protect)=0
Setter for Protect.
Base type for NT system calls.
Definition NtSystemCall.hh:29
Definition PAGE_PROTECTION.hh:30
Core IntroVirt classes.
Definition Cr0.hh:20