A very Long time ago I created a tutorial, a C++ tutorial on how to make a simple keylogger Virus. A lot of Viewers requested me to make an Addition to the tutorial: i.e. a keylogger which sends the logged text file or string as an email (Attachment) to an email address. This is the most common term searched online in the relation to this Topic.
And please do not get me wrong. While a keylogger is often used in an unethical way its primary purpose is useful in all means, text input, hotkeys, bug tracking, etc. but also private use in form of actually logging everything whether it is personal use to secure what you have typed into a text editor in case it crashes or making sure your computer is not used by somebody else without your knowledge or watch out for your kids about what they do on the computer.
Today I have an advanced keylogger tutorial in comparison to my Video. And yes I will make a Video on this soon it will be embedded below.
However, todays method is a Little bit better from my perspective. Instead of sending an email we will be submitting the logs to a database remotely and we will also be able to Access and read the logged Information remotely.
So what you will need for this is a webspace with a MySql Database preferably with PHPMyAdmin on it because it is the easiest database management system alternatively you can do it via SSH remotely.
Let us start with the Keylogger class. For the sake of this tutorial there will be just a keylogger class which will have a Character Buffer to store chars which have been input as well as a List of tasks to submit our characters to the server.
What we will also need is two imports from user32.dll, which is a standard windows library. We will import GetAsyncKeyState, it is the same function used in my other C++ keylogger tutorial video on youtube. We will also import MapVirtualKey to map our keycodes into actual keychars.