Skip to content

Commit

Permalink
Version 1.2 Beta 1 with UEFI support
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidXanatos committed Feb 1, 2020
1 parent b9e8463 commit 148cef0
Show file tree
Hide file tree
Showing 304 changed files with 65,530 additions and 297 deletions.
34 changes: 20 additions & 14 deletions DCrypt/_include_/bootloader.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#define LDR_LT_EMBED_KEY 2 // use embedded key
#define LDR_LT_MESSAGE 4 // display enter password message
#define LDR_LT_DSP_PASS 8 // display '*'
#define LDR_LT_DEBUG 16 // enable debug output

#define LDR_ET_MESSAGE 1 // display error message
#define LDR_ET_REBOOT 2 // reboot after 1 second
Expand Down Expand Up @@ -38,23 +39,25 @@
#define LDR_CFG_SIGN2 0x7269DA46

typedef struct _ldr_config {
unsigned long sign1; // сигнатура для поиска загрузчика в памяти
unsigned long sign2; // сигнатура для поиска загрузчика в памяти
unsigned long ldr_ver; // версия загрузчика
unsigned char logon_type; // настройки авторизации (константы LDR_LT_x)
unsigned char error_type; // настройки действия при ошибке авторизации (константы LDR_ET_x)
unsigned char boot_type; // настройки загрузки авторизация успешно завершена (константы LDR_BT_x)
unsigned long disk_id; // ID раздела, используется при LDR_BT_DISK_ID
unsigned short options; // прочик настройки и флаги (константы LDR_OP_x)
unsigned char kbd_layout; // раскладка клавиатуры загрузчика (константы LDR_KB_x)
char eps_msg[128]; // текст сообщения запроса авторизации
char err_msg[128]; // тест сообщения ошибки авторизации
unsigned char save_mbr[512]; // сохраненный оригинальный MBR
unsigned long timeout; // таймаут авторизации (используется при включенном флаге LDR_OP_EPS_TMO)
unsigned char emb_key[64]; // встроенный в загрузчик ключ
unsigned long sign1; // signature to search for bootloader in memory
unsigned long sign2; // signature to search for bootloader in memory
unsigned long ldr_ver; // bootloader version
unsigned char logon_type; // authorization settings (constants LDR_LT_x)
unsigned char error_type; // action settings for an authorization error (constants LDR_ET_x)
unsigned char boot_type; // boot settings authorization completed successfully (constants LDR_BT_x)
unsigned long disk_id; // section ID, used with LDR_BT_DISK_ID
unsigned short options; // settings and flags (LDR_OP_x constants)
unsigned char kbd_layout; // bootloader keyboard layout (constants LDR_KB_x)
char eps_msg[128]; // message text of the authorization request
char err_msg[128]; // test authorization error message
unsigned char save_mbr[512]; // saved original MBR
unsigned long timeout; // authorization timeout (used when the LDR_OP_EPS_TMO flag is on)
unsigned char emb_key[64]; // key in the bootloader

} ldr_config;



#define E820MAX 64 // number of entries in E820MAP

