Welcome to Notes Time πŸ‘‹

Notes Time is your trusted platform for free study notes, tutorials, and guides designed to make learning simple, clear, and effective.

Whether you’re exploring Full Stack Web Development, mastering Cyber Security, or diving into Digital Marketing β€” we’ve got you covered with easy-to-understand content and practical examples.

Learn smarter, grow faster, and upskill with Notes Time β€” your digital study companion for tech and career success.

Subscribe to our newsletter and get our newest updates right on your inbox.

Privilege Escalation via Writable /etc/shadow

By Himanshu Shekhar Β· 27 Feb 2026

Privilege Escalation via Writable /etc/shadow

Privilege Escalation via Writable /etc/shadow (Conceptual Overview)

The /etc/shadow file stores password hashes. If writable, attackers can replace root hash or modify user passwords.

⚠️ Conceptual explanation only. No exploitation steps are provided.

πŸ”’ What is /etc/shadow?

/etc/shadow contains encrypted password hashes and password aging information. It should only be readable by root.


🧠 How /etc/shadow Escalation Happens (High-Level)

  • βœ” /etc/shadow is writable by non-root users
  • βœ” Attacker generates new password hash
  • βœ” Attacker replaces root hash with new one
  • βœ” Attacker logs in as root
πŸ’‘ /etc/shadow should be readable only by root.

πŸ”₯ Why Writable /etc/shadow Is Dangerous

  • βœ” Direct root password change
  • βœ” No logging of modifications
  • βœ” Immediate root access

🌍 Real-World Example (Defensive View)

A misconfigured application makes /etc/shadow group-writable. A user in that group replaces root hash and gains access.

🚨 Check /etc/shadow permissions immediately.

πŸ” Detecting Writable /etc/shadow

  • βœ” Check permissions: ls -la /etc/shadow
  • βœ” Monitor file integrity

πŸ›‘οΈ Preventing /etc/shadow Escalation

  • βœ” Ensure correct permissions (600 or 640)
  • βœ” Use file integrity monitoring
  • βœ” Regular permission audits
βœ… Correct permissions prevent this vector.

🧾 Key Takeaways

  • βœ” /etc/shadow must not be writable
  • βœ” Monitor file permissions
  • βœ” Regular audits are essential

πŸ”’ /etc/shadow – Command Awareness

Common commands observed during audits when checking /etc/shadow. Shown for defensive awareness only.

⚠️ Awareness only. No exploitation steps provided.

πŸ” Permission Checking
  • Check /etc/shadow permissions
    ls -la /etc/shadow
    Why used: Verify correct permissions (should be 600 or 640).

πŸ›‘οΈ Defender Takeaways
  • βœ” Verify /etc/shadow permissions
  • βœ” Monitor file changes
βœ… Correct permissions prevent this vector.
πŸ“š

πŸ“š Related Blogs

Privilege Escalation via Cron Jobs

By Himanshu Shekhar Β· 27 Feb 2026

Privilege Escalation via Cron Jobs...

TryHackMe BLOG Room – Full Walkthrough

By Himanshu Shekhar Β· 27 Feb 2026

πŸ§ͺ TryHackMe – BLOG Room (Full Lab Walkthrough)...

Active Directory Domain Services – Setup Windows Server Conceptual

By Himanshu Shekhar Β· 27 Feb 2026

πŸ› οΈ Step-by-Step:...

Privilege Escalation via Writable /etc/passwd

By Himanshu Shekhar Β· 27 Feb 2026

Privilege Escalation via Writable /etc/passwd (...

Privilege Escalation via Writable /etc/sudoers

By Himanshu Shekhar Β· 27 Feb 2026

Privilege Escalation via Writable /etc/sudoers...

Privilege Escalation via Python Library Hijacking

By Himanshu Shekhar Β· 27 Feb 2026

Privilege Escalation via Python Library Hijacki...

Windows Privilege Escalation via Service Misconfigurations

By Dinesh Kumar Β· 27 Feb 2026

Windows Privilege Escalation via Service Miscon...

Privilege Escalation via Kernel Vulnerabilities

By Himanshu Shekhar Β· 27 Feb 2026

Privilege Escalation via Kernel Vulnerabilities...

Privilege Escalation via Sudo Misconfiguration

By Himanshu Shekhar Β· 27 Feb 2026

Privilege Escalation via Sudo (Conceptual Overv...

Privilege Escalation via Linux Capabilities

By Himanshu Shekhar Β· 27 Feb 2026

Privilege Escalation via Linux Capabilities (Co...

Privilege Escalation via SUID (Conceptual Guide)

By Himanshu Shekhar Β· 27 Feb 2026

Privilege Escalation via SUID (Conceptual Overv...

DC-1 VulnHub: Drupal 7 Exploitation and SUID Privilege Escalation

By Himanshu Shekhar Β· 27 Feb 2026

DC-1 VulnHub Wal...

Privilege Escalation via Misconfigured NFS

By Himanshu Shekhar Β· 27 Feb 2026

Privilege Escalation via Misconfigured NFS (Con...

Privilege Escalation via PATH Variable Manipulation

By Himanshu Shekhar Β· 27 Feb 2026

Privilege Escalation via PATH Variable Manipula...

+