Skip to content

Git GitHub Desktop and Mandatory ASLR

Violet edited this page Jul 4, 2023 · 6 revisions

Git executables are among few poorly written programs that have problem with Mandatory ASLR (Address Space Layout Randomization) Exploit protection feature. When you turn on Mandatory ASLR in Microsoft Defender (which is off by default), those executables fail to run.

The same Git executables are bundled with GitHub desktop app. In order to use Git in Visual Studio Code or use GitHub desktop app, we need to exclude Git executables from Mandatory ASLR and let them bypass it. Executables can be excluded from Mandatory ASLR rebootlessly.

You can use this PowerShell command to automatically add all Git executables bundled with GitHub desktop, to the exclusion for Mandatory ASLR

Get-ChildItem -Recurse -Path "C:\Users\$env:username\AppData\Local\GitHubDesktop\*\resources\app\git\*.exe" | %{ Set-ProcessMitigation -Name $_.Name -Disable ForceRelocateImages }







C#


Clone this wiki locally