Exemple #1
0
 public void Free()
 {
     foreach (var key in AllocatedSize)
     {
         DllImport.VirtualFreeEx(Memory.pHandle, key.Key, 4096, (int)0x1000 | (int)0x2000);
     }
 }
Exemple #2
0
        public static void Execute(IntPtr address)
        {
            IntPtr _Thread = DllImport.CreateRemoteThread(Memory.pHandle, (IntPtr)null, IntPtr.Zero, address, (IntPtr)null, 0, (IntPtr)null);

            DllImport.WaitForSingleObject(_Thread, 0xFFFFFFFF);
            DllImport.CloseHandle(_Thread);
        }
Exemple #3
0
 public void Free()
 {
     foreach (KeyValuePair <IntPtr, IntPtr> key in AllocatedSize)
     {
         DllImport.VirtualFreeEx(Memory.pHandle, key.Key, 4096, 0x1000 | 0x2000);
     }
 }
Exemple #4
0
        public IntPtr AlloacNewPage(IntPtr size)
        {
            var Address = DllImport.VirtualAllocEx(Memory.pHandle, IntPtr.Zero, (IntPtr)4096, (int)0x1000 | (int)0x2000, 0x40);

            AllocatedSize.Add(Address, size);

            return(Address);
        }
Exemple #5
0
        public static void Create(IntPtr address, byte[] shellcode)
        {
            DllImport.WriteProcessMemory(Memory.pHandle, address, shellcode, shellcode.Length, 0);
            IntPtr _Thread = DllImport.CreateRemoteThread(Memory.pHandle, (IntPtr)null, IntPtr.Zero, address, (IntPtr)null, 0, (IntPtr)null);

            DllImport.WaitForSingleObject(_Thread, 0xFFFFFFFF);
            DllImport.CloseHandle(_Thread);
        }