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

Cannot build PNG on Powershell for Kali #14

Open MoeR3za opened 6 years ago

MoeR3za commented 6 years ago

Apparently, This tool cannot be used on Powershell installed on Kali Linux even with dotnet installed.

Here's the log:-

PS /root/Invoke-PSImage> Invoke-PSImage -Image ./Small-mario.png -Script ./file.ps1 -O Evil.png 
Invoke-PSImage : Unable to find type [System.Web.Security.Membership].
At line:1 char:1
+ Invoke-PSImage -Image ./Small-mario.png -Script ./file.ps1 -O Evil.pn ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidOperation: (System.Web.Security.Membership:TypeName) [Invoke-PSImage], RuntimeException
+ FullyQualifiedErrorId : TypeNotFound,Invoke-PSImage

After some searching I found out that System.Web.Security.Membership is part of System.Web assembly.

Tried to Add-Type it, same issue..

Then figured out that that Assembly relies on SII, .NET Framework, while on Kali only .NET Core is available, not Framework.

I Submitted this issue just to bring this matter to your knowledge.