This tries to understand advanced set of keyloggers. By re-creating its functionality in parts.
- Note keystroke logs down into a key.log file
- Send those files to a local server (from server folder)
- encrypt the sent logs with a fernet key
- Encrypt the fernet keys with asymmetric encryption allowing only attacker to get access to logs
- A seperate file to generate public.pem, private.pem, and fernet.key for rsa and fernet encryption.
- Sockets - Conversing between attacker and victim
- Cryptography.fernet - Encryption of logs for transfer
- Rsa - Asymmetrical encryption of fernet keys for secure exchange
- os - Handle files e.g. delete old data
- apscheduler.schedulers.blocking - Schedule time tags on logs
- keyboard - Get keystroke data for logging
- time - Get time tags for logging
- threading - handle client and logging events in threads
- configparser - handle server config data
This requires Python to run.
- Install the the required libraries.
pip install -r requirements.txt
- Generate keys for data exfiltration.
python gen_key.py
- Start the keylogger.
python app.py
- Stop the keylogger and start the server for exfiltration.
cd server
python server.py
- Every 30minutes the client will hit the server with data.
To modify the time settings
goto timely_exfil
function in app.py