01-18-2016, 03:31 AM
Yo.Â
So I kind of had an epiphany a little bit ago and tried some code moved around that I was using to invoke a type from a byte array and managed to get this snippet of code working:
Now you could work in some dynamic calling into there and it's easily fud, however obviously since you're invoking into a .Net file you cannot inject native programs into it. However, it isn't impossible.Â
This concept isn't anything new, however I didn't even consider this and since I stumbled upon it I figured I'd share it with you all! Enjoy.
So I kind of had an epiphany a little bit ago and tried some code moved around that I was using to invoke a type from a byte array and managed to get this snippet of code working:
Code:
Dim asm As Assembly = AppDomain.CurrentDomain.Load(-ByteArray-)
      Dim Metinf As MethodInfo = asm.EntryPoint
      Dim InjObj As Object = asm.CreateInstance(Metinf.Name)
      Dim prgObj As Object() = Nothing
      If (Metinf.GetParameters.Length > 0) Then
        prgObj = New Object() {New String() {Nothing}}
      End If
      Metinf.Invoke(InjObj, prgObj)
Now you could work in some dynamic calling into there and it's easily fud, however obviously since you're invoking into a .Net file you cannot inject native programs into it. However, it isn't impossible.Â
This concept isn't anything new, however I didn't even consider this and since I stumbled upon it I figured I'd share it with you all! Enjoy.