Comments (3)
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:
- Encrypt the key press and directly append it to the file (probably using some sort of stream cipher),
- Read the entire file, decrypt it, append the key press, re-encrypt the contents, write it back to disk.
Problem: Confidentiality of the Key
- 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).
- 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.
I'm not sure how to do this, any help would be appreciated. 😄
from keylogger.
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)
- obfuscate and send log file? HOT 1
- Invisible/Visible HOT 3
- Information for the log file location HOT 3
- Compiling Issue with Codeblocks HOT 1
- Python package install error HOT 1
- Hebrew and Arabic support
- Press and hold for (key)+(key) (like ctrl+c ctrl+v and other combinations) HOT 1
- I can't compile on windows, i have this, any help to understand pls HOT 2
- I am not getting any log in Ubuntu 22.04 HOT 3
- MacOS - Incompatible with arm64 chips
- The windows corrected cpp file by chatGPT
- BUG in code (cpp) HOT 2
- Don`t working on another PC HOT 1
- Program not logging when run at startup HOT 3
- Unable to compile Script HOT 2
- Remove pip repo
- Please post discussions or help questions in the discussions section, not here
- Provide compiled package(s). HOT 5
- a feature i wanna add HOT 3
- Can you make one for Windows 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keylogger.