A rust program to try and detect some types of Hardware Keyloggers.

Overview

Hardware Keylogger Detection

Warning: Certain Types of Hardware keyloggers can not be detected by this program, Passive Hardware Keyloggers are impossible to detect with software alone, as all they do is monitor the electrical signals between the keyboard and computer. Advanced Hardware keyloggers that copy usb identifiers (Such as the Hak5 key croc) Can not be currently detected with this program, although there are methods to detect these such as monitoring response times of usb commands. This is planned but not currently implemented. Note: I do not own a hardware keylogger, this program is based on research papers and not real world research, (yet).

How it works

This program logs and saves the key attributes of HID (human interface devices) upon the first time the program is run. all subsequent times the program is run, it checks these logs against the current HID devices and reports any discrepancies via a Discord webhook, along with an identifier unique to the computer. This is not a bulletproof solution by any means, but its a hell of a lot better than checking the usb ports of a large deployment of computers.

Webhook Example

The Default discord webhook setup

Todo

Short term

  • Add Timing based detection method.
  • Add Interrupt response based detection methods.
  • Add obfuscation of log file.

Long term

  • Add Wireless based detection method. (Most modern keyloggers are accessible over wifi/bluetooth)
  • Block use of the keyboard if detection is confident enough.

Dependencies

The crates used in this project.

Rusb
hidapi-rusb
serde
serde_json
chrono
mac_address (Placeholder unique ID is the computers MAC)
You might also like...
Traits for inspecting memory usage of Rust types

memuse This crate contains traits for measuring the dynamic memory usage of Rust types. About Memory-tracking is a common activity in large applicatio

Annoyed that Rust has many string types? Well it doesn't have to

generic-str The one true string type in Rust! This project intends to be a proof-of-concept for an idea I had a few months back. There is lots of unsa

Rust types for the OASIS Common Alerting Protocol (CAP)

Rust types for the OASIS Common Alerting Protocol (CAP)

A list of known SS58 account types as an enum.

A list of known SS58 account types as an enum.

🪣 Types for a `Vec`'s raw parts

raw-parts A wrapper around the decomposed parts of a VecT. This struct contains the Vec's internal pointer, length, and allocated capacity. RawParts

An unsafe botched job that doesn't rely on types being 'static lifetime.

An unsafe botched job that doesn't rely on types being 'static lifetime. Will panic if provided a 0 field struct. I will fix this when I figure out how.

A repository full of manually generated hand curated JSON files, which contain the API Types that the Discord API returns.

Discord API Types A repository full of manually generated hand curated JSON files, which contain the API Types that the Discord API returns. Also did

Application that simulates a large grid of Pokémon types fighting each other.
Application that simulates a large grid of Pokémon types fighting each other.

poke-fighting-rust Rust project that simulates a grid of Pokémon fighting with each other. Each Pokémon type is a pixel on the grid and is represented

Kalker (or
Kalker (or "kalk") is a calculator program/website that supports user-defined variables, functions, derivation, and integration

Kalker (or "kalk") is a calculator program/website that supports user-defined variables, functions, derivation, and integration. It runs on Windows, macOS, Linux, Android, and in web browsers (with WebAssembly).

Releases(0.1.1)
Owner
Expert script kiddie.
null
Small project that try to bend to world.

Small project that try to bend to world. May not be fully working, but should provide an improvable starting point. How to The only important file is

null 1 Nov 13, 2021
Hide memory artifacts using ROP and hardware breakpoints.

Description This tool is a simple PoC of how to hide memory artifacts using a ROP chain in combination with hardware breakpoints. The ROP chain will c

Kurosh Dabbagh Escalante 87 Dec 14, 2022
Solutions of Advent of Code 2021 in Rust, and some other languages.

advent-of-rust Solutions of Advent of Code 2021 in Rust, and some other languages. Puzzles Puzzle Stars Languages Day 1: Sonar Sweep ⭐ ⭐ Rust Python D

rene-d 6 Jan 7, 2023
Some tools for streaming frames to rpi-rgb-led-matrix using ZeroMQ, written in Rust.

led_matrix_zmq Some tools for streaming frames to rpi-rgb-led-matrix using ZeroMQ, written in Rust. This repository includes: Rust client and server l

Dan 2 Sep 6, 2022
Use explicit container types with Scrypto! Leverage the Rust compiler's type checking to increase security and productivity when developing Radix blueprints.

Scrypto Static Types Use explicit container types with Scrypto! Leverage the Rust compiler's type checking to increase security and productivity when

null 7 Aug 5, 2022
The most primitive and the fastest implementation of a fixed-size last-in-first-out stack on stack in Rust, for Copy-implementing types

This is the simplest and the fastest (faster than Vec!) implementation of a last-in-first-out stack data structure, on stack, when stack elements are

Yegor Bugayenko 10 Jun 18, 2023
Uindex is a data store, for data that can be parsed as sentences in some context-free language.

Uindex - Universal index Uindex is a data store, for data that can be parsed as sentences in some context-free language.

Enrique Pérez Arnaud 3 Jul 20, 2021
Gathering some metrics about github projects

rust-metrics This is an experimental project to start gathering metrics about github organizations and repositories. The goal is to get an idea of var

null 51 Apr 9, 2022
Ointers is a library for representing pointers where some bits have been stolen so that they may be used by the programmer for something else

Ointers is a library for representing pointers where some bits have been stolen so that they may be used by the programmer for something else. In effect, it's a small amount of free storage

Irrustible 8 Jun 4, 2022
Option and Either types with variants known at compile time.

Const Either Some types to allow deciding at compile time if an option contains a value or which variant from the either type is active. This might be

null 1 May 5, 2022