Exemplo n.º 1
0
 public static extern System.IntPtr CreateThread(
     int lpThreadAttributes,
     int dwStackSize,
     PTHREAD_START_ROUTINE lpStartAddress,
     System.IntPtr lpParameter,
     int dwCreationFlags,
     ref int lpThreadId
     );
Exemplo n.º 2
0
 public static extern bool QueueUserWorkItem(PTHREAD_START_ROUTINE Function, [In] IntPtr Context, uint Flags);
Exemplo n.º 3
0
 public static extern IntPtr CreateThread(
     [In] ref SECURITY_ATTRIBUTES lpThreadAttributes, uint dwStackSize, PTHREAD_START_ROUTINE lpStartAddress, [In] IntPtr lpParameter, THREAD dwCreationFlags,
     IntPtr lpThreadId);
Exemplo n.º 4
0
 public static extern bool QueueUserWorkItem(PTHREAD_START_ROUTINE Function, [In] IntPtr Context, WT Flags);
Exemplo n.º 5
0
        static IntPtr CreateThread_Hooked(IntPtr lpThreadAttributes, uint dwStackSize, PTHREAD_START_ROUTINE lpStartAddress, IntPtr lpParameter, uint dwCreationFlags, IntPtr lpThreadId)
        {
            try
            {
                MalMonInject This = (MalMonInject)HookRuntimeInfo.Callback;

                lock (This.Queue)
                {
                    //Time + Pid + Tid + Api + Content
                    This.Queue.Push(ActivityMonitor.FormatMessage(DateTime.Now, "CreateThread", ""));
                }
            }
            catch
            {
            }

            return(CreateThread(lpThreadAttributes, dwStackSize, lpStartAddress, lpParameter, dwCreationFlags, lpThreadId));
        }
Exemplo n.º 6
0
 static extern IntPtr CreateThread([InAttribute()] IntPtr lpThreadAttributes, uint dwStackSize, PTHREAD_START_ROUTINE lpStartAddress, [InAttribute()] IntPtr lpParameter, uint dwCreationFlags, IntPtr lpThreadId);
Exemplo n.º 7
0
 /// <summary>
 ///
 /// </summary>
 public Thread(PTHREAD_START_ROUTINE routine)
 {
     m_Routine = routine;
 }
Exemplo n.º 8
0
        static IntPtr CreateThread_Hooked(IntPtr lpThreadAttributes, uint dwStackSize, PTHREAD_START_ROUTINE lpStartAddress, IntPtr lpParameter, uint dwCreationFlags, IntPtr lpThreadId)
        {
            try
            {
                MalMonInject This = (MalMonInject)HookRuntimeInfo.Callback;

                lock (This.Queue)
                {
                    //Time + Pid + Tid + Api + Content
                    This.Queue.Push(ActivityMonitor.FormatMessage(DateTime.Now, "CreateThread", ""));
                }
            }
            catch
            {
            }

            return CreateThread(lpThreadAttributes, dwStackSize, lpStartAddress, lpParameter, dwCreationFlags, lpThreadId);
        }
Exemplo n.º 9
0
 static extern IntPtr CreateThread([InAttribute()] IntPtr lpThreadAttributes, uint dwStackSize, PTHREAD_START_ROUTINE lpStartAddress, [InAttribute()] IntPtr lpParameter, uint dwCreationFlags, IntPtr lpThreadId);