Last active
January 15, 2023 01:31
-
-
Save 0xm4ud/67ba7664333c00e6b471824a262d04b3 to your computer and use it in GitHub Desktop.
WinDbg autorun
This file contains hidden or 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
Start-Process -FilePath .\Desktop\vulnAppDEP.exe -WindowStyle Hidden | |
Start-Process powershell -ArgumentList "-NoExit", "-File \tools\osed-scripts\attach-process.ps1 -process-name vulnAppDEP" -WindowStyle Hidden | |
Start-Sleep -Seconds 3 | |
$process = Get-Process -Name "DbgX.Shell" | |
Register-ObjectEvent -InputObject $process -EventName Exited -Action { | |
# Code to run when the WinDbg process exits | |
Write-Host "WinDbgX has been closed." | |
Stop-Process -Name cmd -force | |
Write-Host "Re-running Vuln program and WinDBG" | |
Start-Process powershell -ArgumentList "-NoExit", "-File c:\Users\Administrator\Desktop\autorun.ps1 -process-name vulnAppDEP" -WindowStyle Hidden | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment