예제 #1
0
파일: Memory.cs 프로젝트: Boboo99/OhBoi
 public Memory(int parentProcessId)
 {
     ParentProcessId     = parentProcessId;
     ParentProcessHandle = WinApi.OpenProcess(WinApi.ProcessAccessFlags.All, false, parentProcessId);
 }
예제 #2
0
 public void ResumeProcess()
 {
     WinApi.NtResumeProcess(_handle);
 }
예제 #3
0
 public RedirectedThread(IntPtr processHandle, int threadId)
 {
     _processHandle    = processHandle;
     _threadToRedirect = WinApi.OpenThread(WinApi.ThreadAccessFlags.SET_CONTEXT | WinApi.ThreadAccessFlags.GET_CONTEXT | WinApi.ThreadAccessFlags.SUSPEND_RESUME, false, (uint)threadId);
     _shellcodeMemory  = WinApi.VirtualAllocEx(_processHandle, IntPtr.Zero, 1024, WinApi.AllocationType.Commit, WinApi.MemoryProtection.ExecuteReadWrite);
 }