Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Keylogger

penetration testing project demonstrating keystroke logging through WebSocket-based data exfiltration and XSS vulnerabilities.

Disclaimer

This project is strictly for educational and authorized penetration testing purposes only. Unauthorized use of this tool to capture keystrokes without explicit consent is illegal. Use only in controlled lab environments with proper authorization. The authors assume no liability for misuse.

Description

This is a proof of concept that demonstrates how keystroke logging attacks work. It consists of a Go backend server that listens for WebSocket connections, and a JavaScript payload that captures keystrokes and transmits them to the server. The vulnerable HTML page shows how attackers can inject malicious scripts through XSS.

Options

Running the server with Go:

go run main.go [flags]

Flags: -ip string WebSocket listener IP (default "127.0.0.1") -port string WebSocket listener port (default "8080") -output string Output directory for log files (default "./logs") -origin string Allowed origin for WebSocket connections (default "*")

How to Use

  1. Start the server: go run main.go
  2. Open sample/vulnerable.html in your browser
  3. Enter the payload URL: http://127.0.0.1:8080/k.js
  4. Click "Load Plugin"
  5. Type something, keystrokes are logged to logs/ directory

Files

main.go Go backend server with WebSocket handler public/k.js JavaScript payload for keystroke capture sample/vulnerable.html XSS vulnerable test page go.mod Go module dependencies

Features Coming

Support for HTTPS connections Dynamic WebSocket payload script generation

About

Key Logger tool

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages