Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
added Endermanch's "MS-DOS Mode" (PoC)
Browse files Browse the repository at this point in the history
  • Loading branch information
khanhmuy committed Aug 3, 2021
1 parent dd1d1ba commit 5dd9963
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 4 deletions.
36 changes: 34 additions & 2 deletions library/GeneralFunctions.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ function Info {
Write-Output "- Disable ShellExperienceHost"
Write-Output "- Disable SearchUI `n"
Write-Output "Things that break (or doesn't work on) Windows 11 (will be fixed):"
Write-Output "- Disabling telemetry (Disables updates. See #7) `n`n"
Write-Output "- Remove user folders under This PC"
Write-Output "- Disabling telemetry (Disables updates. See #7)"
Write-Output "- Remove user folders under This PC `n`n"
Read-Host "Press Enter to continue"
}

Expand Down Expand Up @@ -60,3 +60,35 @@ function InstallHyperV {
}
else { Install-WindowsFeature -Name "Hyper-V" -IncludeManagementTools -WarningAction SilentlyContinue }
}

function MSDOSMode {
Write-Output '"MS-DOS Mode" for Windows 10 (PoC, made by Endermanch)'
Write-Output "This is provided WITHOUT WARRANTY OF ANY KIND and is only a Proof of Concept."
Write-Output "Big thanks to Endermanch for this and his discovery of the BCPE exploit. `n`n"

$conflocation = "$env:APPDATA\WindowsToolbox\"
$windowsdos = "https://dl.malwarewatch.org/multipurpose/Windows10DOS.zip"

Write-Output "Downloading"
Invoke-WebRequest -Uri $windowsdos -OutFile $conflocation\Windows10DOS.zip

Write-Output "Installing 7Zip4PowerShell (sorry, Expand-Archive does not support passwords)"
Install-Module 7Zip4PowerShell -Scope CurrentUser -Force -Verbose
Clear-Host
Write-Output "Extracting..."
Expand-7Zip -ArchiveFileName $conflocation\Windows10DOS.zip -TargetPath $conflocation -Password "mysubsarethebest" -Verbose

Write-Output "Copying to System32"
Copy-Item $conflocation\msdos.bat -Destination "C:\Windows\System32" -Force
Copy-Item $conflocation\win.bat -Destination "C:\Windows\System32" -Force
Copy-Item $conflocation\reboot.bat -Destination "C:\Windows\System32" -Force

Write-Output "Removing leftovers"
Remove-Item -Path $conflocation\msdos.bat -Force
Remove-Item -Path $conflocation\win.bat -Force
Remove-Item -Path $conflocation\reboot.bat -Force

Write-Output "Please use WinXEditor to add the entry to the Win+X menu"
Start-Process $conflocation\WinXEditor\WinXEditor.exe
Read-Host "Done"
}
9 changes: 7 additions & 2 deletions main.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if ( $reply -match "[yY]" ) {

Clear-Host

if ($build -lt "10.0.10240") {
if ($build -eq "10.0.10240") {
Read-Host "Sorry, your Windows version is not supported, and never will be :( . Press Enter to exit"
Exit
} elseif ($build -le "10.0.17134") {
Expand Down Expand Up @@ -239,7 +239,8 @@ $objects = @{
'7-Zip',
'WinDynamicDesktop',
'PowerToys',
'Internet Download Manager'
'Internet Download Manager',
'MS-DOS Mode for Windows 10 (Proof of Concept, made by Endermanch)'
)"
}
}
Expand Down Expand Up @@ -718,6 +719,10 @@ while ($true) {
}
}

'MS-DOS Mode for Windows 10 (Proof of Concept, made by Endermanch)' {
MSDOSMode
}

#Tweaks

#System tweaks
Expand Down

0 comments on commit 5dd9963

Please sign in to comment.