Esempio n. 1
0
 public void Free()
 {
     foreach (var key in AllocatedSize)
     {
         DllImport.VirtualFreeEx(Memory.pHandle, key.Key, 4096, (int)0x1000 | (int)0x2000);
     }
 }
Esempio n. 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);
        }
Esempio n. 3
0
 public void Free()
 {
     foreach (KeyValuePair <IntPtr, IntPtr> key in AllocatedSize)
     {
         DllImport.VirtualFreeEx(Memory.pHandle, key.Key, 4096, 0x1000 | 0x2000);
     }
 }
Esempio n. 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);
        }
Esempio n. 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);
        }