hexdefender
Email
  • Introduction to Linux
    • Overview
    • Linux Kernel
    • Linux Distros
    • Introduction to Kali Linux
    • Install Kali on VirtualBox
    • Install Kali on AWS
  • Linux Commands
    • Linux File Systems
    • Basic File and Directory commands
    • File Permissions and Ownerships
    • System Commands in Linux
    • Text Processing Commands in Linux
    • Linux Archive Utility
    • Package Management in Kali Linux
    • Networking Commands
    • Disk Utility Tools
    • Linux List of CLI Command lookup
    • Linux CLI Cheatsheet
    • Assignment
  • Networking Essentials
    • Overview
    • Networking Protocols
    • IP Addressing & Subnetting
    • DNS and DNS Security
    • Network Devices and Architecture
    • VPNs and Secure Tunnels
    • Network Address Translation (NAT) & Port Forwarding
    • Wireless Networks & Protocols
    • Cloud Networking & Security
    • Common Network Tools
  • Bash Scripting
    • Fundamentals of Bash
    • Variables, Branching and Loops
    • System Variables in Bash
    • Functions and Error Handling in Bash Scripts
    • File Handling and Text Processing
    • 5 Useful Bash Scripts for Everyday Tasks
    • Useful Assignments
  • Fundamentals of Cybersecurity
    • Introduction to Cybersecurity
    • Importance of Cybersecurity
    • Important Cybersecurity Frameworks
    • Cybersecurity Roles and Career Options
  • Penetration Testing
    • Reconnaissance and Footprinting
    • Exploitation Techniques
      • Introduction
      • Service Enumeration
      • Password Attacks
      • Exploit Discovery
      • The Art of Exploitation
      • The Pentester's guide to Metasploit
    • Post Exploitation - Malware & Escalation
  • Web Application Security
    • Common Web Vulnerabilities
    • OWASP Top 10
    • SQL Injections
    • Cross Site Scripting Attacks
    • Web Application Firewalls
    • Secure Coding Practices
  • Cryptography
    • Basic concepts of cryptography
    • Examples of Asymetric & Hashing functions
    • Public Key Infrastructure
    • Digital Signatures
    • Symmetric and Asymmetric Encryption
  • Social Engineering
    • Introduction to Social Engineering
    • Mitigation Strategies for Social Engineering
  • Digital Forensics
    • Digital Forensics Basics
    • Forensics Tools and Techniques
    • Reverse Engineering Fundamentals
    • Malware Analysis
Powered by GitBook
On this page
  • 1. Root Directory (/)
  • 2. Important Directories in Kali Linux
  • 3. Kali-Specific Directories
  • 4. File System Permissions
  • 5. Kali File System for Forensics & Security
  • Conclusion
  1. Linux Commands

Linux File Systems

Kali Linux, being a Debian-based distribution, follows the Linux Filesystem Hierarchy Standard (FHS). Understanding the file system is crucial for cybersecurity professionals, especially for penetration testing, forensic investigations, and system administration.

1. Root Directory (/)

The root directory is the top-level directory in Kali Linux. All other directories branch from it.


2. Important Directories in Kali Linux

Here’s a breakdown of key directories:

System Directories

Directory
Description

/bin

Essential user binaries (e.g., ls, cat, cp, mv, bash) used in single-user mode.

/sbin

System binaries (e.g., fdisk, iptables, reboot), primarily used by the root user.

/boot

Contains the Linux kernel (vmlinuz), bootloader (GRUB), and initrd files.

/dev

Device files for hardware components like disks (/dev/sda), USB (/dev/ttyUSB0), and random number generators (/dev/random).

/etc

Configuration files for system-wide settings (e.g., /etc/passwd, /etc/shadow, /etc/apt/sources.list).

/lib

Shared libraries for binaries in /bin and /sbin.

/lib64

Libraries for 64-bit binaries.

/opt

Optional software, often used for third-party tools.

/srv

Data for services (e.g., web server files).

/tmp

Temporary files. Gets cleared on reboot.

/var

Variable files like logs (/var/log), spool files (/var/spool), and caches (/var/cache).


User-Specific Directories

Directory
Description

/home

Home directories for regular users (/home/username).

/root

Home directory for the root user.


Mount Points

Directory
Description

/mnt

Temporarily mounted filesystems (USB, external drives, etc.).

/media

Automatically mounted removable media (CDs, USB drives).

/proc

Virtual filesystem containing process and kernel information (e.g., /proc/cpuinfo).

/sys

Virtual filesystem with system and kernel information, like /sys/class/net for network interfaces.


3. Kali-Specific Directories

Since Kali Linux is a penetration testing distribution, it has some unique tools and configurations:

Directory
Description

/usr/share/kali-linux

Kali-specific resources and scripts.

/usr/share/wordlists

Pre-installed wordlists (e.g., rockyou.txt for password cracking).

/usr/share/exploitdb

Exploit Database (exploitdb) with exploit scripts.

/usr/bin

Contains most penetration testing tools like nmap, metasploit, john, etc.

/etc/kali-linux

Configuration files for Kali's specific security settings.


4. File System Permissions

Understanding file permissions is crucial for security:

  • ls -l command displays permissions.

  • Permissions follow the rwx (read, write, execute) format, e.g.:

    -rw-r--r--  1 root root 12345 Mar 18 12:00 example.txt
    • User (root): rw- (read, write)

    • Group (root): r-- (read)

    • Others: r-- (read)

  • Common permission commands:

    • chmod 755 file: Assign read/write/execute to owner, read/execute to others.

    • chown root:users file: Change file ownership.

    • sudo su or sudo -i: Switch to the root user.


5. Kali File System for Forensics & Security

  • Log Files (/var/log): Useful for forensic investigations.

  • Mounted Devices (/mnt, /media): Checking for malicious USBs.

  • Hidden Files (. files in home directories): Used for persistence techniques.

  • Proc File System (/proc): Checking for suspicious running processes.


Conclusion

Understanding the Kali Linux file system helps in system administration, penetration testing, and forensic investigations. Mastering key directories, permissions, and logs is essential for securing and analyzing a Kali system.

Would you like specific commands or real-world use cases related to any of these directories? 🚀

PreviousInstall Kali on AWSNextBasic File and Directory commands

Last updated 2 months ago