#define E820_RAM 1
Expand Down Expand Up @@ -138,4 +141,7 @@ typedef struct _bd_data {

#pragma pack (pop)

// EFI
#define LDR_DCS_ID 0xDC5B // DCS boot menu id

#endif
9 changes: 5 additions & 4 deletions DCrypt/_include_/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
#define _VERSION_H_

#define DC_MAJOR_VER 1
#define DC_MINOR_VER 1
#define DC_DRIVER_VER 846 /* driver version */
#define DC_MINOR_VER 2
#define DC_DRIVER_VER 847 /* driver version */
#define DC_BOOT_VER 118 /* bootloader version */
#define DC_FILE_VER "1.1.846.118"
#define DC_PRODUCT_VER "1.1"
#define DC_UEFI_VER 200 /* uefiloader version */
#define DC_FILE_VER "1.2 Beta 1"
#define DC_PRODUCT_VER "1.2"

#endif
56 changes: 56 additions & 0 deletions DCrypt/boot/Backup/boot.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boot_hook", "vc2008_src\boot_hook.vcproj", "{272E05BF-8D8C-476F-9210-E1FE68E98DA9}"
ProjectSection(ProjectDependencies) = postProject
{D6B67094-40B7-4839-BE1F-62C636EA3525} = {D6B67094-40B7-4839-BE1F-62C636EA3525}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boot_load", "vc2008_src\boot_load.vcproj", "{41B3372A-8CF3-4697-AC8A-7FC669427D86}"
ProjectSection(ProjectDependencies) = postProject
{D6B67094-40B7-4839-BE1F-62C636EA3525} = {D6B67094-40B7-4839-BE1F-62C636EA3525}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "boot", "boot", "{032E0BC0-B01C-47CB-98A4-945C20FDA05C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pe2boot", "vc2008_src\pe2boot.vcproj", "{D6B67094-40B7-4839-BE1F-62C636EA3525}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boot_stage0", "vc2008_src\boot_stage0.vcproj", "{2FAD3A8A-9699-4423-B491-7D4789971FF2}"
ProjectSection(ProjectDependencies) = postProject
{F84A5B22-3D9C-44C5-9F91-0A06228925B6} = {F84A5B22-3D9C-44C5-9F91-0A06228925B6}
{41B3372A-8CF3-4697-AC8A-7FC669427D86} = {41B3372A-8CF3-4697-AC8A-7FC669427D86}
{272E05BF-8D8C-476F-9210-E1FE68E98DA9} = {272E05BF-8D8C-476F-9210-E1FE68E98DA9}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boot_hook_small", "vc2008_src\boot_hook_small.vcproj", "{F84A5B22-3D9C-44C5-9F91-0A06228925B6}"
ProjectSection(ProjectDependencies) = postProject
{D6B67094-40B7-4839-BE1F-62C636EA3525} = {D6B67094-40B7-4839-BE1F-62C636EA3525}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{272E05BF-8D8C-476F-9210-E1FE68E98DA9}.Release|Win32.ActiveCfg = Release|Win32
{272E05BF-8D8C-476F-9210-E1FE68E98DA9}.Release|Win32.Build.0 = Release|Win32
{41B3372A-8CF3-4697-AC8A-7FC669427D86}.Release|Win32.ActiveCfg = Release|Win32
{41B3372A-8CF3-4697-AC8A-7FC669427D86}.Release|Win32.Build.0 = Release|Win32
{D6B67094-40B7-4839-BE1F-62C636EA3525}.Release|Win32.ActiveCfg = Release|Win32
{D6B67094-40B7-4839-BE1F-62C636EA3525}.Release|Win32.Build.0 = Release|Win32
{2FAD3A8A-9699-4423-B491-7D4789971FF2}.Release|Win32.ActiveCfg = Release|Win32
{2FAD3A8A-9699-4423-B491-7D4789971FF2}.Release|Win32.Build.0 = Release|Win32
{F84A5B22-3D9C-44C5-9F91-0A06228925B6}.Release|Win32.ActiveCfg = Release|Win32
{F84A5B22-3D9C-44C5-9F91-0A06228925B6}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{41B3372A-8CF3-4697-AC8A-7FC669427D86} = {032E0BC0-B01C-47CB-98A4-945C20FDA05C}
{272E05BF-8D8C-476F-9210-E1FE68E98DA9} = {032E0BC0-B01C-47CB-98A4-945C20FDA05C}
{D6B67094-40B7-4839-BE1F-62C636EA3525} = {032E0BC0-B01C-47CB-98A4-945C20FDA05C}
{2FAD3A8A-9699-4423-B491-7D4789971FF2} = {032E0BC0-B01C-47CB-98A4-945C20FDA05C}
{F84A5B22-3D9C-44C5-9F91-0A06228925B6} = {032E0BC0-B01C-47CB-98A4-945C20FDA05C}
EndGlobalSection
EndGlobal
Binary file modified DCrypt/boot/bin/dcldr
Binary file not shown.
Binary file modified DCrypt/boot/bin/dcldr_small
Binary file not shown.
4 changes: 2 additions & 2 deletions DCrypt/boot/boot.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.489
VisualStudioVersion = 15.0.28307.705
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "boot", "boot", "{032E0BC0-B01C-47CB-98A4-945C20FDA05C}"
EndProject
Expand Down Expand Up @@ -42,6 +42,6 @@ Global
{F84A5B22-3D9C-44C5-9F91-0A06228925B6} = {032E0BC0-B01C-47CB-98A4-945C20FDA05C}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {526B4BD8-ED29-476B-AE9A-027D78C978D3}
SolutionGuid = {C2974C96-10A6-4F90-B57A-88A6A3E54CDE}
EndGlobalSection
EndGlobal
14 changes: 14 additions & 0 deletions DCrypt/changes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
[01.02.2020] - 1.2.846.118.200
[*] Project moved to Visual Studio 2017, using win 7 sdk for compatybility
[+] Added EFI bootloader
[+] Added shim bootloader to achieve secure boot compatibility (https://habr.com/ru/post/446238/)
[+] Added bootloader instalation routine for GPT partitions
[+] Integrated EFI bootloader instalation in the CLI
[*] Enabled GUI high DPI awareness
[*] Fixed boot partitions not being properly detected
[+] Added disk type display to bootloader instalation dialog
[+] Integrated EFI bootloader instalation in the GUI
[+] Error messages now provide an error string instead of a cryptic error code
[*] Fixed driver uninstall not being able to delete dcrypt.sys


[09.07.2014] - 1.1.846.118
[+] More accurate handling writing of the volume header. Reduced risk of data loss in the encryption process.
[*] Small Windows 8 compatibility bugfixes.
Expand Down
18 changes: 9 additions & 9 deletions DCrypt/crypto/crypto_fast/crypto_fast.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,30 @@
<ProjectGuid>{847784B5-6850-4A7D-91DE-D6A98BF726EA}</ProjectGuid>
<RootNamespace>crypto_fast</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand Down Expand Up @@ -79,7 +79,7 @@
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
Expand All @@ -93,7 +93,7 @@
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
Expand All @@ -105,7 +105,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
Expand All @@ -122,7 +122,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
Expand Down
6 changes: 3 additions & 3 deletions DCrypt/crypto/crypto_small/crypto_small.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
<ProjectGuid>{2604DAEE-9CA6-424A-A668-3B191AF01843}</ProjectGuid>
<RootNamespace>crypto_small</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>false</WholeProgramOptimization>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand All @@ -37,7 +37,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
Expand Down
6 changes: 3 additions & 3 deletions DCrypt/crypto/tests/crypto_test_1.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@
<ProjectGuid>{D16B5E41-9D42-4190-B699-CCAA58864856}</ProjectGuid>
<RootNamespace>crypto_test_1</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand Down
4 changes: 2 additions & 2 deletions DCrypt/crypto/tests/crypto_test_2.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
<ProjectGuid>{2CF11A71-6489-421F-A1E9-5DF1282EE632}</ProjectGuid>
<RootNamespace>crypto_test_2</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
Expand Down
Loading

0 comments on commit 148cef0

Please sign in to comment.