Add files via upload

This commit is contained in:
drof
2023-01-14 21:33:58 +01:00
committed by GitHub
parent f9e6339c1e
commit 6934b37c0f
6 changed files with 293 additions and 0 deletions
+51
View File
@@ -0,0 +1,51 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.33130.400
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VmdtStr", "VmdtStr\VmdtStr.vcxproj", "{95CFEA70-B741-4ED4-B5D1-569CC7F92035}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|ARM = Release|ARM
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{95CFEA70-B741-4ED4-B5D1-569CC7F92035}.Debug|ARM.ActiveCfg = Debug|ARM
{95CFEA70-B741-4ED4-B5D1-569CC7F92035}.Debug|ARM.Build.0 = Debug|ARM
{95CFEA70-B741-4ED4-B5D1-569CC7F92035}.Debug|ARM.Deploy.0 = Debug|ARM
{95CFEA70-B741-4ED4-B5D1-569CC7F92035}.Debug|ARM64.ActiveCfg = Debug|ARM64
{95CFEA70-B741-4ED4-B5D1-569CC7F92035}.Debug|ARM64.Build.0 = Debug|ARM64
{95CFEA70-B741-4ED4-B5D1-569CC7F92035}.Debug|ARM64.Deploy.0 = Debug|ARM64
{95CFEA70-B741-4ED4-B5D1-569CC7F92035}.Debug|x64.ActiveCfg = Debug|x64
{95CFEA70-B741-4ED4-B5D1-569CC7F92035}.Debug|x64.Build.0 = Debug|x64
{95CFEA70-B741-4ED4-B5D1-569CC7F92035}.Debug|x64.Deploy.0 = Debug|x64
{95CFEA70-B741-4ED4-B5D1-569CC7F92035}.Debug|x86.ActiveCfg = Debug|Win32
{95CFEA70-B741-4ED4-B5D1-569CC7F92035}.Debug|x86.Build.0 = Debug|Win32
{95CFEA70-B741-4ED4-B5D1-569CC7F92035}.Debug|x86.Deploy.0 = Debug|Win32
{95CFEA70-B741-4ED4-B5D1-569CC7F92035}.Release|ARM.ActiveCfg = Release|ARM
{95CFEA70-B741-4ED4-B5D1-569CC7F92035}.Release|ARM.Build.0 = Release|ARM
{95CFEA70-B741-4ED4-B5D1-569CC7F92035}.Release|ARM.Deploy.0 = Release|ARM
{95CFEA70-B741-4ED4-B5D1-569CC7F92035}.Release|ARM64.ActiveCfg = Release|ARM64
{95CFEA70-B741-4ED4-B5D1-569CC7F92035}.Release|ARM64.Build.0 = Release|ARM64
{95CFEA70-B741-4ED4-B5D1-569CC7F92035}.Release|ARM64.Deploy.0 = Release|ARM64
{95CFEA70-B741-4ED4-B5D1-569CC7F92035}.Release|x64.ActiveCfg = Release|x64
{95CFEA70-B741-4ED4-B5D1-569CC7F92035}.Release|x64.Build.0 = Release|x64
{95CFEA70-B741-4ED4-B5D1-569CC7F92035}.Release|x64.Deploy.0 = Release|x64
{95CFEA70-B741-4ED4-B5D1-569CC7F92035}.Release|x86.ActiveCfg = Release|Win32
{95CFEA70-B741-4ED4-B5D1-569CC7F92035}.Release|x86.Build.0 = Release|Win32
{95CFEA70-B741-4ED4-B5D1-569CC7F92035}.Release|x86.Deploy.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BD053014-D2E5-481D-906C-DF0F107FFAB1}
EndGlobalSection
EndGlobal
+176
View File
@@ -0,0 +1,176 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{95CFEA70-B741-4ED4-B5D1-569CC7F92035}</ProjectGuid>
<TemplateGuid>{1bc93793-694f-48fe-9372-81e2b05556fd}</TemplateGuid>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
<Configuration>Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
<RootNamespace>VmdtStr</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
<ConfigurationType>Driver</ConfigurationType>
<DriverType>KMDF</DriverType>
<DriverTargetPlatform>Universal</DriverTargetPlatform>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
<ConfigurationType>Driver</ConfigurationType>
<DriverType>KMDF</DriverType>
<DriverTargetPlatform>Universal</DriverTargetPlatform>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
<ConfigurationType>Driver</ConfigurationType>
<DriverType>KMDF</DriverType>
<DriverTargetPlatform>Universal</DriverTargetPlatform>
<Driver_SpectreMitigation>false</Driver_SpectreMitigation>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
<ConfigurationType>Driver</ConfigurationType>
<DriverType>KMDF</DriverType>
<DriverTargetPlatform>Universal</DriverTargetPlatform>
<Driver_SpectreMitigation>false</Driver_SpectreMitigation>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
<ConfigurationType>Driver</ConfigurationType>
<DriverType>KMDF</DriverType>
<DriverTargetPlatform>Universal</DriverTargetPlatform>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
<ConfigurationType>Driver</ConfigurationType>
<DriverType>KMDF</DriverType>
<DriverTargetPlatform>Universal</DriverTargetPlatform>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
<ConfigurationType>Driver</ConfigurationType>
<DriverType>KMDF</DriverType>
<DriverTargetPlatform>Universal</DriverTargetPlatform>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
<ConfigurationType>Driver</ConfigurationType>
<DriverType>KMDF</DriverType>
<DriverTargetPlatform>Universal</DriverTargetPlatform>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
</ClCompile>
<DriverSign>
<FileDigestAlgorithm>SHA256</FileDigestAlgorithm>
</DriverSign>
<PostBuildEvent>
<Command>copy $(OutDir)VmdtStr.sys C:\shared\build\VMDTStr.sys</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<DriverSign>
<FileDigestAlgorithm>SHA256</FileDigestAlgorithm>
</DriverSign>
<PostBuildEvent>
<Command>copy $(OutDir)VmdtStr.sys C:\shared\build\VMDTStr.sys</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<FilesToPackage Include="$(TargetPath)" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.c" />
<MASM Include="vmdt.asm">
<FileType>Document</FileType>
</MASM>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
+9
View File
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="main.c" />
</ItemGroup>
<ItemGroup>
<MASM Include="vmdt.asm" />
</ItemGroup>
</Project>
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ShowAllFiles>true</ShowAllFiles>
</PropertyGroup>
</Project>
+25
View File
@@ -0,0 +1,25 @@
#include <ntddk.h>
BOOLEAN VmdtRunCheck();
VOID Msg(const char* text)
{
while (text[0] != 0)
{
__outbyte(0x2F8, text[0]);
text++;
}
}
NTSTATUS DriverEntry(PDRIVER_OBJECT drvObj, PUNICODE_STRING regPath)
{
UNREFERENCED_PARAMETER(drvObj);
UNREFERENCED_PARAMETER(regPath);
BOOLEAN checkPassed = VmdtRunCheck();
checkPassed ? Msg("(PASS) Register is cleared!\n") :
Msg("(FAIL) Register still contains bogus bits!\n");
return STATUS_FAILED_DRIVER_ENTRY;
}
+26
View File
@@ -0,0 +1,26 @@
.CODE
VmdtRunCheck PROC
push rsi
push rdi
mov rsi, 0FFFFFFFFFFFFFFFFh
str rsi
xor rdi, rdi
mov rdi, 0FFFFh
not rdi
and rsi, rdi
cmp rsi, 0
jne finish
mov ax, 1
finish:
pop rdi
pop rsi
ret
VmdtRunCheck ENDP
END