What's new
  • Visit Rebornbuddy
  • Visit Resources
  • Visit API Documentation
  • Visit Downloads
  • Visit Portal
  • Visit Panda Profiles
  • Visit LLamamMagic

Why does DemonBuddy act as a keylogger too?

akumaburn

New Member
Joined
Jul 12, 2014
Messages
88
Reaction score
1
Anyone can explain this to me?

Its hooking screenshots, keyboard presses and mouse actions... at random times too...

Most recently it accessed:

C:\Windows\System32\wisptis.exe

For a mouse hook.

It doesn't always use these only at random times/random start ups.. so i don't think its part of the normal functionality..
 
I know the combat routine I use has an option to pause movement when the user is moving or attacks when user attacks.
 
I know the combat routine I use has an option to pause movement when the user is moving or attacks when user attacks.
Thats what i thought at first.. but I don't use that option and this is the first time in a while that I have seen this behavior..

It doesnt happen on every demonbuddy launch..
 
It's the Hotkeys class.

PHP:
        #region Thread

        private static Thread _hkThread;

        private static readonly Queue<Hotkey> PendingRegistrations = new Queue<Hotkey>();
        private static readonly Queue<Hotkey> PendingUnregistrations = new Queue<Hotkey>();

        private static void EnsureThread()
        {
            if (_hkThread == null)
            {
                _hkThread = new Thread(HotkeyThread) { Name = "Hotkey Processing Loop", IsBackground = true };
                _hkThread.Start();
            }
        }

        private static void HotkeyThread()
        {
            while (true)
            {
                Hotkey[] hotkeysCopy;

                lock (_lockObj)
                {
                    while (PendingRegistrations.Count != 0)
                    {
                        Hotkey registration = PendingRegistrations.Dequeue();
                        InternalRegisterHotkey(registration);
                    }
                    while (PendingUnregistrations.Count != 0)
                    {
                        Hotkey registration = PendingUnregistrations.Dequeue();
                        InternalUnregisterHotkey(registration);
                    }

                    hotkeysCopy = HotkeysList.ToArray();
                }


                // Ok, so basically, we need to unregister the global hotkeys when the window isn't focused.
                // And re-register when it is. This is to avoid blocking other instances of the bot from being able to register the same hotkey.
                if (GetForegroundWindow() != _watchhWnd)
                {
                    foreach (Hotkey hk in hotkeysCopy)
                    {
                        InternalUnregisterHotkey(hk);
                    }
                }
                else
                {
                    // Register hotkeys!
                    foreach (Hotkey hk in hotkeysCopy)
                    {
                        InternalRegisterHotkey(hk);
                    }

                    MessagePump();
                }

                Thread.Sleep(100);
            }
        }

        private static void MessagePump()
        {
            MSG msg;
            // Use PeekMessage as it returns immediately. Doesn't block the calling thread. This means if there are no messages to get,
            // we don't block registrations/unregistrations.
            while (PeekMessage(out msg, IntPtr.Zero, WM_HOTKEY, WM_HOTKEY, 1))
            {
                Hotkey pressedHotkey = RegisteredHotkeys.FirstOrDefault(h => h.Id == (int)msg.wParam);
                if (pressedHotkey != null)
                {
                    Log.Debug(pressedHotkey.Name + " pressed.");
                    pressedHotkey.Callback(pressedHotkey);
                }
            }
        }

        #endregion
 
Last edited:
Back
Top