Hello folks, in this first howto i'll try to show how to make a simple Remote Keylogger in C++; you can find a complete (local) Keylogger in the section codes.
Let see what is a Remote Keylogger: A keylogger, in simple words, is a software that runs on a computer (usually in background:P), that catch and stores every keys pressed by the users. For Remote Keylogger instead implies that the PC, where the program is running, is not (usually) on the local network, then in a remote terminal.
To implement a remote control exists a lot of strategies, we'll see how to realize one of these, the others will simply mentioed. The main function to create a keylogger is GetAsyncKeyState; those purpose is to verify whether a given key as a parameter to the function was or was not pressed. So, we can think, that a simple keylogger can be done writing a list of 'if istructions' testing this function, indeed to capture for example lowercase, a possibile code could be:
The 'for instruction' scans the numeric rappresentation of letters from 'a' to 'z', and with the GetAsyncState function we controls if a given letter is pressed or not. PRESSED is simply a define set to –32767;
Once implemented a whole list of them (one for letters sensitive one for the case, one for numbers, and finally one for symbols), the next step is to decide how to save data obtained. Let's Suppose, as in the example above, to have registered every letters in a string (which I call Ch), we may at any time interval we set, save the contents of that string to a file.
The files managment can be done in many others methods; using Visual Studio, i've used these functions, however you can use the fstream class making all more friedly:P So, a (local) Keylogger will be simply an endless while with many if, with a temporal control to save the entire data that we've captured. In this way we can implement a simple Keylogger; no objection to expand this simple idea and add features such as, for example, the recording of the window which are interacting the user, the necessary functions can be found to the msdn site and in the source codes section in the Keylogger file.
Now we must see how to create a Remote Keylogger. As i said before, there are a lot of ways to take the Log file wich contains every pressed keys; one of these could be an email sent to us when the computer starts (if the keylogger starts every time the computer starts:P, but usually this is the case).
So, is possibile make a simple program wich will be hosts on a ftp server, wich send an e-mail every time is called by the Keylogger. Otherwise we can use the code, wrote in c++ and shown in the 'sources codes section', to send an e-mail from a pc . Another way could be hosting the file log directly on a ftp server, we'll see now this way.
Let's suppose to have an own domain (site) and that we can hosts file via ftp (i'll take for example my address: redo86.altervista.org); So, we must add some simple istructions for do this automatically.
Let's see the code:
How we can see the procedure on windows is very simple, we must open a new internet connection and give the necessary parameters to the FtpPutFile function to hosts the file; clearly the crux of this process is to have a server up to save the files, and being that according to the uses that you want to do with the log file, the everything is clearly illegal!
Well people, I hope I was clear and useful, for any doubt contact me:p
If you wanna see an entire Keylogger you can watch the code at this Link.