Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NetworkHook" /> class.
        /// </summary>
        public NetworkHook(HookClientBase hookClient)
        {
            // Do not disable networking for now
            return;

            this.HookClient = hookClient;

            try
            {
                this.RecvHook = LocalHook.Create(LocalHook.GetProcAddress("ws2_32.dll", "recv"), new DRecv(MyRecv), this);
                this.SendHook = LocalHook.Create(LocalHook.GetProcAddress("ws2_32.dll", "send"), new DSend(MySend), this);
                // this.RecvFromHook = LocalHook.Create(LocalHook.GetProcAddress("ws2_32.dll", "recvfrom"), new DRecvFrom(MyRecvFrom), this);
                // this.SendToHook = LocalHook.Create(LocalHook.GetProcAddress("ws2_32.dll", "sendto"), new DSendTo(MySendTo), this);
                // this.WSARecvHook = LocalHook.Create(LocalHook.GetProcAddress("ws2_32.dll", "WSARecv"), new DWSARecv(MyWsaRecv), this);
                // this.WSASendHook = LocalHook.Create(LocalHook.GetProcAddress("ws2_32.dll", "WSASend"), new DWSASend(MyWsaSend), this);

                RecvHook.ThreadACL.SetExclusiveACL(new Int32[] { 0 });
                SendHook.ThreadACL.SetExclusiveACL(new Int32[] { 0 });
                // RecvFromHook.ThreadACL.SetExclusiveACL(new Int32[] { 0 });
                // SendToHook.ThreadACL.SetExclusiveACL(new Int32[] { 0 });
                // WSARecvHook.ThreadACL.SetExclusiveACL(new Int32[] { 0 });
                // WSASendHook.ThreadACL.SetExclusiveACL(new Int32[] { 0 });

                RemoteHooking.WakeUpProcess();

                this.HookClient.Log("Networking Disabled in Process");
            }
            catch (Exception ex)
            {
                this.HookClient.Log("Error activating network hooks", ex.ToString());
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NetworkHook" /> class.
        /// </summary>
        public NetworkHook(HookClientBase hookClient)
        {
            // Do not disable networking for now
            return;

            this.HookClient = hookClient;

            try
            {
                this.RecvHook     = HookServer.CreateHook("ws2_32.dll", "recv", new RecvDelegate(this.RecvEx), this);
                this.SendHook     = HookServer.CreateHook("ws2_32.dll", "send", new SendDelegate(this.SendEx), this);
                this.RecvFromHook = HookServer.CreateHook("ws2_32.dll", "recvfrom", new RecvFromDelegate(this.RecvFromEx), this);
                this.SendToHook   = HookServer.CreateHook("ws2_32.dll", "sendto", new SendToDelegate(this.SendToEx), this);
                this.WSARecvHook  = HookServer.CreateHook("ws2_32.dll", "WSARecv", new WSARecvDelegate(this.WsaRecvEx), this);
                this.WSASendHook  = HookServer.CreateHook("ws2_32.dll", "WSASend", new WSASendDelegate(this.WsaSendEx), this);

                RemoteHooking.WakeUpProcess();

                this.HookClient.Log("Networking Disabled in Process");
            }
            catch (Exception ex)
            {
                this.HookClient.Log("Error activating network hooks", ex.ToString());
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RandomHook" /> class.
        /// </summary>
        public RandomHook(HookClientBase hookClient)
        {
            this.HookClient = hookClient;

            return;

            this.HookClient.Log("Unrandomizer loaded");

            this.MsvcrtRandomHook    = HookServer.CreateHook("msvcrt", "rand", new MsvcrtRandomDelegate(this.MsvcrtRandomEx), this);
            this.CryptGenRandomHook  = HookServer.CreateHook("Advapi32.dll", "CryptGenRandom", new CryptGenRandomDelegate(this.CryptGenRandomEx), this);
            this.BcryptGenRandomHook = HookServer.CreateHook("Bcrypt", "BCryptGenRandom", new BcryptGenRandomDelegate(this.BCryptGenRandomEx), this);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SpeedHook" /> class.
        /// </summary>
        public SpeedHook(HookClientBase hookClient)
        {
            this.HookClient = hookClient;

            return;

            this.HookClient.Log("Speedhack loaded");

            this.SpeedUp = 3.0;

            try
            {
                this.QueryPerformanceCounterHook = HookServer.CreateHook("Kernel32.dll", "QueryPerformanceCounter", new QueryPerformanceCounterDelegate(this.QueryPerformanceCounterEx), this);
                this.GetTickCountHook            = HookServer.CreateHook("Kernel32.dll", "GetTickCount", new GetTickCountDelegate(this.GetTickCountEx), this);
                this.GetTickCount64Hook          = HookServer.CreateHook("Kernel32.dll", "GetTickCount64", new GetTickCount64Delegate(this.GetTickCount64Ex), this);
            }
            catch (Exception ex)
            {
                this.HookClient.Log("Error activating speed hooks", ex.ToString());
            }
        }
Exemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GraphicsHook" /> class.
 /// </summary>
 public GraphicsHook(HookClientBase hookClient)
 {
     this.HookClient = hookClient;
 }