libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
SID_AND_ATTRIBUTES.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 <introvirt/core/fwd.hh>
20
21#include <introvirt/util/json/json.hh>
22
23#include <cstdint>
24#include <string>
25
26namespace introvirt {
27namespace windows {
28namespace nt {
29
48
53 public:
54 class SidAttributeFlags final {
55 public:
56 bool SE_GROUP_MANDATORY() const;
58 bool SE_GROUP_ENABLED() const;
59 bool SE_GROUP_OWNER() const;
61 bool SE_GROUP_INTEGRITY() const;
63 bool SE_GROUP_RESOURCE() const;
64 bool SE_GROUP_LOGON_ID() const;
65
66 std::string string() const;
67 uint32_t value() const { return value_; }
68 operator uint32_t() const { return value_; }
69
70 explicit SidAttributeFlags(uint32_t value) : value_(value) {}
71
72 private:
73 uint32_t value_;
74 };
75
76 virtual guest_ptr<void> SidPtr() const = 0;
77 virtual void SidPtr(const guest_ptr<void>& ptr) = 0;
78
79 virtual SidAttributeFlags Attributes() const = 0;
81
82 virtual const SID* Sid() const = 0;
83
84 virtual Json::Value json() const = 0;
85
86 virtual guest_ptr<void> ptr() const = 0;
87
88 virtual SID* Sid() = 0;
89
90 static std::shared_ptr<SID_AND_ATTRIBUTES> make_shared(const NtKernel& kernel,
91 const guest_ptr<void>& gva);
92
93 virtual ~SID_AND_ATTRIBUTES() = default;
94};
95
97
102
103} /* namespace nt */
104} /* namespace windows */
105} /* namespace introvirt */
Definition guest_ptr.hh:88
Abstraction for the Windows NT kernel.
Definition NtKernel.hh:37
SidAttributeFlags(uint32_t value)
Definition SID_AND_ATTRIBUTES.hh:70
uint32_t value() const
Definition SID_AND_ATTRIBUTES.hh:67
Definition SID_AND_ATTRIBUTES.hh:52
virtual void SidPtr(const guest_ptr< void > &ptr)=0
virtual const SID * Sid() const =0
static std::shared_ptr< SID_AND_ATTRIBUTES > make_shared(const NtKernel &kernel, const guest_ptr< void > &gva)
virtual guest_ptr< void > SidPtr() const =0
virtual Json::Value json() const =0
virtual SidAttributeFlags Attributes() const =0
virtual void Attributes(SidAttributeFlags Attributes)=0
virtual guest_ptr< void > ptr() const =0
Definition SID.hh:35
std::ostream & operator<<(std::ostream &, APPHELPCACHESERVICECLASS val)
SID_AND_ATTRIBUTES_FLAGS
Flags for the SID_AND_ATTRIBUTES Attributes member.
Definition SID_AND_ATTRIBUTES.hh:37
@ SE_GROUP_USE_FOR_DENY_ONLY
Definition SID_AND_ATTRIBUTES.hh:42
@ SE_GROUP_INTEGRITY
Definition SID_AND_ATTRIBUTES.hh:43
@ SE_GROUP_LOGON_ID
Definition SID_AND_ATTRIBUTES.hh:46
@ SE_GROUP_OWNER
Definition SID_AND_ATTRIBUTES.hh:41
@ SE_GROUP_ENABLED
Definition SID_AND_ATTRIBUTES.hh:40
@ SE_GROUP_INTEGRITY_ENABLED
Definition SID_AND_ATTRIBUTES.hh:44
@ SE_GROUP_RESOURCE
Definition SID_AND_ATTRIBUTES.hh:45
@ SE_GROUP_ENABLED_BY_DEFAULT
Definition SID_AND_ATTRIBUTES.hh:39
@ SE_GROUP_MANDATORY
Definition SID_AND_ATTRIBUTES.hh:38
const std::string & to_string(APPHELPCACHESERVICECLASS val)
Core IntroVirt classes.
Definition Cr0.hh:20