Skip to content

thepiyushkumarshukla/LinDLocker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🔒 LinDLocker ( Linux Directory Locker )

lindlocker

Requires: Root access, Linux kernel with LUKS support

🚀 What is LinDLocker?

LinDLocker is a powerful bash script that encrypts existing directories with military-grade LUKS encryption. When locked, directories appear empty to everyone - even root users. Only with the correct password can the contents be accessed.

Key Features:

  • 🔐 Military-grade LUKS encryption (AES-256)
  • 👻 Stealth mode - Locked directories appear empty
  • 🛡️ Root-proof - Even system administrators can't bypass encryption
  • 📊 Automatic sizing - Calculates optimal container size
  • 🔄 Preserves permissions - All file attributes maintained
  • 🚨 Emergency recovery - Access data even without the script

📦 Installation

Step 1: Download the Script

git clone https://github.com/yourusername/lindlocker.git

cd lindlocker

Step 2: Install Dependencies

sudo ./setup.sh

Step 3: Make Script Executable

chmod +x lindlocker

🎯 Quick Start

Lock your first directory:

sudo ./lindlocker lock /home/user/secret-files

Unlock when needed:

sudo ./lindlocker unlock /home/user/secret-files

Lock it back:

sudo ./lindlocker close /home/user/secret-files

Remove the Lock:

sudo ./lindlocker remove /home/user/secret-files

🛡️ Security Features

What Makes LinDLocker Secure?

  • LUKS Encryption: Uses Linux Unified Key Setup with AES-256
  • No Backdoors: Password is the ONLY way to access data
  • Root Protection: Even system administrators with root access cannot decrypt without password
  • Stealth Mode: Locked directories appear as empty folders
  • No Metadata Leaks: File names, sizes, and permissions are encrypted

⚠️ Critical Security Warning:

  • Lost password = Lost data forever
  • No recovery possible without password
  • No master key or backdoor exists
  • Always test with non-critical data first

🆘 Emergency Recovery

What if the script is deleted?

Your data is SAFE! The encryption containers are stored separately. Here's how to recover:

Manual Recovery Commands:

  1. Find your encrypted container:

    ls -lh /var/lib/lindlocker/containers/
  2. Open the container:

    sudo cryptsetup open /var/lib/lindlocker/containers/YOUR_VAULT.vault my_vault
  3. Mount to access files:

    sudo mkdir -p /mnt/recovery
    sudo mount /dev/mapper/my_vault /mnt/recovery
    cd /mnt/recovery
  4. When done, close it:

    sudo umount /mnt/recovery
    sudo cryptsetup close my_vault

View All Locked Directories:

cat /var/lib/lindlocker/vaults.conf

Export Recovery Information:

sudo ./lindlocker export ~/lindlocker-backup.txt

📁 How It Works

The Encryption Process:

  1. Analysis: Scans directory to calculate required size
  2. Container Creation: Creates encrypted LUKS container
  3. File Transfer: Moves all files into encrypted storage
  4. Cleanup: Securely removes original files
  5. Stealth: Directory appears empty when locked

Data Storage Locations:

  • Containers: /var/lib/lindlocker/containers/
  • Configuration: /var/lib/lindlocker/vaults.conf
  • Logs: /var/lib/lindlocker/lindlocker.log

🚫 What NOT To Encrypt

DO NOT encrypt these directories:

  • / (root filesystem)
  • /bin, /sbin, /usr
  • /lib, /lib64
  • /boot, /dev
  • /proc, /sys

Safe directories to encrypt:

  • /home/user/documents/
  • /root/.ssh/
  • /var/www/private/
  • Any user data directories

🔧 Technical Details

Dependencies:

  • cryptsetup - LUKS encryption
  • rsync - File transfer with attributes
  • pv - Progress visualization
  • lsof - Open file detection

Supported Distributions:

  • Ubuntu/Debian
  • RHEL/CentOS
  • Fedora
  • Arch Linux
  • openSUSE

Mail on :- piyushbusiness29@gmail.com in case of any Bug or Query !

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages