ohbh Posted March 9, 2017 Posted March 9, 2017 So I tried doing everything that is mentioned in Hak5's episode 2101, but when it goes to execute the .ps1 file, there is an error in the cmd prompt which says: Specified cast is not valid. At line:2179 char:7 + if (($PEInfo.DllCharacteristics -band $Win32Constants.IMAGE_D ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (:) [], InvalidCastException + FullyQualifiedErrorId : System.InvalidCastException When I look at the .ps1 file through my web server, the error seems to be somewhere here: [IntPtr]$LoadAddr = [IntPtr]::Zero if (($PEInfo.DllCharacteristics -band $Win32Constants.IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE) -ne $Win32Constants.IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE) { Write-Warning "PE file being reflectively loaded is not ASLR compatible. If the loading fails, try restarting PowerShell and trying again" -WarningAction Continue [IntPtr]$LoadAddr = $OriginalImageBase } Quote
ohbh Posted March 9, 2017 Author Posted March 9, 2017 1 hour ago, ohbh said: So I tried doing everything that is mentioned in Hak5's episode 2101, but when it goes to execute the .ps1 file, there is an error in the cmd prompt which says: Specified cast is not valid. At line:2179 char:7 + if (($PEInfo.DllCharacteristics -band $Win32Constants.IMAGE_D ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (:) [], InvalidCastException + FullyQualifiedErrorId : System.InvalidCastException When I look at the .ps1 file through my web server, the error seems to be somewhere here: [IntPtr]$LoadAddr = [IntPtr]::Zero if (($PEInfo.DllCharacteristics -band $Win32Constants.IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE) -ne $Win32Constants.IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE) { Write-Warning "PE file being reflectively loaded is not ASLR compatible. If the loading fails, try restarting PowerShell and trying again" -WarningAction Continue [IntPtr]$LoadAddr = $OriginalImageBase } Also, i'm using Windows 10 Quote
ohbh Posted March 9, 2017 Author Posted March 9, 2017 1 hour ago, ohbh said: So I tried doing everything that is mentioned in Hak5's episode 2101, but when it goes to execute the .ps1 file, there is an error in the cmd prompt which says: Specified cast is not valid. At line:2179 char:7 + if (($PEInfo.DllCharacteristics -band $Win32Constants.IMAGE_D ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (:) [], InvalidCastException + FullyQualifiedErrorId : System.InvalidCastException When I look at the .ps1 file through my web server, the error seems to be somewhere here: [IntPtr]$LoadAddr = [IntPtr]::Zero if (($PEInfo.DllCharacteristics -band $Win32Constants.IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE) -ne $Win32Constants.IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE) { Write-Warning "PE file being reflectively loaded is not ASLR compatible. If the loading fails, try restarting PowerShell and trying again" -WarningAction Continue [IntPtr]$LoadAddr = $OriginalImageBase } Also, i'm using Windows 10 Also, instead of using Windows 7 like the Episode 2101, i'm using Windows 10 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.