Abbreviation For Lock Daemon.
Unix-Style Lock Written In Bash. A Complete Rewrite Of Older Version Of LockD. Now With Credential Obfuscation. Best Suitable For Termux. Highly Compatible With Various Linux Environments.
-
Host Identification :- Who Am I (System) To You (User)?
-
User Identification :- Who Are You (User) To Me (System)?
-
Password Authentication :- What Do You (User) Know (Password) That I (System) Also Know (Password)?
-
Open Source.
-
Single-File Daemon.
-
Embeddable.
-
Robust.
-
Complex Architecture.
-
3 Factor Authentication (3FA) (
Hostname->Username->Password). -
Uses Different Hostnames, Usernames, And Passwords, Than Actual System Hostnames, Usernames, And Passwords. No Need To Expose Confidential Details!
-
Multi-Level Classification Possible For Multi-User Systems.
-
Built-In Enabling/Disabling Feature For Entire Lock, By Setting Value Of
loggedinVariable To Any Number Greater Than0, And For Specific Authentication Factors, By Commenting Out Specific Factor Checking Conditional Statements Using#. -
Custom Commands Can Be Embedded For Each Hostname And/Or User And/Or Password For Internal Mechanism Customization, As Well As User Desired Customization.
-
Highly Compatible With Termux, And Various Linux Environments.
-
Cannot Interrupt With
CTRL+COr Any Type Of Interrupt Signal. -
Can Be Customized To Greet Individual Users With Individual Welcome Messages, And Run Various Commands Specifically As Per Individual User's Choice, As Desired.
-
Easy To Understand, For
Features -> 9.. -
Can Increase And/Or Decrease The Number Of Attempts Of Failed Authentication Factors, By Changing The Values Of
failhnamecountAnd/OrfailunamecountAnd/OrfailpwordcountTo Desired Number Of Attempts. -
NEWCredential Obfuscation Using Obfuscation Chaining Mechanism, Inspired By Various Ransomwares' Encryption Mechanisms. -
NEWUses Switch-Case Based Function Calling For Simplicity And Ease Of Understanding. -
NEWBuilt-In Credential Creation Mechanism. -
NEWBuilt-In Credential Modification Mechanism. -
NEWBuilt-In Credential Storage Directory Migration Mechanism. -
NEWWIPBuilt-In Individual Credential Migration Mechanism. -
NEWWIPBuilt-In Hidden Storage Made Using Existing Credential Storage Mechanism, Can Be Used As A Hidden Space For Confidential Data Storage. -
NEWPOSIX-Compliant, Filesystem Hierarchy StandardFHSCompliant, XDG-Base Directory SpecificationBDSCompliant, UNIX Filesystem's Conventional Directory LayoutCDLCompliant, Centralized Directory-Based Credential Storage Mechanism. -
Can Use Docker-Based, uDocker-Based, Proot-Based, Externally Installed Package(s)' Command(s), If Any Of The Required Package(s) Of Dependencies Is/Are Not Available For User's System.
-
Noob, Script-Kiddie Safe. Since Cannot Be Locked By Just Calling The Daemon File.
-
Doesn't Uses Real Hostnames, Usernames, And Real Passwords For Classification.
-
Can Bypass If :-
-
External Access To Daemon File Is Possible.
-
If Any Time-Consuming Process Is Running Before LockD, And That Process Is Interrupted Manually. E.g. :-
Time-Consuming_Process && lockdOrTime-Consuming_Process ; lockd.
-
-
Malicious Actors Can Create Backdoors, If, External Access To Daemon File Is Possible.
-
Doesn't Natively Work On Shells Other Than Bash ( Might Work On Shells Based On Bash ). For Making It Work On Other Shells, Entire Code Of The
LockDMechanism Needs To Be Re-Written Using The Target Shell Scripting Language. -
If
Drawback -> 3Is Possible, Then :--
Any External Access To Filesystem Can Lead To Credential Leaks, If, Path To Centralized Credential Storage Directory Is Known By The Attacker/Malicious Threat Actor.
-
Any External Access To Filesystem Can Lead To Data Stored In Credential Storage Directory, To Be Leaked, If, Path To Centralized Credential Storage Directory Is Known By The Attacker/Malicious Threat Actor.
-
In The Previous Version Of LockD, There Was Only One Requirement :- A Fully Functional Bash Shell. In This Version, There Are Various.
Note :- The Packages Must Not Need To Be Distro-Supported, Since Can Be Used Using Methods Mentioned In Features -> 23.
-
GNU Coreutils (For Commands
basencmd5sumcksumb2sum) -
SHAsum (For Command
shasum) -
XXHsum (For Command
xxhsum) -
Hashdeep (For Command
hashdeep) -
Blake3B (For Command
b3sum)
-
Read LockD Daemon File To See If It Meets Your Requirements And Expectations For The Use Case. If Yes, Then Read It Again, To Understand How It Works.
-
Install All The Packages For The Dependencies Section.
Note :- If Any Package(s) Is/Are Not Available For Your Linux Distro, But Is/Are Available For Other Distro(s), You Can Use Methods Mentioned In
Features -> 23, To Use Those Distro(s), And Install Those Not Available Package(s) On Those Distro(s), And Use Their Individual Methods (Likedocker exec) To Run Those Specific Command(s) (You May Need To Look Into Their Documentations, In Order To Run Those Commands Without Logging Into Those Distros), And Also Modify The Obfuscation Chain To Include The Docker Exec Command(s) For The Lock To Work. -
Download The LockD File
lockd.-
Using
git clone. -
Using
Download FileFeature Of This Repository.
-
-
Move The Downloaded
lockdFile In The Same Directory Where.bashrcOr.profileIs Stored, Or, In Any Directory That Is Specified In$PATH. Prefer$PREFIX/bin. -
Provide
ExecutePermission Usingchmod +x path/to/lockd. -
Append This New Line In
.bashrcFor Calling LockD Everytime A New Shell Is Called, Or In.profileFor Calling LockD Everytime The System Starts :--
If Moved LockD File Is In Same Directory As In
.bashrcOr.profile:-./lockd -i -
If Moved LockD File Is In One Of The Directories In
$PATH:-lockd -i
-
-
Create A Blank Directory Anywhere Within The System, And Give Read Permission To The Entire Path Of Created Blank Directory.
-
Open The LockD File, And Change The Value Of
LOCKDPASSWDPATHVariable To The Newly Created Blank Directory's Path. -
Add New Hostname(s), Usernames(s) Using, And Password Using Built-In Flag Arguments Of
lockdFile, As You Desire. Once The Lockd File Is Called With Appropriate Flag Argument, Follow On Screen Instructions.
Note :- You Can Add As Many Hostnames, Usernames Per Single Hostname, Password Variables Per Single Username, As You Desire.
1. Make Sure That The `lockd` File Is Starting First, Before Any Time-Consuming Process Or Any Process That Cannot Be Interrupted ( E.g. :- Neofetch, Which Takes Time To Print System Information ).
2. If `.bashrc` Or `.profile` Contains Important System Commands, Give Them First Priority, Then Second Priority To `lockd`, Then To Any Other Non-System Interruptable Process.
1. Make Sure That The `lockd` File Is Starting First, Before Any Time-Consuming Process Or Any Process That Cannot Be Interrupted.
If Any Issue/Defect/Bug/Error/Exception/Etc. Occurs And/Or Found, Leaving Your Device(s)/Computer(s)/Machine(s)/System(s) Vulnerable, STOP USING LockD AS SOON AS POSSIBLE!
-
If Any Loss ( Data/System/Etc. ) Occurs, I, The Creator Of This
LockDMechanism, Am Neither Responsible, Nor Liable. -
If Any Issue/Defect/Bug/Error/Exception/Etc. Occured And/Or Found In This
LockDMechanism, And Can Be Avoided By Modifying The Code Of ThisLockDMechanism, :--
If The Issue/Defect/Bug/Error/Exception/Etc. Is Locally Occured And/Or Found On A Single Device/Computer/Machine/System, Feel Free To Modify The Code Of This
LockDMechanism Locally In The Device/Computer/Machine/System, To Avoid The Occured And/Or Found Issue/Defect/Bug/Error/Exception/Etc, BUT, Then That Modifier/Person Who Modified The Code Of ThisLockDMechanism Locally, And/Or The Organization/Company/Group Of Companies/Etc. Under Which The Modifier/Person Who Modified The Code Of ThisLockDMechanism Locally, Is Working And/Or Contributing For, Is Entirely Responsible For Any Loss ( Data/System/Etc. ) Caused By The Locally Modified Code Of ThisLockDMechanism. -
If The Issue/Defect/Bug/Error/Exception/Etc. Is Globally Occured And/Or Found On Multiple Devices/Computers/Machines/Systems, Feel Free To Raise Issue(s) Or Pull Request(s) On This Repository, BUT, If Any Loss ( Data/System/Etc. ) Occurs Before And/Or After The Issue/Defect/Bug/Error/Exception/Etc. Is Occured And/Or Found, I, The Creator Of This
LockDMechanism, Am ( STILL ) Neither Responsible, Nor Liable.
-
Heck! Even This README Is Made in Nano On Termux. Modified This README In Acode IDE On Android