Code Monkey home page Code Monkey logo

Comments (3)

93aef0ce4dd141ece6f5 avatar 93aef0ce4dd141ece6f5 commented on July 29, 2024 2

Disclaimer: I am not an expert on cryptography so take what I have stated with caution.

Depends on how you want to do it using whichever ciphering method. For example:

  1. Encrypt the key press and directly append it to the file (probably using some sort of stream cipher),
  2. Read the entire file, decrypt it, append the key press, re-encrypt the contents, write it back to disk.

Problem: Confidentiality of the Key

  1. Using asymmetric keys; generate a symmetric key to encrypt the key presses, then encrypt the symmetric key with the public key. This, in turn, creates some more problems:
  • You encrypt the symmetric key and send it to yourself to decrypt once all operations are completed but when does a keylogger complete its job?
  • Once you encrypt the symmetric key, you will not be able to decrypt it unless you also provide the private key on the victim's machine (which defeats the entire purpose of this type of method).
  1. Using a non-asymmetric method; Since the key will be lying somewhere either in memory or on disk to constantly encrypt (or decrypt), what's stopping the victim from accessing it? If you encrypt the symmetric key with something else, that key is still openly available and hence is just another iteration of the same problem. Of course, the assumption which could be made is that the victim is not competent enough to compromise this system, and if any of these instances do occur, it is not too significant as to damage your initial intentions.

Possible Solution

There could be ways to deal with such problems which would involve moving the stored data off the machine when a condition is met. A simple example, store the next key presses in memory until X keys have been pressed, encrypt the data using a public key (not really the best way to use the key like this but for the circumstances, it could suffice), send the data to yourself to decrypt using the private key.

Again, this stems yet more problems:

  • If the application is suddenly aborted (shutdown of the machine, killing of process, etc.), the data stored in memory may not make it out safely,
  • Too much traffic might be suspicious unless the data is somehow disguised under some discreet packets such as ICMP or by using HTTPS. We could assume that the victim will not have a decent firewall and ignore this.

But these are entirely different issues.

from keylogger.

GiacomoLaw avatar GiacomoLaw commented on July 29, 2024

I'm not sure how to do this, any help would be appreciated. 😄

from keylogger.

GiacomoLaw avatar GiacomoLaw commented on July 29, 2024

I closed this as I want to keep the keylogger simple, and I don't see the need for encyrptoin. Feel free to keep commenting and updating, and even make a PR about it.

However I'm closing this as I won't implement it, and it's a little to advanced for the simple keylogger I had in mind when I wrote the thing in the first place 😄

Thanks for the awesome comment @93aef0ce4dd141ece6f5!

from keylogger.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.