libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
CreateProcessA.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/* This file is automatically generated. Do not edit. */
17#pragma once
18
19#include <cstdint>
24#include <ostream>
25#include <string>
26
27namespace introvirt {
28namespace windows {
29namespace kernel32 {
30
37class CreateProcessA final : public WindowsFunctionCall {
38 public:
41
43 void pCommandLine(const guest_ptr<char[]>& pCommandLine);
44
47
50
51 bool bInheritHandles() const;
53
54 uint32_t dwCreationFlags() const;
56
59
62
65 std::shared_ptr<STARTUPINFOA> StartupInfo();
66
69 std::shared_ptr<PROCESS_INFORMATION> ProcessInformation();
70
71 const std::string& function_name() const override;
72 const std::string& library_name() const override;
73 void write(std::ostream& os = std::cout) const override;
74 Json::Value json() const override;
75
76 bool result() const;
77 void result(bool result);
78
80 ~CreateProcessA() override;
81
82 /* Injection helper */
83 static bool
84 inject(const guest_ptr<char[]>& pApplicationName, const guest_ptr<char[]>& pCommandLine,
89
90 static constexpr int ArgumentCount = 10;
91 inline static const std::string LibraryName = "kernel32";
92 inline static const std::string FunctionName = "CreateProcessA";
93
94 private:
95 /* Injection constructor */
96 CreateProcessA(Event& event, const guest_ptr<char[]>& pApplicationName,
102
103 private:
104 guest_ptr<void> pApplicationName_;
105 guest_ptr<void> pCommandLine_;
106 mutable guest_ptr<void> pProcessAttributes_;
107 mutable guest_ptr<void> pThreadAttributes_;
108 bool bInheritHandles_;
109 uint32_t dwCreationFlags_;
110 mutable guest_ptr<void> pEnvironment_;
111 guest_ptr<void> pCurrentDirectory_;
112 guest_ptr<void> pStartupInfo_;
113 guest_ptr<void> pProcessInformation_;
114};
115
116} // namespace kernel32
117} // namespace windows
118} // namespace introvirt
Interface class for hypervisor events.
Definition Event.hh:43
Definition guest_ptr.hh:88
Definition WindowsFunctionCall.hh:31
Handler for kernel32!CreateProcessA.
Definition CreateProcessA.hh:37
void pProcessInformation(const guest_ptr< void > &pProcessInformation)
void pEnvironment(const guest_ptr< void > &pEnvironment)
std::shared_ptr< PROCESS_INFORMATION > ProcessInformation()
void write(std::ostream &os=std::cout) const override
Write out a textual representation of the function for display.
void bInheritHandles(bool bInheritHandles)
static bool inject(const guest_ptr< char[]> &pApplicationName, const guest_ptr< char[]> &pCommandLine, const guest_ptr< void > &pProcessAttributes, const guest_ptr< void > &pThreadAttributes, bool bInheritHandles, uint32_t dwCreationFlags, const guest_ptr< void > &pEnvironment, const guest_ptr< char[]> &pCurrentDirectory, const guest_ptr< void > &pStartupInfo, const guest_ptr< void > &pProcessInformation)
void pProcessAttributes(const guest_ptr< void > &pProcessAttributes)
void pCommandLine(const guest_ptr< char[]> &pCommandLine)
void pStartupInfo(const guest_ptr< void > &pStartupInfo)
static const std::string FunctionName
Definition CreateProcessA.hh:92
void pThreadAttributes(const guest_ptr< void > &pThreadAttributes)
void pApplicationName(const guest_ptr< char[]> &pApplicationName)
void pCurrentDirectory(const guest_ptr< char[]> &pCurrentDirectory)
guest_ptr< char[]> pApplicationName() const
void dwCreationFlags(uint32_t dwCreationFlags)
static constexpr int ArgumentCount
Definition CreateProcessA.hh:90
guest_ptr< void > pThreadAttributes() const
guest_ptr< char[]> pCommandLine() const
Json::Value json() const override
Get the function as Json.
guest_ptr< char[]> pCurrentDirectory() const
const std::string & library_name() const override
Get the name of the library this call is for.
guest_ptr< void > pProcessAttributes() const
std::shared_ptr< STARTUPINFOA > StartupInfo()
static const std::string LibraryName
Definition CreateProcessA.hh:91
const std::string & function_name() const override
Get the function name.
guest_ptr< void > pProcessInformation() const
Type-safe guest virtual address pointer and guest_ptr template.
Core IntroVirt classes.
Definition Cr0.hh:20