If compromised, attackers can use tools like John the Ripper or Hashcat to crack the hashes.
Common hash formats:
$6$: SHA-512.
$5$: SHA-256.
$1$: MD5.
Best Practices:
Use strong password policies and hashing algorithms (e.g., SHA-512).
Limit access to /etc/shadow.
7. LDAP (Lightweight Directory Access Protocol)
What It Is:
A protocol for accessing and managing directory information.
Commonly used for authentication and user management in Unix environments.
How It Works:
Centralized management of user credentials and information.
Users can authenticate across multiple services (e.g., email, VPN) using a single password.
LDAP vs. Active Directory:
LDAP is a protocol, while Active Directory is a Microsoft directory service that uses LDAP.
LDAP is more lightweight and platform-agnostic, making it ideal for Unix systems.
Security Considerations:
Encrypt LDAP traffic using LDAPS or StartTLS.
Implement access controls to restrict unauthorized access.
Summary
Concept
Details
SELinux
Provides MAC, enforcing strict security policies.
Kernel/Userspace
Kernel manages resources; userspace includes applications and user-level processes.
MAC vs DAC
MAC offers stricter security; DAC provides more flexibility.
/proc
Virtual filesystem for process and system information.
/tmp
Temporary file storage; vulnerable to code execution without noexec.
/shadow
Stores hashed passwords; critical for system security.
LDAP
Centralized authentication protocol similar to AD for Unix systems.
Conclusion
Unix/Linux systems rely on robust security mechanisms like SELinux, file permissions, and secure configuration of directories like /tmp and /shadow. By understanding these components and implementing best practices, administrators can build resilient systems that resist common attacks while maintaining operational flexibility.