![]() |
|
(Tut) How to make a basic .NET keylogger (C#) - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45) +--- Forum: Grayhat • Purple Team • Hybrid Security (https://hackforums.net/forumdisplay.php?fid=449) +---- Forum: Beginner Hacking (https://hackforums.net/forumdisplay.php?fid=4) +----- Forum: Hacking Tutorials (https://hackforums.net/forumdisplay.php?fid=47) +----- Thread: (Tut) How to make a basic .NET keylogger (C#) (/showthread.php?tid=6222242) |
(Tut) How to make a basic .NET keylogger (C#) - SIM-587985 - Sep 25, 2022 ![]() I will be using .NET (C#) for this tutorial. It will just be placing the logs into a text file in local app data. This is not FUD, No support can be given for this project. This is for your education only and should not be used on any PCs that you do not own. I will talk like you don't know anything about C# because I don't know a whole lot. ![]() Step Zero: Get Visual Studio Step One: Open Visual Studio-->Create a Console app (C#) Step Two: Delete everything in the box, let us start fresh. Step Three: Define the using, namespace,& class Here is what you should set your editor to look like: PHP Code We will be doing all of our coding within the -Working area- so if you want to give yourself some room, hit the enter bar a few times. Step Four: Import User32.dll and GetAsyncKeyState. GetAsyncKeyState is a windows function contained within User 32. To access it, type out the following code into your working area: PHP Code it should look like this PHP Code Step Five: Create static Main & Define where you want to save the logs. Just type this out in the -New Working area- PHP Code Now it should look like this: PHP Code Step Six: Check if Local Application Data and logs.txt exist. If not, create them. PHP Code Now it should look like this: PHP Code Step Seven: The rest of the code. PHP Code The whole thing should look like this: PHP Code The Console.Write((char)i); command is for testing purposes. Once you are done, you can add two little slashes in front to make it a comment instead of a command. (//) Step eight: Finalize and hide console box. Right click your main project (should be saved as keylogger or whatever dumb shit you named it) Select Properties And change the output type as a windows application. ![]() P.S: It is illegal to use a keylogger on someones computer without permission. It is fine to use on your own computers that you let your children use however. I know it could be done more efficiently, but this is where I'm at. RE: (Tut) How to make a basic .NET keylogger (C#) - murt - Oct 3, 2022 Lovely piece of csharp code . Good job |