Skip to content

EDDYMENS/keylogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Experimental Windows Keylogger

Disclaimer

This project is published strictly for educational purposes. The code and concepts shared here are not to be used for malicious intent.

About

This is an experimental Windows keylogger written in C# using .NET 10.

It demonstrates how to capture global keyboard input on Windows using P/Invoke and native user32.dll functions.

If you want a detailed breakdown of how everything works internally, read the full article:

https://eddymens.com/an-experimental-keylogger-53049e4890216

Requirements

  • .NET 10 SDK
  • Windows OS (for testing)

Checking your .NET version: dotnet --version installing .NET: https://learn.microsoft.com/en-us/dotnet/core/install/windows

Running Code

dotnet run

Where is the Output?

All keystrokes are written to:

logFile.txt

Stop the Program

While running in console mode:

  • Press ESC to exit.

  • If running in background mode, use the Windows Task Manager to terminate the process (Search for KeyLogger).

Run Without Console Window (Optional)

If you want the application to run without opening a console window:

Open KeyLoggerApp.csproj and change:

<OutputType>Exe</OutputType>

to:

<OutputType>WinExe</OutputType>

Then rebuild:

dotnet build

Now the application will run silently in the background.

You will need Task Manager to terminate it.

Publish as a Single Executable (Optional)

To generate a self-contained single binary:

dotnet publish -c Release --self-contained true -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:IncludeNativeLibrariesForSelfExtract=true

The executable will be inside:

bin/Release/net10.0/win-x64/publish/

About

An experiemental Keylogger implementation in C#

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages