-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6695934
commit 4ac9d39
Showing
134 changed files
with
2,200 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Fuzzing a Windows Kernel Mode Driver (KMD) | ||
|
||
This tutorial will walk you through the process of creating, building, and fuzzing a | ||
Windows Kernel Mode Driver (KMD) running on the simulated x86_64 platform on Windows 11. | ||
|
||
- [Building a Windows Image](building-windows-image/README.md) | ||
- [Create a Simics Project](create-a-project.md) | ||
- [Run and Set Up the Simulation](run-the-simulation.md) | ||
- [Run the Fuzzer](run-the-fuzzer.md) |
28 changes: 28 additions & 0 deletions
28
docs/src/tutorials/windows-kernel/building-windows-image/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Building a Simics-Compatible Windows Kernel Development VM | ||
|
||
We will use VirtualBox to create a Windows Kernel Development Virtual machine | ||
before converting the VirtualBox Virtual Disk Image (VDI) to the CRAFF format used by | ||
Simics. | ||
|
||
There are several advantages to creating the image this way: | ||
|
||
- Speed: VirtualBox runs faster than Simics and is easier to work with interactively | ||
- Compatibility: The image can be used for other purposes | ||
- Iteration: Speed and compatibility allow iterating on the image contents more quickly | ||
|
||
1. [Install VirtualBox](install-virtualbox.md) | ||
2. [Download Windows](download-windows.md) | ||
3. [Create a VM](create-a-vm.md) | ||
4. [Install Windows](install-windows.md) | ||
5. [Set Up SSH](set-up-ssh.md) | ||
6. [Enable SSH Port Forwarding in VirtualBox](enable-ssh-port-forwarding-in-virtualbox.md) | ||
7. [Change Default Shell to PowerShell](change-default-shell-to-powershell.md) | ||
8. [Installing the EWDK](installing-the-ewdk.md) | ||
9. [Installing Development Tools](installing-development-tools.md) | ||
10. [Install Simics Agent](install-simics-agent.md) | ||
11. [Clone and Build HEVD](clone-and-build-hevd.md) | ||
12. [Install the Code Signing Certificate](install-the-code-signing-certificate.md) | ||
13. [Install HEVD Driver](install-hevd-driver.md) | ||
14. [Create a Fuzz Harness](create-a-fuzz-harness.md) | ||
15. [Compile the Fuzz Harness](compile-the-fuzz-harness.md) | ||
16. [Convert the Image to CRAFF](convert-image.md) |
21 changes: 21 additions & 0 deletions
21
...als/windows-kernel/building-windows-image/change-default-shell-to-powershell.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Change Default Shell to PowerShell | ||
|
||
This is a CMD command prompt. The remainder of the tutorials for Windows will | ||
provide only PowerShell commands. To change the default shell for OpenSSH to | ||
PowerShell, run: | ||
|
||
```cmd | ||
powershell.exe -Command "New-ItemProperty -Path 'HKLM:\SOFTWARE\OpenSSH' -Name DefaultShell -Value 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' -PropertyType String -Force" | ||
``` | ||
|
||
Exiting the SSH session by running `exit`, then reconnecting with `ssh -p 2222 | ||
user@localhost` should log you into a PowerShell session by default: | ||
|
||
```txt | ||
Windows PowerShell | ||
Copyright (C) Microsoft Corporation. All rights reserved. | ||
Try the new cross-platform PowerShell https://aka.ms/pscore6 | ||
PS C:\Users\user> | ||
``` |
56 changes: 56 additions & 0 deletions
56
docs/src/tutorials/windows-kernel/building-windows-image/clone-and-build-hevd.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Clone and Build HEVD | ||
|
||
We will use [HackSys Extreme Vulnerable Driver | ||
(HEVD)](https://github.com/hacksysteam/HackSysExtremeVulnerableDriver) as our windows | ||
driver target. | ||
|
||
We'll clone HEVD into our home directory and enter the EWDK build environment. | ||
|
||
```powershell | ||
cd ~ | ||
git clone https://github.com/novafacing/HackSysExtremeVulnerableDriver -b windows-training | ||
cd HackSysExtremeVulnerableDriver/Driver | ||
W:\LaunchBuildEnv.cmd | ||
``` | ||
|
||
Now, we can go ahead and build the driver: | ||
|
||
```cmd | ||
cmake -S . -B build -DKITS_ROOT="W:\Program Files\Windows Kits\10" | ||
cmake --build build --config Release | ||
``` | ||
|
||
And exit our build environment: | ||
|
||
```cmd | ||
exit | ||
``` | ||
|
||
Back in PowerShell, check to make sure there is a release directory: | ||
|
||
```powershell | ||
ls build/HEVD/Windows/ | ||
``` | ||
|
||
You should see: | ||
|
||
|
||
```txt | ||
Directory: C:\Users\user\HackSysExtremeVulnerableDriver\Driver\build\HEVD\Windows | ||
Mode LastWriteTime Length Name | ||
---- ------------- ------ ---- | ||
d----- 12/20/2023 7:16 PM CMakeFiles | ||
d----- 12/20/2023 7:16 PM HEVD.dir | ||
d----- 12/20/2023 7:17 PM Release | ||
-a---- 12/20/2023 7:16 PM 1073 cmake_install.cmake | ||
-a---- 12/20/2023 7:17 PM 2275 hevd.cat | ||
-a---- 12/20/2023 7:17 PM 1456 HEVD.inf | ||
-a---- 12/20/2023 7:17 PM 32216 HEVD.sys | ||
-a---- 12/20/2023 7:16 PM 45308 HEVD.vcxproj | ||
-a---- 12/20/2023 7:16 PM 4117 HEVD.vcxproj.filters | ||
``` | ||
|
||
If so, we're in business! |
Oops, something went wrong.