diff options
author | Matt Graeber <PowerShellMafia@users.noreply.github.com> | 2015-11-06 13:31:58 -0500 |
---|---|---|
committer | Matt Graeber <PowerShellMafia@users.noreply.github.com> | 2015-11-06 13:31:58 -0500 |
commit | 17bfa4e2762e4c8c819b36503faca2c99ae816f3 (patch) | |
tree | 26f28919af9bcd5968484f04fbe45bd9c2ba7b5e /CodeExecution | |
parent | 18b7a10f89eb5f1038c443b5b39d3a8e327fb090 (diff) | |
download | PowerSploit-17bfa4e2762e4c8c819b36503faca2c99ae816f3.tar.gz PowerSploit-17bfa4e2762e4c8c819b36503faca2c99ae816f3.zip |
Fixed a casting bug
Diffstat (limited to 'CodeExecution')
-rw-r--r-- | CodeExecution/Invoke-ReflectivePEInjection.ps1 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/CodeExecution/Invoke-ReflectivePEInjection.ps1 b/CodeExecution/Invoke-ReflectivePEInjection.ps1 index 4ca1b9d..b176d8a 100644 --- a/CodeExecution/Invoke-ReflectivePEInjection.ps1 +++ b/CodeExecution/Invoke-ReflectivePEInjection.ps1 @@ -2381,7 +2381,7 @@ $RemoteScriptBlock = { $PEInfo = Get-PEBasicInfo -PEBytes $PEBytes -Win32Types $Win32Types $OriginalImageBase = $PEInfo.OriginalImageBase $NXCompatible = $true - if (($PEInfo.DllCharacteristics -band $Win32Constants.IMAGE_DLLCHARACTERISTICS_NX_COMPAT) -ne $Win32Constants.IMAGE_DLLCHARACTERISTICS_NX_COMPAT) + if (([Int] $PEInfo.DllCharacteristics -band $Win32Constants.IMAGE_DLLCHARACTERISTICS_NX_COMPAT) -ne $Win32Constants.IMAGE_DLLCHARACTERISTICS_NX_COMPAT) { Write-Warning "PE is not compatible with DEP, might cause issues" -WarningAction Continue $NXCompatible = $false @@ -2440,7 +2440,7 @@ $RemoteScriptBlock = { #ASLR check [IntPtr]$LoadAddr = [IntPtr]::Zero - $PESupportsASLR = ($PEInfo.DllCharacteristics -band $Win32Constants.IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE) -eq $Win32Constants.IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE + $PESupportsASLR = ([Int] $PEInfo.DllCharacteristics -band $Win32Constants.IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE) -eq $Win32Constants.IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE if ((-not $ForceASLR) -and (-not $PESupportsASLR)) { Write-Warning "PE file being reflectively loaded is not ASLR compatible. If the loading fails, try restarting PowerShell and trying again OR try using the -ForceASLR flag (could cause crashes)" -WarningAction Continue |